Summary: | dev-lang/go with USE="gccgo" results in infinite hanging | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | aion1223 |
Component: | Current packages | Assignee: | William Hubbs <williamh> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andrius, dharding, dragan.kasler, esigra, gentoo, jasmin+gentoo, jesse, jstein, kentnl, luke-jr+gentoobugs, marien.zwart, ne3dle, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 667610 | ||
Attachments: |
build.log
ps -auxwww | grep portage emerge --info emerge --info ps auxwww | grep portage output dev-lang/go-1.12.1 build.log output from emerge --info |
Description
aion1223
2018-08-19 10:47:25 UTC
Created attachment 544440 [details]
build.log
Created attachment 544442 [details]
ps -auxwww | grep portage
Created attachment 544444 [details]
emerge --info
I ran into what's probably the same thing (tried multiple versions of dev-lang/go, using sys-devel/gcc-8.2.0-r2). It's a gccgo + sandbox (I'm using sys-apps/sandbox-2.13) + parallel compile bug. This hangs (with usersandbox in FEATURES): $ ebuild /usr/portage/dev-lang/go/go-1.10.3.ebuild compile This doesn't: $ FEATURES="-sandbox -usersandbox" ebuild /usr/portage/dev-lang/go/go-1.10.3.ebuild compile Process tree typically has one or more "go install" processes. From a hang with only one leaf process: marienz 31456 31245 0 21:22 pts/6 00:00:00 [dev-lang/go-1.10.3] sandbox /usr/lib/portage/python3.6/ebuild.sh compile marienz 31457 31456 0 21:22 pts/6 00:00:00 /bin/bash /usr/lib/portage/python3.6/ebuild.sh compile marienz 31474 31457 0 21:22 pts/6 00:00:00 /bin/bash /usr/lib/portage/python3.6/ebuild.sh compile marienz 31524 31474 0 21:22 pts/6 00:00:00 bash ./make.bash marienz 31607 31524 2 21:22 pts/6 00:00:00 ./cmd/dist/dist bootstrap -a marienz 31621 31607 3 21:22 pts/6 00:00:00 /var/tmp/portage/dev-lang/go-1.10.3/work/go-linux-amd64-bootstrap/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/... marienz 31631 31621 0 21:22 pts/6 00:00:00 /var/tmp/portage/dev-lang/go-1.10.3/work/go-linux-amd64-bootstrap/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/... Stack from the leaf process (31631): #0 __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 #1 0x00007ff8dced9054 in __GI___pthread_mutex_lock (mutex=0x7ff8deaca360 <lock>) at ../nptl/pthread_mutex_lock.c:78 #2 0x00007ff8deab2704 in before_syscall (dirfd=<optimized out>, sb_nr=53, func=0x7ff8deabde0c "execve", file=0xc420220090 "/usr/x86_64-pc-linux-gnu/gcc-bin/8.2.0/gccgo", flags=0) at /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsandbox/libsandbox.c:1035 #3 0x00007ff8deab2f82 in before_syscall (dirfd=dirfd@entry=-100, sb_nr=sb_nr@entry=53, func=func@entry=0x7ff8deabde0c "execve", file=file@entry=0xc420220090 "/usr/x86_64-pc-linux-gnu/gcc-bin/8.2.0/gccgo", flags=flags@entry=0) at /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsandbox/libsandbox.c:1013 #4 0x00007ff8deab782c in execve_DEFAULT (path=path@entry=0xc420220090 "/usr/x86_64-pc-linux-gnu/gcc-bin/8.2.0/gccgo", argv=argv@entry=0xc4201f6200, envp=envp@entry=0xc420117600) at /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsandbox/wrapper-funcs/__wrapper_exec.c:304 #5 0x00007ff8de1ce7e8 in syscall.raw_execve (envv=0xc420117600, argv=0xc4201f6200, argv0=0xc420220090 "/usr/x86_64-pc-linux-gnu/gcc-bin/8.2.0/gccgo") at libcalls.go:253 #6 syscall.forkAndExecInChild1 (argv0=argv0@entry=0xc420220090 "/usr/x86_64-pc-linux-gnu/gcc-bin/8.2.0/gccgo", chroot=0x0, dir=0x0, attr=0x7ff8b1558ac0, sys=0x7ff8deaa8840 <syscall.zeroSysProcAttr>, pipe=24, argv=..., envv=...) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/syscall/exec_linux.go:412 #7 0x00007ff8de1cef35 in syscall.forkAndExecInChild (pipe=<optimized out>, sys=<optimized out>, attr=0x7ff8b1558ac0, dir=0x0, chroot=0x0, argv0=0xc420220090 "/usr/x86_64-pc-linux-gnu/gcc-bin/8.2.0/gccgo", argv=..., envv=...) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/syscall/exec_linux.go:80 #8 syscall.forkExec (argv0=..., argv=..., attr=0x7ff8b1558ac0) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/syscall/exec_unix.go:245 #9 0x00007ff8de1cf711 in syscall.StartProcess (argv0=..., argv=..., attr=attr@entry=0x7ff8b1558ac0) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/syscall/exec_unix.go:292 #10 0x00007ff8de0cfcbe in os.startProcess (attr=<optimized out>, argv=..., name=...) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/os/exec_posix.go:46 #11 os.StartProcess (name=..., argv=..., attr=attr@entry=0x7ff8b1558ef0) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/os/exec.go:102 #12 0x00007ff8de0da1b1 in os_exec.Cmd.Start (param=param@entry=0xc42049e000) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/os/exec/exec.go:379 #13 0x00007ff8de0da8e4 in os_exec.Cmd.Run (c=<optimized out>) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/os/exec/exec.go:302 #14 0x00007ff8de0daa02 in os_exec.Cmd.CombinedOutput (c=c@entry=0xc42049e000) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/os/exec/exec.go:521 #15 0x000056094188d9bd in cmd_go_internal_work.Builder.gccgoToolID (b=b@entry=0xc4201697c0, name=..., language=...) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/cmd/go/internal/work/buildid.go:240 #16 0x00005609418ad115 in cmd_go_internal_work.Builder.buildActionID (b=b@entry=0xc4201697c0, a=<optimized out>) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/cmd/go/internal/work/exec.go:257 #17 0x00005609418bc616 in cmd_go_internal_work.Builder.build (b=<optimized out>, a=<optimized out>) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/cmd/go/internal/work/exec.go:304 #18 0x00005609418c1d44 in work.cmd_go_internal_work..thunk0 ($this=<optimized out>, a=<optimized out>) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/cmd/go/internal/work/action.go:339 #19 0x000056094188eec1 in work.func1 (a=<optimized out>) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/cmd/go/internal/work/exec.go:106 #20 0x000056094188e6e1 in work.func2 () at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/cmd/go/internal/work/exec.go:164 #21 0x0000560941882d77 in work.cmd_go_internal_work..thunk9 (__go_thunk_parameter=<optimized out>) at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/cmd/go/internal/work/exec.go:151 #22 0x00007ff8de15fde9 in runtime.kickoff () at /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/runtime/proc.go:1167 #23 0x00007ff8dcf60ca0 in ?? () from /lib64/libc.so.6 #24 0x0000000000000000 in ?? () There's only one thread. So we're deadlocked here (/var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsandbox/libsandbox.c): /* Need to protect the global sbcontext structure */ sb_lock(); in a child process after fork, before exec. That probably means we forked while another thread held that lock. That's supposed to be protected against by sandbox wrapping fork() (/var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsandbox/wrapper-funcs/fork.c): /* We're only wrapping fork() as a poor man's pthread_atfork(). That would * require dedicated linkage against libpthread. So here we force the locks * to a consistent state before forking. #263657 */ but gccgo forked by calling syscall(__NR_clone, ...) directly (via forkAndExecInChild1 in /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/syscall/exec_linux.go, which calls rawClone() in /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libgo/go/syscall/clone_linux.c, which calls syscall() on everything but SPARC). When gccgo then execve()s, it does so using (exec_linux.go again): err1 = raw_execve(argv0, &argv[0], &envv[0]) and raw_execve is (exec_unix.go): //sysnb raw_execve(argv0 *byte, argv **byte, envv **byte) (err Errno) //execve(argv0 *byte, argv **byte, envv **byte) _C_int which means "call the execve() C function" (see mksyscall.awk). So although it missed the fork, sandbox can catch the execve() just fine, and we deadlock if we forked while sandbox was dealing with a different call. I suspect this doesn't happen when using Go to bootstrap because it uses a direct syscall for execve too. In dev-lang/go-1.10.3, execve is (exec_linux.go): _, _, err1 = RawSyscall(SYS_EXECVE, uintptr(unsafe.Pointer(argv0)), uintptr(unsafe.Pointer(&argv[0])), uintptr(unsafe.Pointer(&envv[0]))) which doesn't hit the execve() C function. I assume we don't end up back in sandbox code after fork before exec, so we have no opportunity to deadlock. I could be way off on why it works without gccgo: I can interpret a stack trace when sandbox is broken, but I don't understand it all that well when it works :) I don't know how to fix this (short of disabling sandbox, which might not be completely unreasonable if it's mostly bypassed without gccgo, but I didn't confirm that's actually true!). Seems to be the same issue as #618794 The backtraces in bug #618794 don't look like the ones here. That other bug mentions segfaults, and the one backtrace that doesn't involve a segfault (bug #618794 comment #4) is in the Go runtime, not sandbox. It also mentions "Two threads are used 100%", while this one is a deadlock (no cpu usage). If that other bug is the same as this one, "ebuild /path/to/go.ebuild compile" as non-root without usersandbox should succeed. Just confirming same effect here, amd64 stable (mostly), with dev-lang/go-1.12.1, and gccgo USE flag set. I get the same issue, but when I build with MAKEOPTS="-j1", I see a little more output - >>> Building Go cmd/dist using /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-amd64-bootstrap. >>> Building Go toolchain1 using /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-amd64-bootstrap. >>> # bootstrap/math/bits >>> /var/tmp/portage/dev-lang/go-1.12.1/work/go/src/math/bits/bits.go:534:3: error: divideError is not a function; //go:linkname is only supported for functions >>> //go:linkname divideError runtime.divideError >>> ^ >>> /var/tmp/portage/dev-lang/go-1.12.1/work/go/src/math/bits/bits.go:531:3: error: overflowError is not a function; //go:linkname is only supported for functions >>> //go:linkname overflowError runtime.overflowError >>> ^ Which is the issue described here - https://github.com/golang/go/issues/30771 Other than that the symptoms are the same. It happens at the same point and as before, the CPU usage drops to 0 and it hangs indefinitely. (In reply to elprawn from comment #8) > I get the same issue, but when I build with MAKEOPTS="-j1", I see a little > more output - > > >>> Building Go cmd/dist using /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-amd64-bootstrap. > >>> Building Go toolchain1 using /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-amd64-bootstrap. > >>> # bootstrap/math/bits > >>> /var/tmp/portage/dev-lang/go-1.12.1/work/go/src/math/bits/bits.go:534:3: error: divideError is not a function; //go:linkname is only supported for functions > >>> //go:linkname divideError runtime.divideError > >>> ^ > >>> /var/tmp/portage/dev-lang/go-1.12.1/work/go/src/math/bits/bits.go:531:3: error: overflowError is not a function; //go:linkname is only supported for functions > >>> //go:linkname overflowError runtime.overflowError > >>> ^ > > Which is the issue described here - https://github.com/golang/go/issues/30771 > > Other than that the symptoms are the same. It happens at the same point and > as before, the CPU usage drops to 0 and it hangs indefinitely. Sorry, forgot to add, here is the output from emerge --info Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-8.2.0, glibc-2.28-r5, 4.19.27-gentoo-r1 x86_64) ================================================================= System uname: Linux-4.19.27-gentoo-r1-x86_64-Intel-R-_Core-TM-_i3-3217U_CPU_@_1.80GHz-with-gentoo-2.6 KiB Mem: 5908748 total, 638680 free KiB Swap: 12582908 total, 12569516 free Timestamp of repository gentoo: Tue, 02 Apr 2019 19:24:25 +0000 Head commit of repository gentoo: 5ade04cfbbd568f5231c368daa164505dde8f78c sh bash 4.4_p23-r1 ld GNU ld (Gentoo 2.30 p5) 2.30.0 app-shells/bash: 4.4_p23-r1::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.26.2::gentoo dev-lang/python: 2.7.15::gentoo, 3.6.5::gentoo dev-util/cmake: 3.9.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.38.3-r1::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.14.1-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.30-r4::gentoo sys-devel/gcc: 8.2.0-r6::gentoo sys-devel/gcc-config: 2.0::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.28-r5::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git priority: -1000 farmboy0 location: /var/lib/layman/farmboy0 masters: gentoo priority: 50 haskell location: /var/lib/layman/haskell masters: gentoo priority: 50 hossie location: /var/lib/layman/hossie masters: gentoo priority: 50 jollheef-overlay location: /var/lib/layman/jollheef-overlay masters: gentoo priority: 50 jorgicio location: /var/lib/layman/jorgicio masters: gentoo priority: 50 junkdrawer location: /var/lib/layman/junkdrawer masters: gentoo priority: 50 programmador location: /var/lib/layman/programmador masters: gentoo priority: 50 qt location: /var/lib/layman/qt masters: gentoo priority: 50 zugaina location: /var/lib/layman/zugaina masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="https://anongit.gentoo.org/git/repo/sync/gentoo.git rsync://mirror.bytemark.co.uk/gentoo/ http://mirror.bytemark.co.uk/gentoo/ ftp://mirror.bytemark.co.uk/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/ rsync://rsync.mirrorservice.org/distfiles.gentoo.org/ ftp://ftp.mirrorservice.org/sites/distfiles.gentoo.org/" LANG="en_GB.ISO-8859-1" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en_GB en en-GB" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi activities alsa amd64 berkdb bidi bluetooth branding bzip2 cairo cdda cdio cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg flac fortran freetype gbm gd gdbm gif glamor gnutls gpm gtk httpd iconv icu ipv6 jpeg kde kipi kwallet lcms ldap libkms libnotify libtirpc live lua mad matroska mmx mng mp3 mp4 mpeg multilib ncurses nls nptl ogg oggvorbis opengl openmp pam pango pcre pdf phonon pipelight plasma png policykit ppds pulseaudio qml qt5 readline sdl seccomp semantic-desktop spell sse sse2 ssl startup-notification stream svg tcpd theora tiff truetype udev udisks unicode upower usb vcd vlm vorbis webkit widgets wxwidgets wxwindows x264 xa xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en_GB en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS As you can see, I'm using gcc 8.2 and the failure was when rebuilding go when running a world update (so not new package or upgrade). The last time I built it, it was with MAKEOPTS="-j5". I suspect it may have been before I upgraded gcc,since the gccgo flag shows as new on the rebuild. The build of gcc-1.12.1 results in hanging as well. CPU is normal but the process of building go hangs: --- ps aux | grep lang/go root 7498 0.0 0.1 83040 14736 ? SN 03:18 0:00 /usr/bin/python3.6m /usr/lib/portage/python3.6/lock-helper.py /var/tmp/portage/dev-lang/go-1.12.1 pbogusze 11134 0.0 0.0 14276 924 pts/3 S+ 09:55 0:00 grep --color=auto lang/go root 16900 0.0 0.1 41148 10140 pts/1 SNs+ 03:12 0:00 /usr/bin/python3.6m /usr/lib/portage/python3.6/pid-ns-init 250 250 250 18 0,1,2 /usr/bin/sandbox [dev-lang/go-1.12.1] sandbox /usr/lib/portage/python3.6/ebuild.sh compile portage 16903 0.0 0.0 4400 1772 pts/1 SN+ 03:12 0:00 [dev-lang/go-1.12.1] sandbox /usr/lib/portage/python3.6/ebuild.sh compile portage 17057 0.0 0.6 944744 49220 pts/1 SNl+ 03:12 0:04 /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-amd64-bootstrap/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/... portage 17067 0.0 0.2 600368 21092 pts/1 SN+ 03:12 0:00 /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-amd64-bootstrap/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/... portage 17118 0.0 0.2 928344 22312 pts/1 SN+ 03:12 0:00 /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-amd64-bootstrap/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/... --- This is what the build.log over here says * Package: dev-lang/go-1.12.1 * Repository: gentoo * Maintainer: williamh@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc gccgo kernel_linux userland_GNU * FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Unpacking go1.12.1.src.tar.gz to /var/tmp/portage/dev-lang/go-1.12.1/work >>> Source unpacked in /var/tmp/portage/dev-lang/go-1.12.1/work >>> Preparing source in /var/tmp/portage/dev-lang/go-1.12.1/work/go ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-lang/go-1.12.1/work/go ... >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-lang/go-1.12.1/work/go ... Building Go cmd/dist using /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-amd64-bootstrap. Building Go toolchain1 using /var/tmp/portage/dev-lang/go-1.12.1/work/go-linux-amd64-bootstrap. # bootstrap/math/bits /var/tmp/portage/dev-lang/go-1.12.1/work/go/src/math/bits/bits.go:534:3: error: divideError is not a function; //go:linkname is only supported for functions //go:linkname divideError runtime.divideError ^ /var/tmp/portage/dev-lang/go-1.12.1/work/go/src/math/bits/bits.go:531:3: error: overflowError is not a function; //go:linkname is only supported for functions //go:linkname overflowError runtime.overflowError --- #emerge --info Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.0, gcc-8.2.0, glibc-2.28-r5, 4.14.105-gentoo-r1 x86_64) ================================================================= System uname: Linux-4.14.105-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5-4278U_CPU_@_2.60GHz-with-gentoo-2.6 KiB Mem: 8128120 total, 3013524 free KiB Swap: 4194300 total, 4194300 free Timestamp of repository gentoo: Thu, 04 Apr 2019 00:45:01 +0000 Head commit of repository gentoo: 9d190af4dfb4101ea252a2fdcb6630af851390a2 sh bash 4.4_p23-r1 ld GNU ld (Gentoo 2.30 p5) 2.30.0 app-shells/bash: 4.4_p23-r1::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.26.2::gentoo dev-lang/python: 2.7.15::gentoo, 3.6.5::gentoo dev-util/cmake: 3.9.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.38.3-r1::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.30-r4::gentoo sys-devel/gcc: 8.2.0-r6::gentoo sys-devel/gcc-config: 2.0::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.28-r5::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage/ priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: no sync-rsync-extra-opts: needless location: /usr/local/portage masters: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/angband/gamedata/ /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg candy collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news nodoc parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="de en" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="7zip X aac acpi alsa amd64 apm asm bash-completion berkdb bonobo bzip2 cairo cddb cjk cli cpudetection cracklib crypt cue cups curl custom-flags cxx dga diskio dri drm egl encode expat faad fbcon flac fontforge fortran fuse gallium gdbm gif glamor gpm gtk gtk2 gtkstyle hscolour iconv imagemagick ipv6 jpeg jpeg2k lame laptop libcaca libclamav libgda libmms libnotify libsamplerate libsndfile libtirpc lm_sensors logrotate lua lzo mad mbox modpack mp3 mpeg mplayer multilib musepack museplug ncurses noamazon nptl ogg oggvorbis opengl openmp openssl pam pango pcre pdf png qemu qt5 readline savedconfig schroedinger screen seccomp sensord sox sql sqlite sqlite3 ssl svg tcpd tga threads tiff truetype unicode vaapi vim-syntax vorbis wavpack wifi xattr xcomposite xft xml xorg zip zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="synaptics evdev" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Created attachment 571794 [details]
emerge --info
Created attachment 571796 [details]
ps auxwww | grep portage output
Created attachment 571798 [details]
dev-lang/go-1.12.1 build.log
(In reply to needle from comment #13) > Created attachment 571798 [details] > dev-lang/go-1.12.1 build.log That's unrelated issue and is fixed upstream. (In reply to Andrius Štikonas from comment #14) > (In reply to needle from comment #13) > > Created attachment 571798 [details] > > dev-lang/go-1.12.1 build.log > > That's unrelated issue and is fixed upstream. https://github.com/golang/go/issues/30771 Something is going on w/ the ebuild here. Doesn't seem like an upstream bug since I can manually bootstrap and build with gccgo or with portage if I set GOMAXPROCS=1 i.e. GOMAXPROCS=1 emerge -av go Created attachment 604206 [details] output from emerge --info same here with newest dev-lang/go-1.13.6: * Package: dev-lang/go-1.13.6 * Repository: gentoo * Maintainer: williamh@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc gccgo kernel_linux userland_GNU * FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Unpacking go1.13.6.src.tar.gz to /var/tmp/portage/dev-lang/go-1.13.6/work >>> Source unpacked in /var/tmp/portage/dev-lang/go-1.13.6/work >>> Preparing source in /var/tmp/portage/dev-lang/go-1.13.6/work/go ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-lang/go-1.13.6/work/go ... >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-lang/go-1.13.6/work/go ... Building Go cmd/dist using /var/tmp/portage/dev-lang/go-1.13.6/work/go-linux-amd64-bootstrap. Building Go toolchain1 using /var/tmp/portage/dev-lang/go-1.13.6/work/go-linux-amd64-bootstrap. sandbox:stop caught signal 2 in pid 4 sandbox:stop Send signal 4 more times to force SIGKILL it works without the gccgo useflag enabled, so it's only mildly annoying that I rebuilt gcc with the go useflag beforehand and having wasted the cpu cycles. (In reply to tt_1 from comment #17) > it works without the gccgo useflag enabled, so it's only mildly annoying > that I rebuilt gcc with the go useflag beforehand and having wasted the cpu > cycles. Without the gccgo USE flag, it's downloading and executing third-party binaries. There's a risk of a recursive backdoor that way. The use of the gccgo use flag was dropped in go 1.13. Yes, you are correct that we now use third party binaries to build Go if go was not previously installed. The third party binaries are created by me, and are a static go toolchain. They are only used to compile this toolchain if there is not a previous go installed. For more info see the upstream documentation on installing go from source [1]. [1] https://golang.org/doc/install/source That's a major regression, since we now need to trust binaries built by you. |