It runs fine on non-hardened 4.6.3 (gdb) run Starting program: /usr/sbin/i7z warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000 warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". i7z DEBUG: i7z version: svn-r77-(20-Nov-2011) i7z DEBUG: Found Intel Processor i7z DEBUG: Stepping 9 i7z DEBUG: Model a i7z DEBUG: Family 6 i7z DEBUG: Processor Type 0 i7z DEBUG: Extended Model 3 i7z DEBUG: msr = Model Specific Register i7z DEBUG: Detected an ivy bridege processor Program received signal SIGSEGV, Segmentation fault. Print_Information_Processor (nehalem=nehalem@entry=0x555555561f64 <prog_options+4>, sandy_bridge=0x55561f65, sandy_bridge@entry=0x555555561f65 <prog_options+5>) at helper_functions.c:468 468 helper_functions.c: No such file or directory. (gdb) bt #0 Print_Information_Processor (nehalem=nehalem@entry=0x555555561f64 <prog_options+4>, sandy_bridge=0x55561f65, sandy_bridge@entry=0x555555561f65 <prog_options+5>) at helper_functions.c:468 #1 0x00005555555571f1 in main (argc=1, argv=0x7fffffffdf78) at i7z.c:505 Portage 2.2.1 (hardened/linux/amd64, gcc-4.7.3, glibc-2.15-r3, 3.10.7-gentoo-r1 x86_64) ================================================================= System uname: Linux-3.10.7-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-3632QM_CPU_@_2.20GHz-with-gentoo-2.2 KiB Mem: 8060248 total, 5702880 free KiB Swap: 0 total, 0 free Timestamp of tree: Sat, 12 Oct 2013 11:45:01 +0000 ld GNU gold (GNU Binutils 2.23.1) 1.11 app-shells/bash: 4.2_p45 dev-lang/python: 2.7.5-r2, 3.2.5-r2 dev-util/cmake: 2.8.10.2-r2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.12.6 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.6.3, 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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 -ggdb" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://mirror.internode.on.net/pub/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j9" 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" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="X acl acpi alsa amd64 berkdb bindist bzip2 cairo cli cracklib crypt cxx dbus device-mapper dri fam gdbm gudev hardened hwdb iconv inotify ipv6 justify kde libnotify mmx modules mudflap multilib ncurses nls nptl ogg opengl openmp pam pax_kernel pcre phonon qt3support readline semantic-desktop session spell sse sse2 ssl symlink tcpd unicode urandom vorbis 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" DRACUT_MODULES="crypt crypt-gpg lvm" 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 ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Please report that upstream. He really likes to work together with us.
I guess this seems really silly, but like it works for me when I do this: src_prepare() { epatch "${FILESDIR}"/${PN}-0.27.2-ncurses.patch tc-export CC replace-flags "-O*" "-fauto-inc-dec -fcompare-elim -fcprop-registers -fdce -fdefer-pop -fdelayed-branch -fdse -fguess-branch-probability -fif-conversion2 -fif-conversion -fipa-pure-const -fipa-profile -fipa-reference -fmerge-constants -fsplit-wide-types -ftree-bit-ccp -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-phiprop -ftree-slsr -ftree-sra -ftree-pta -ftree-ter -funit-at-a-time -fomit-frame-pointer" } Which just replaces whatever -O2 or -O1 flags are specified with the list of flags for -O1 specified here: http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Optimize-Options.html#Optimize-Options As I find it crashes with -O1 but works with the above list of flags. argus ~ # gcc -v Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.2/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.8.2-r1/work/gcc-4.8.2/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/python --enable-languages=c,c++,java,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 4.8.2-r1 p1.3, pie-0.5.9' --enable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --enable-lto --with-cloog --disable-isl-version-check Thread model: posix gcc version 4.8.2 (Gentoo Hardened 4.8.2-r1 p1.3, pie-0.5.9) argus ~ # uname -a Linux argus 3.13.3-hardened-r1 #3 SMP Mon Feb 24 22:37:11 EST 2014 x86_64 Intel(R) Core(TM) i7 CPU X 940 @ 2.13GHz GenuineIntel GNU/Linux argus ~ #
(In reply to Mark Wright from comment #2) > I guess this seems really silly, but like it works for me when I do this: > > src_prepare() { > epatch "${FILESDIR}"/${PN}-0.27.2-ncurses.patch > tc-export CC > replace-flags "-O*" "-fauto-inc-dec -fcompare-elim -fcprop-registers -fdce > -fdefer-pop -fdelayed-branch -fdse -fguess-branch-probability > -fif-conversion2 -fif-conversion -fipa-pure-const -fipa-profile > -fipa-reference -fmerge-constants -fsplit-wide-types -ftree-bit-ccp > -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copyrename -ftree-dce > -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-phiprop > -ftree-slsr -ftree-sra -ftree-pta -ftree-ter -funit-at-a-time > -fomit-frame-pointer" > } > > Which just replaces whatever -O2 or -O1 flags are specified with the list > of flags for -O1 specified here: > > http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Optimize-Options.html#Optimize- > Options > > As I find it crashes with -O1 but works with the above list of flags. > It sounds to me like gcc optimization is reordering some of the assembly. Since I'm picking up on this bug late, what's the current status?
No progress as I don't understand hardened enough to give support.
I'm seeing a similar bug in non-hardened Gentoo as well on a similar generation CPU: (gdb) run Starting program: /usr/sbin/i7z_GUI warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed i7z DEBUG: i7z version: svn-r77-(20-Nov-2011) i7z DEBUG: Found Intel Processor i7z DEBUG: Stepping 9 i7z DEBUG: Model a i7z DEBUG: Family 6 i7z DEBUG: Processor Type 0 i7z DEBUG: Extended Model 3 i7z DEBUG: msr = Model Specific Register i7z DEBUG: Detected an ivy bridege processor Program received signal SIGSEGV, Segmentation fault. 0x0000000000404044 in Print_Information_Processor(int*, int*) () (gdb) bt #0 0x0000000000404044 in Print_Information_Processor(int*, int*) () #1 0x0000000000405c0f in MyWidget::MyWidget(QWidget*) () #2 0x00000000004038eb in main () (gdb) q A debugging session is active. I see this in the syslog: ernel: i7z_GUI[31810]: segfault at bc6b309c ip 0000000000404044 sp 00007fffbc6b3030 error 6 in i7z_GUI[400000+a000] The non-GUI version of i7z runs fine on the same hardware.
Update, rebuilding the package without any GCC optimizations does indeed fix my issue as well. Rather than patching, I simply ran: # CFLAGS="-march=native -pipe" CXXFLAGS="-march=native -pipe" emerge i7z
@hardened, any idea here?
*** Bug 551028 has been marked as a duplicate of this bug. ***
(In reply to Justin Lecher from comment #7) > @hardened, any idea here? For me is don't look like a hardened bug more a gcc or a packages bug. As in comment 5 on no hardened.
I encountered this while bumping so I've added a filter-flags call to the ebuild. This application is more power-related than benchmark-related so this isn't a big deal. I'm not on hardened so I don't think that's related either.
are you still hitting this?