Summary: | app-benchmarks/i7z - i7z: segmentation fault in 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 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michael Palimaka (kensington) <kensington> |
Component: | Current packages | Assignee: | Pacho Ramos <pacho> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | normal | CC: | sam, SDNick484 |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Michael Palimaka (kensington)
2013-10-12 13:54:14 UTC
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? |