Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350905 - net-misc/unison segfaults on pentium4 if dev-libs/glib compiled with -O3
Summary: net-misc/unison segfaults on pentium4 if dev-libs/glib compiled with -O3
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-06 22:51 UTC by Carl Michal
Modified: 2011-01-11 16:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Michal 2011-01-06 22:51:22 UTC
I recently rebuilt a pentium4 system with gcc-4.4.4-r2, and found after all was said and done that the file synchronizer unison crashed on startup with a segmentation fault.

After an enormous amount of rebuilding various packages, I seem to have narrowed this down to compiling glib-2.2.24.1-r1 with -O3 -march=pentium4 (or native).

A backtrace shows that the crash is in libgobject, but when compiled without optimization (or even -O2) the crash goes away.  Compiling with -O3 but without specifying a cpu type the crash goes away.

with -O3 -g -march=pentium4, gdb shows:
Reading symbols from /usr/bin/unison...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/unison 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0xb7b3242b in iface_node_set_offset_L (node=<value optimized out>, iface_type=<value optimized out>, parent_entry=0x0)
    at gtype.c:1320
1320	gtype.c: No such file or directory.
	in gtype.c
(gdb) bt
#0  0xb7b3242b in iface_node_set_offset_L (node=<value optimized out>, iface_type=<value optimized out>, parent_entry=0x0)
    at gtype.c:1320
#1  type_node_add_iface_entry_W (node=<value optimized out>, iface_type=<value optimized out>, parent_entry=0x0)
    at gtype.c:1417
#2  0xb7b38991 in type_add_interface_Wm (node=0x82fd868, iface=<value optimized out>, info=0xbfffef50, plugin=0x0)
    at gtype.c:1450
#3  0xb7b38e3c in IA__g_type_add_interface_static (instance_type=137353320, interface_type=137361264, info=0x8300604)
    at gtype.c:2812
#4  0xb7e72299 in gtk_widget_get_type () from /usr/lib/libgtk-x11-2.0.so.0
#5  0xb7cda97d in gtk_container_get_type () from /usr/lib/libgtk-x11-2.0.so.0
#6  0xb7ca8f91 in gtk_box_get_type () from /usr/lib/libgtk-x11-2.0.so.0
#7  0xb7d22775 in gtk_hbox_get_type () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x081f38d9 in ml_gtkpack_init ()
#9  0x0816acbf in camlGtkPack__entry ()
#10 0x00000001 in ?? ()
#11 0x082aa36c in camlGtkBase ()
#12 0x080e1855 in caml_program ()
#13 0x0821a27a in caml_start_program ()
#14 0x00000000 in ?? ()


glib-2.26.1 seems to show similar behaviour.

Could -O3 be filtered down to -O2 in the glib ebuild?

My system was built with graphite optimizations, but removing those does not seem to affect glib:  -O3 -march=pentium4 seem to be the only CFLAGS that matter.

emerge --info:
Portage 2.1.9.25 (default/linux/x86/10.0/desktop/gnome, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.36-gentoo-r5-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-gentoo-1.12.14
Timestamp of tree: Tue, 04 Jan 2011 20:00:01 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11-r1
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.2-r3, 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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="-O3 -march=pentium4 -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emacs emboss encode evo exif firefox flac fortran gdbm gdu gif gnome gnome-keyring gpm graphite gstreamer gtk iconv jpeg lcms ldap libnotify mad mikmod mmx mng modules mp2 mp3 mp4 mpeg mudflap nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support readline sdl session spell sse sse2 ssl startup-notification svg sysfs tcltk tcpd threads tiff tk truetype udev unicode usb userlocales v4l v4l2 vorbis win32codecs x264 x86 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="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, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS




Reproducible: Always
Comment 1 Panagiotis Christopoulos (RETIRED) gentoo-dev 2011-01-11 16:00:07 UTC
There is some history with glib and -O3, see bug #294385 and others. Also see in http://www.gentoo.org/proj/en/desktop/gnome/gnome-policy.xml part 2. As a start I don't want to bother our gnome maintainers again with this. See, also http://www.gentoo.org/doc/en/gcc-optimization.xml , where it is not recommended using -O3 with gcc 4.x series. I resolve this as WONTFIX. If you still want from us to process it, you're free to reopen. Thank you for your report.