This is the 2nd chroot image at my tinderbox within 2 weeks were various python packages do segfault during compile phase. This might be related to the host being amd64 hardened, but neither in pax.log nor in grsec.log I do found anything trelated to this. And I don't see any CPU/memory issues which would cause just python packages to segfault in that particular way. Therefore I file this bug rather agains python then agains the specific package. >>> Configuring source in /var/tmp/portage/net-irc/redirbot-0.0.5/work/redirbot-0.0.5 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/net-irc/redirbot-0.0.5/work/redirbot-0.0.5 ... * python2_7: running distutils-r1_run_phase distutils-r1_python_compile /usr/bin/python2.7 setup.py build /var/tmp/portage/net-irc/redirbot-0.0.5/temp/environment: line 1380: 13397 Segmentation fault "${@}" * ERROR: net-irc/redirbot-0.0.5::gentoo failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 93: Called src_compile $ cat ./info.txt ----------------------------------------------------------------- This is an unstable amd64 chroot image (named amd64-kde-unstable_20150910-152205) at a hardened host acting as a tinderbox. ----------------------------------------------------------------- Portage 2.2.20.1 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.3, glibc-2.21-r1, 4.1.6-hardened x86_64) ================================================================= System uname: Linux-4.1.6-hardened-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2 KiB Mem: 16164628 total, 2841576 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Tue, 15 Sep 2015 19:15:01 +0000 sh bash 4.3_p42 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] ccache version 3.2.3 [disabled] app-shells/bash: 4.3_p42::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.22.0::gentoo dev-lang/python: 2.7.10::gentoo, 3.4.3::gentoo dev-util/ccache: 3.2.3::gentoo dev-util/cmake: 3.3.1-r1::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.7::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.9.6-r4::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.2.4-r1::gentoo, 4.8.5::gentoo, 4.9.3::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.2::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: local location: /usr/local/portage masters: gentoo gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: 9999 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/rancid/.cloginrc" CONFIG_PROTECT_MASK="/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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/var/tmp/distfiles" EMERGE_DEFAULT_OPTS="--color=n --nospinner --tree --quiet-build --accept-properties=-interactive --accept-restrict=-fetch" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://mirror.netcologne.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gor.bytemark.co.uk/gentoo/ rsync://ftp.snt.utwente.nl/gentoo" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j1" 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" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi aes-ni alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr clang cli consolekit cracklib crypt cups curl custom-optimization cxx dbus declarative dri drmkms dts dvd dvdr emboss encode exif extraengine fam firefox flac fortran gdbm gif glamor gnuplot gnutls gpm gtk gtk3 help hpn iconv icu ipv6 jadetex javascript jpeg kde kipi lapack lcms ldap libnotify mad mmx mmxext mng mod modules mp3 mp4 mpeg mssql multilib mysql ncurses nls nptl nss objc ogg opencv opengl openmp openssl pam pango pcre pdf pdo phonon plasma png policykit postgres ppds pulseaudio pwquality qt3support qt4 readline scrypt sddm sdl seccomp semantic-desktop session spell sse sse2 sse4_1 sse4_2 ssh-askpass ssl startup-notification svg system-cairo system-libvpx tcpd theora tiff tk tls truetype udev udisks unicode upower usb usbredir uxa v4l video vorbis vpx widgets wxwidgets x264 xa xcb xcomposite xinerama xkb xml xmp xscreensaver 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Created attachment 412054 [details] emerge-history.txt
Created attachment 412056 [details] net-irc:redirbot-0.0.5:20150915-210105.log
Something is wrong/mis-configured on your system. Please seek help in support channels, and reopen if/when you actually find a bug.
The issue happens regularly. For the package eventlet-0.17.4.ebuild I made : $> ebuild eventlet-0.17.4.ebuild compile and got >>> Compiling source in /var/tmp/portage/dev-python/eventlet-0.17.4/work/eventlet-0.17.4 ... * python3_4: running distutils-r1_run_phase distutils-r1_python_compile /usr/bin/python3.4 setup.py build /var/tmp/portage/dev-python/eventlet-0.17.4/temp/environment: line 1427: 25651 Segmentation fault "${@}" This correlates to tor-relay eventlet # nl -ba /var/tmp/portage/dev-python/eventlet-0.17.4/temp/environment | grep -B10 -A10 1427 1417 break; 1418 fi; 1419 done; 1420 done < <(find "${dir}" -name configure -print0); 1421 if [[ -z ${any_found} ]]; then 1422 eqawarn "epunt_cxx called unnecessarily (no C++ checks to punt)."; 1423 fi; 1424 eend 0 1425 } 1426 esetup.py () 1427 { 1428 debug-print-function ${FUNCNAME} "${@}"; 1429 set -- "${PYTHON:-python}" setup.py "${mydistutilsargs[@]}" "${@}"; 1430 echo "${@}" 1>&2; 1431 "${@}" || die 1432 } 1433 eshopts_pop () 1434 { 1435 local s; 1436 estack_pop eshopts s || die "${FUNCNAME}: unbalanced push"; 1437 if [[ ${s} == "shopt -"* ]]; then Is there any chance to print out "$@" bevore calling it : "${@}" || die
(In reply to Toralf Förster from comment #4) > Is there any chance to print out "$@" bevore calling it : > > "${@}" || die It is being output via "echo" on the line immediately above it in esetup.py. In this case, "${@}" expands to: /usr/bin/python2.7 setup.py build
As a troubleshooting step, maybe try running it with an unhardened kernel. That seems to be the most likely cause here.
(In reply to Mike Gilbert from comment #6) > As a troubleshooting step, maybe try running it with an unhardened kernel. > That seems to be the most likely cause here. Was my idea too, but at my hardened desktop it works - difference to the tinderbox is CONFIG_GRKERNSEC_CONFIG_DESKTOP=y versus CONFIG_GRKERNSEC_CONFIG_SERVER=y. And it emerges at the tinderbox at 2 chroot images : tinderbox@tor-relay ~/images $ ls -1d amd64-*/var/db/pkg/dev-python/eventlet* amd64-13.0-stable_20150919-173521/var/db/pkg/dev-python/eventlet-0.17.1 amd64-hardened-unstable_20150918-212345/var/db/pkg/dev-python/eventlet-0.17.4 Therefore the USE flag set and/or the package history are my candidates.
(In reply to Mike Gilbert from comment #6) > As a troubleshooting step, maybe try running it with an unhardened kernel. > That seems to be the most likely cause here. pff - it is portage (after reading your comment in bug #561368 I checked this opprtunity too) It emerged fine here in the past at stable chroot images. And the only unstable chroot iamge, where it emerged fine, had have sys-apps/portage-2.2.20.1 during that time. Now, where that image has upgraded to sys-apps/portage-2.2.22 an "emerge -1 dev-python/eventlet" fails with this issue. bummer !
Immediately after a segfault occurs, check the output of 'dmesg | tail' to see which file it occurs inside of.
(In reply to Zac Medico from comment #9) > Immediately after a segfault occurs, check the output of 'dmesg | tail' to > see which file it occurs inside of. I fear that the host doesn't log it for this kind of segfaults (although the host logs the segfaults of the configure step) : Herea re the emerge log files : tor-relay tinderbox # grep -i segment amd64-*/var/log/portage/*eventlet* amd64-desktop-unstable_20150918-212348/var/log/portage/dev-python:eventlet-0.17.4:20150927-090446.log:/var/tmp/portage/dev-python/eventlet-0.17.4/temp/environment: line 1385: 18005 Segmentation fault "${@}" amd64-kde-unstable_20150924-192409/var/log/portage/dev-python:eventlet-0.17.4:20150927-090415.log:/var/tmp/portage/dev-python/eventlet-0.17.4/temp/environment: line 1347: 13687 Segmentation fault "${@}" amd64-plasma-unstable_20150926-111123/var/log/portage/dev-python:eventlet-0.17.4:20150927-100857.log:/var/tmp/portage/dev-python/eventlet-0.17.4/temp/environment: line 1344: 21376 Segmentation fault "${@}" amd64-plasma-unstable_20150926-111123/var/log/portage/dev-python:eventlet-0.17.4:20150927-100908.log:/var/tmp/portage/dev-python/eventlet-0.17.4/temp/environment: line 1344: 24501 Segmentation fault "${@}" And here's the kern.log of the hardened host: tor-relay tinderbox # grep segfault /var/log/kern.log Sep 27 04:28:50 tor-relay kernel: [466409.976282] atof[22829]: segfault at 2de2d312 ip 000003650182d02b sp 000003aa91eb0780 error 4 in libc-2.20.so[365017df000+1a1000] Sep 27 09:20:38 tor-relay kernel: [483907.404826] python2.7[31767]: segfault at c ip 00000354ae0ebb45 sp 0000038834573a38 error 6 in libffi.so.6.0.4[354ae0e6000+7000] Sep 27 11:04:20 tor-relay kernel: [490126.336076] python3.4[13687]: segfault at c ip 000003807bc64b45 sp 0000039c8805a648 error 6 in libffi.so.6.0.4[3807bc5f000+7000] Sep 27 11:04:52 tor-relay kernel: [490157.801176] python3.4[18005]: segfault at c ip 0000033f2ee12b45 sp 000003a128bdc7b8 error 6 in libffi.so.6.0.4[33f2ee0d000+7000] Sep 27 12:09:02 tor-relay kernel: [494005.623256] python3.4[21376]: segfault at c ip 000003e0cea56cf5 sp 000003e86c049438 error 6 in libffi.so.6.0.4[3e0cea51000+7000] Sep 27 12:09:12 tor-relay kernel: [494016.285172] python3.4[24501]: segfault at c ip 000003c343f90cf5 sp 000003da4ff60e08 error 6 in libffi.so.6.0.4[3c343f8b000+7000] Sep 27 13:49:05 tor-relay kernel: [500005.468797] python2.7[26833]: segfault at c ip 0000038082d25b45 sp 000003ab0775e408 error 6 in libffi.so.6.0.4[38082d20000+7000] Sep 27 14:23:34 tor-relay kernel: [502073.531279] conftest[20061]: segfault at 1 ip 000003ce496e4b46 sp 000003d9a3264f20 error 4 in libc-client.so.1.0.0[3ce496a6000+102000] Sep 27 14:23:38 tor-relay kernel: [502077.020489] conftest[21936]: segfault at ffffffffffffffff ip 0000004a391de72f sp 0000038abe9d24e0 error 7 in conftest[4a391de000+1000] Sep 27 14:23:43 tor-relay kernel: [502082.325318] conftest[24485]: segfault at 0 ip 00000000004005a0 sp 000003f2eaf5b1d0 error 4 in conftest[400000+1000] Sep 27 14:23:43 tor-relay kernel: [502082.575439] conftest[24564]: segfault at 0 ip 0000035481a8785a sp 000003d2a8e625f8 error 4 in libc-2.21.so[354819f8000+18e000] Sep 27 14:24:35 tor-relay kernel: [502133.976003] conftest[10716]: segfault at 1 ip 0000036314322b46 sp 000003c5b35736e0 error 4 in libc-client.so.1.0.0[363142e4000+102000] Sep 27 14:24:44 tor-relay kernel: [502143.323148] conftest[13810]: segfault at 0 ip 00000000004005a0 sp 000003eec75edbc0 error 4 in conftest[400000+1000] Sep 27 14:24:45 tor-relay kernel: [502143.578337] conftest[13862]: segfault at 0 ip 000003a7f1d7e85a sp 000003fba599c028 error 4 in libc-2.21.so[3a7f1cef000+18e000] Sep 27 15:20:50 tor-relay kernel: [505506.977563] temacs[7482]: segfault at b6a000 ip 00000328cfab7980 sp 000003a34df33508 error 4 in libc-2.20.so[328cfa26000+18f000] Sep 27 15:38:25 tor-relay kernel: [506561.393249] readonly.exe[14644]: segfault at 4005a4 ip 0000000000400506 sp 000003ba7a099750 error 7 in readonly.exe[400000+1000] Sep 27 15:38:38 tor-relay kernel: [506573.960635] readonly.exe[20058]: segfault at 4005a4 ip 0000000000400506 sp 000003d5279d91b0 error 7 in readonly.exe[400000+1000] Sep 27 15:43:02 tor-relay kernel: [506838.043208] readonly.exe[18711]: segfault at 4005a4 ip 0000000000400506 sp 000003d0f0c2e660 error 7 in readonly.exe[400000+1000] Sep 27 16:39:09 tor-relay kernel: [510203.736132] temacs[11312]: segfault at b6a000 ip 0000030c28038980 sp 0000038a64cd0db8 error 4 in libc-2.20.so[30c27fa7000+18f000] Sep 27 16:39:53 tor-relay kernel: [510247.705492] try[21825]: segfault at 853ec180 ip 00000000004053cc sp 00000000853ec180 error 6 in try[400000+8000] Sep 27 16:39:58 tor-relay kernel: [510252.040511] try[22682]: segfault at 47400b60 ip 00000000004053cc sp 0000000047400b60 error 6 in try[400000+8000] Sep 27 16:40:03 tor-relay kernel: [510256.924493] try[24480]: segfault at 13eadf60 ip 00000000004053cc sp 0000000013eadf60 error 6 in try[400000+8000] Sep 27 16:40:13 tor-relay kernel: [510267.356512] try[28005]: segfault at e95b4720 ip 0000000000404553 sp 00000000e95b4720 error 6 in try[400000+9000] Sep 27 16:40:22 tor-relay kernel: [510276.494937] try[31569]: segfault at 27f2de58 ip 0000000000406753 sp 0000000027f2de58 error 4 in try[400000+c000] Sep 27 16:58:28 tor-relay kernel: [511361.442929] temacs[30134]: segfault at b6a000 ip 000003cd45e93980 sp 000003ecedeb2f98 error 4 in libc-2.20.so[3cd45e02000+18f000] Sep 27 18:28:32 tor-relay kernel: [516762.477033] bootstrapreduce[7333]: segfault at 5f940 ip 00000000004b44fe sp 000003f28b64e8e0 error 4 in bootstrapreduce[400000+2b2000] Sep 27 19:19:24 tor-relay kernel: [519812.637172] mono[9281]: segfault at 5 ip 00000000004f0c82 sp 000003e6cfdef9b0 error 6 in mono[400000+2f2000] Sep 27 19:36:01 tor-relay kernel: [520809.125217] temacs[14991]: segfault at b6a000 ip 0000037c341c9980 sp 000003b24d948c28 error 4 in libc-2.20.so[37c34138000+18f000]
maybe related to missing pax_kernel in chroot itself