[Bug 2098682] Re: segfault building packer's plugin in Go
Launchpad Bug Tracker
2098682 at bugs.launchpad.net
Sat Apr 19 04:17:20 UTC 2025
[Expired for gcc-12 (Ubuntu) because there has been no activity for 60
days.]
** Changed in: gcc-12 (Ubuntu)
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-12 in Ubuntu.
https://bugs.launchpad.net/bugs/2098682
Title:
segfault building packer's plugin in Go
Status in gcc-12 package in Ubuntu:
Expired
Bug description:
My CI job with example: https://github.com/michalfita/packer-plugin-
cross/actions/runs/13360921690/job/37310429806
Excerpt:
#27 [linux/arm64 builder 5/7] RUN go build -o packer-plugin-cross
#27 262.4 # net
#27 262.4 cgo: gcc did not produce error at completed:1
#27 262.4 on input:
#27 262.4
#27 262.4 #line 1 "cgo-builtin-prolog"
#27 262.4 #include <stddef.h>
#27 262.4
#27 262.4 /* Define intgo when compiling with GCC. */
#27 262.4 typedef ptrdiff_t intgo;
#27 262.4
#27 262.4 #define GO_CGO_GOSTRING_TYPEDEF
#27 262.4 typedef struct { const char *p; intgo n; } _GoString_;
#27 262.4 typedef struct { char *p; intgo n; intgo c; } _GoBytes_;
#27 262.4 _GoString_ GoString(char *p);
#27 262.4 _GoString_ GoStringN(char *p, int l);
#27 262.4 _GoBytes_ GoBytes(void *p, int n);
#27 262.4 char *CString(_GoString_);
#27 262.4 void *CBytes(_GoBytes_);
#27 262.4 void *_CMalloc(size_t);
#27 262.4
#27 262.4 __attribute__ ((unused))
#27 262.4 static size_t _GoStringLen(_GoString_ s) { return (size_t)s.n; }
#27 262.4
#27 262.4 __attribute__ ((unused))
#27 262.4 static const char *_GoStringPtr(_GoString_ s) { return s.p; }
#27 262.4 #line 11 "/usr/local/go/src/net/cgo_unix_cgo_res.go"
#27 262.4
#27 262.4 #include <sys/types.h>
#27 262.4 #include <sys/socket.h>
#27 262.4 #include <netinet/in.h>
#27 262.4 #include <netdb.h>
#27 262.4 #include <unistd.h>
#27 262.4 #include <string.h>
#27 262.4 #include <arpa/nameser.h>
#27 262.4 #include <resolv.h>
#27 262.4
#27 262.4
#27 262.4
#27 262.4 #line 1 "cgo-generated-wrapper"
#27 262.4 #line 1 "not-declared"
#27 262.4 void __cgo_f_1_1(void) { __typeof__(int) *__cgo_undefined__1; }
#27 262.4 #line 1 "not-type"
#27 262.4 void __cgo_f_1_2(void) { int *__cgo_undefined__2; }
#27 262.4 #line 1 "not-int-const"
#27 262.4 void __cgo_f_1_3(void) { enum { __cgo_undefined__3 = (int)*1 }; }
#27 262.4 #line 1 "not-num-const"
#27 262.4 void __cgo_f_1_4(void) { static const double __cgo_undefined__4 = (int); }
#27 262.4 #line 1 "not-str-lit"
#27 262.4 void __cgo_f_1_5(void) { static const char __cgo_undefined__5[] = (int); }
#27 262.4 #line 2 "not-declared"
#27 262.4 void __cgo_f_2_1(void) { __typeof__(res_search) *__cgo_undefined__1; }
#27 262.4 #line 2 "not-type"
#27 262.4 void __cgo_f_2_2(void) { res_search *__cgo_undefined__2; }
#27 262.4 #line 2 "not-int-const"
#27 262.4 void __cgo_f_2_3(void) { enum { __cgo_undefined__3 = (res_search)*1 }; }
#27 262.4 #line 2 "not-num-const"
#27 262.4 void __cgo_f_2_4(void) { static const double __cgo_undefined__4 = (res_search); }
#27 262.4 #line 2 "not-str-lit"
#27 262.4 void __cgo_f_2_5(void) { static const char __cgo_undefined__5[] = (res_search); }
#27 262.4 #line 1 "completed"
#27 262.4 int __cgo__1 = __cgo__2;
#27 262.4
#27 262.4 full error output:
#27 262.4 gcc: internal compiler error: Segmentation fault signal terminated program cc1
#27 262.4 Please submit a full bug report, with preprocessed source (by using -freport-bug).
#27 262.4 See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
#27 262.4
#27 ...
#15 [linux/arm64 stage-2 2/6] RUN apt-get update -qq && apt-get install -qqy --no-install-recommends ca-certificates dosfstools fdisk gdisk kpartx libarchive-tools parted psmisc qemu-utils sudo xz-utils && rm -rf /var/lib/apt/lists/*
#15 341.2 Creating group 'input' with GID 997.
#15 341.2 Creating group 'sgx' with GID 996.
#15 341.2 Creating group 'kvm' with GID 995.
#15 341.2 Creating group 'render' with GID 994.
#15 341.6 Setting up kpartx (0.9.4-5ubuntu8) ...
#15 341.6 Processing triggers for libc-bin (2.39-0ubuntu8.3) ...
#15 341.8 Processing triggers for ca-certificates (20240203) ...
#15 342.1 Updating certificates in /etc/ssl/certs...
#15 368.3 0 added, 0 removed; done.
#15 368.3 Running hooks in /etc/ca-certificates/update.d...
#15 368.4 done.
#15 DONE 368.8s
#27 [linux/arm64 builder 5/7] RUN go build -o packer-plugin-cross
#27 ...
#33 [linux/arm64 stage-2 3/6] WORKDIR /build
#33 DONE 0.0s
#34 [linux/arm64 stage-2 4/6] COPY docker/entrypoint.sh /entrypoint.sh
#34 DONE 0.0s
#27 [linux/arm64 builder 5/7] RUN go build -o packer-plugin-cross
#27 ERROR: process "/dev/.buildkit_qemu_emulator /bin/sh -c go build -o packer-plugin-cross" did not complete successfully: exit code: 1
------
> [linux/arm64 builder 5/7] RUN go build -o packer-plugin-cross:
262.4 #line 2 "not-str-lit"
262.4 void __cgo_f_2_5(void) { static const char __cgo_undefined__5[] = (res_search); }
262.4 #line 1 "completed"
262.4 int __cgo__1 = __cgo__2;
262.4
262.4 full error output:
262.4 gcc: internal compiler error: Segmentation fault signal terminated program cc1
262.4 Please submit a full bug report, with preprocessed source (by using -freport-bug).
262.4 See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
262.4
------
Dockerfile:34
--------------------
32 | COPY . .
33 |
34 | >>> RUN go build -o packer-plugin-cross
35 |
36 | ENV PACKER_VERSION=1.11.0
--------------------
ERROR: failed to solve: process "/dev/.buildkit_qemu_emulator /bin/sh -c go build -o packer-plugin-cross" did not complete successfully: exit code: 1
This started to fail when default GH runners moved from Jammy to Noble.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-12/+bug/2098682/+subscriptions
More information about the foundations-bugs
mailing list