Summary: | sys-apps/hal-0.5.13-r2 keeps dying if the system is built with gcc-4.4.1 and -O3 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | PM <mitaspiotr> |
Component: | [OLD] Core system | Assignee: | Daniel Gryniewicz (RETIRED) <dang> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | alexxy, dpblnt, esigra, freedesktop-bugs, galtgendo, goncalossilva, lexxkind, m.debruijne, marsliu2000, panard, spatz, yaleks |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
ebuild to filter/replace flags
ebuild to replace/filter flags ebuild to filter/replace flags |
Description
PM
2009-08-22 17:18:45 UTC
Please try with -02, seems like there is a gcc bug with optimization (vectorize). Report back. 13:12 <+darkside_> ssuominen: you have seen bug 282341 on different bug trackers? 13:12 <+Willikins> darkside_: https://bugs.gentoo.org/282341 "sys-apps/hal-0.5.13-r2 keeps dying if the system is built with gcc-4.4.1 and -O3"; Gentoo Linux, Core system; NEW; yabolus@gmail.com:bug-wranglers@g.o 13:13 <+darkside_> Halcy0n: or you? ^ 13:13 <+ssuominen> nope 13:13 <@Halcy0n> Don't recall seeing that one. 13:13 <@Halcy0n> It might be related to the vectorize issue with zlib though. 13:14 <+ssuominen> darkside_: yes. -O3 includes -ftree-vectorize (and there's a bug that with -ftree-vectorize on x86 zlib breaks) 13:14 <+ssuominen> something to ask the reporter to test i guess 13:14 <+darkside_> ok With @system compiled with -O2 and zlib with -O3 hal works fine. oops, I just looked through the emerge --info I posted and the CFLAGS are wrong... Looks like I had some leftover CFLAGS from my previous machine im my user's .bashrc which made it somehow to emerge --info ;P Correct flags are: CFLAGS="-O2 -march=core2 -msse3 -mssse3 -msse4.1 -pipe -g" CXXFLAGS="-O2 -march=core2 -msse3 -mssse3 -msse4.1 -pipe -g" Sorry for that ;) I confirm this bug in my system. Here it crashes by itself, without any random plugging of any sort. I tried running verbose by hand on a terminal and it worked, but oddly enough also crashed when I redirected the output to a file! It seems the added delay from the terminal helps it somehow, but I have no idea why. # emerge --info Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.30-gentoo-r5 x86_64) ================================================================= System uname: Linux-2.6.30-gentoo-r5-x86_64-AMD_Phenom-tm-_9750_Quad-Core_Processor-with-gentoo-2.0.1 Timestamp of tree: Mon, 24 Aug 2009 20:45:02 +0000 app-shells/bash: 4.0_p28 dev-lang/python: 2.6.2-r1, 3.1.1 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 2.0 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O3 -pipe -fforce-addr -fivopts -funroll-loops -fsplit-ivs-in-unroller -fvariable-expansion-in-unroller -msse3 -fno-tree-vectorize" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /var/bind" 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 /etc/udev/rules.d" CXXFLAGS="-march=native -O3 -pipe -fforce-addr -fivopts -funroll-loops -fsplit-ivs-in-unroller -fvariable-expansion-in-unroller -msse3 -fno-tree-vectorize" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://www.las.ic.unicamp.br/pub/gentoo/ ftp://ftp.las.ic.unicamp.br/pub/gentoo/" LDFLAGS="-Wl,-O1" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=60 --exclude=/distfiles --exclude=/local --exclude=/packages --compress-level=9 --progress" 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://rsync21.us.gentoo.org/gentoo-portage" USE="X Xaw3d acl acpi alsa amd64 archive async berkdb bzip2 cairo cleartype cli consolekit cracklib crypt cups dbus dga djvu dri dynamic fam fastcgi fbcon fftw fortran gd gdbm glitz gmp gnome gnutls gpm graphite gstreamer gtk hal hdri hpn iconv idn isdnlog ithreads jpeg lcms libedit libffi libnotify lqr lzo md5sum mmx mudflap multilib nautilus ncurses network-cron nls nptl nptlonly offensive opengl openmp pam passwdqc pcre perl png ppds pppd python readline reflection samba session slang spl sse sse2 ssh ssl startup-notification svg swat sysfs tcpd threads tiff truetype unicode vim-pager vim-syntax winbind xcb xcomposite xml xmp xorg xulrunner zlib" 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" 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 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" ELIBC="glibc" FOO2ZJS_DEVICES="hp1000 hp2600n" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="ati fbdev fglrx radeon radeonhd vesa" Unset: CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS I too experienced this bug on ~amd64 when using -O3 with GCC 4.4.1; I resolved it by switching to -O2 then "emerge -1 gcc ; emerge -1 libtool ; emerge -e system" based on a suggestion in the thread "hal just keeps dying :(" in the Kernel & Hardware Gentoo forum. What seems to have been occurring was /usr/libexec/hald-runner kept dying with an error that mentioned failed assert that related to dbus (around line 200 of main.c for hald-runner). I tried setting HALD_RUNNER_DBUS_ADDRESS manually, but it only delayed the problem (hald-runner eventually died). I tried downgrading dbus as well as flipping the consolekit & policykit USE flags of hal both on and off, but no combination worked. I also tried just re-emerging consolekit, dbus, & hal after switching to -O2 and rebuilding GCC, but it didn't help (the full emerge -e system with -O2 was what fixed it for me). My emerge --info is currently as follows: <<<<< Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.30-gentoo-r4 x86_64) ================================================================= System uname: Linux-2.6.30-gentoo-r4-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8400_@_2.26GHz-with-gentoo-2.0.1 Timestamp of tree: Tue, 25 Aug 2009 02:30:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.0_p28 dev-java/java-config: 2.1.8-r1 dev-lang/python: 2.5.4-r3, 2.6.2-r1, 3.1.1 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.4-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 2.0 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/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 /etc/udev/rules.d" CXXFLAGS="-O2 -march=native -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="buildpkg ccache cvs distlocks fixpackages keepwork nostrip notitles parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="C" LDFLAGS="-Wl,-O1" LINGUAS="en_US en" MAKEOPTS="-j4 -l10" 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/layman/desktop-effects /usr/local/portage/layman/x11 /usr/local/portage/nick" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 avahi bash-completion berkdb bluetooth bzip2 cairo cli consolekit cracklib crypt cups daap dbus dirac dri dvd dvdnav emerald en_US faac faad fam ffmpeg flac fortran gdbm gif glitz gnome gpm gstreamer gtk gtk2 hal iconv id3 id3tag ieee1394 inotify ipod ipv6 isdnlog java jpeg jpg kvm mmx moonlight mp3 mp4 mpeg mpg mudflap multilib musicbrainz mysql ncurses network nls nptl nptlonly openal opengl openmp pam pango pcre perl php png pppd python qemu qt3support readline reflection sdl session spl sse sse2 ssl svg sysfs taglib tcl tcpd theora thread threads tk truetype unicode virtualbox vorbis wifi x264 xcb xcomposite xml xml2 xorg xv xvid zlib" 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" 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 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" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" USERLAND="GNU" VIDEO_CARDS="intel" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS >>>>> The error occurred when I switch to -O3 in my CFLAGS (and likewise CXXFLAGS); I had made the switch shortly after GCC 4.4.1 was released to ~amd64. Created attachment 202578 [details]
ebuild to filter/replace flags
Tracked this down to glib and the -fipa-cp-clone compile option. The proposed ebuild filters out "-fipa-cp-clone" and replaces "-O3" with "-O3 -fno-ipa-cp-clone". I limited the change to amd64 with gcc 4.4. I'm unaware of other arches being affected or whether the micro version of gcc should be checked. I'm using gcc-4.4.1.
please don't CC gnome to fdo bugs... I confirm this bug. Not even need to mount or umount. hald-runner dies on start. If I run strace to the /usr/libexec/hald-runner. The error message is: ERROR:main.c:251:main: assertion failed: (dbus_address != NULL) ) = 67 my whole system with gcc 4.4.1 -o3 is very unstable too! my emerge --info: !!! CONFIG_PROTECT is emptyPortage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.4.1 , glibc-2.10.1-r0, 2.6.30-gentoo-r6 i686) ================================================================= System uname: Linux-2.6.30-gentoo-r6-i686-with-gentoo-2.0.1 Timestamp of tree: Wed, 02 Sep 2009 03:30:01 +0000 app-shells/bash: 4.0_p28 dev-java/java-config: 1.3.7-r1, 2.1.9 dev-lang/python: 2.6.2-r1, 3.1.1 dev-python/pycrypto: 2.0.1-r5 dev-util/cmake: 2.6.4-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 2.1 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=k8-sse3 -O3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/ fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox .d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=k8-sse3 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms str ict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/ distributions/gentoo" LC_ALL="C" LDFLAGS="-Wl,-O1" LINGUAS="zh_CN zh" MAKEOPTS="-j4" 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 --exclu de=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.jp.gentoo.org/gentoo-portage" USE="3dnow X accessibility acl alsa avahi berkdb bzip2 caps cdr cli consolekit c racklib crypt cups dbus doc dri dvd fortran fuse gdbm gif glade gnome gnome-keyr ing gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg libnotify mmx mudflap nau tilus ncurses nls nptl nptlonly ntpl opengl openmp pam pcre perl png policykit p ppd python readline reflection samba session smp sndfile spl sse sse2 ssl svg sy sfs tcpd threads tiff truetype unicode x86 xinerama xml xorg xprint xrandr zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoo p empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mu law 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 dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache fil ter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC=" glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN zh" USERLAND="GNU " VIDEO_CARDS="fglrx" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORT AGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS (In reply to comment #8) > I confirm this bug. Not even need to mount or umount. hald-runner dies on > start. use solution from comment #6. This is a problem in dev-libs/glib (gnome@ herd). Created attachment 202948 [details]
ebuild to replace/filter flags
Still broken with glib-2.20.5.
Created attachment 203020 [details]
ebuild to filter/replace flags
I just noticed the report of this bug affecting the x86 arch. This ebuild should fix both the amd64 and x86 arches.
Seriously, no. Let's not start filtering for -O3. Filtering when -O2 fails is good, but not for -O3. If anything, you should be reporting this to upstream GCC so they can fix their optimizations. My 2¢ *** Bug 283510 has been marked as a duplicate of this bug. *** (In reply to comment #12) > Seriously, no. Let's not start filtering for -O3. Filtering when -O2 fails is > good, but not for -O3. grepping through the portage tree I see quite a number of packages which replace -O3 with -O2. If you feel that is better, so be it. Personally I don't think that's necessary, but whatever gets this working so people don't have to go hunting for this fix will work. > If anything, you should be reporting this to upstream GCC so they can fix their > optimizations. And just leave it broken until that happens? *** Bug 283627 has been marked as a duplicate of this bug. *** I confirm this bug on my 32 bit system. After changing optimization from -O3 to -O2 and recompiling glib and hal (just in case) it's all back to normal. Thanks (In reply to comment #16) > I confirm this bug on my 32 bit system. After changing optimization from -O3 to > -O2 and recompiling glib and hal (just in case) it's all back to normal. > Hence confirmed to be another issue... *** This bug has been marked as a duplicate of bug 270120 *** (In reply to comment #17) > > Hence confirmed to be another issue... > > *** This bug has been marked as a duplicate of bug 270120 *** > This specific bug has _nothing_ to do with -ftree-vectorize. Compiling glib with -O2 will fix the problem because it disables -fipa-cp-clone. It's very apparent that gcc-4.4 and -O3 do not play well together. The developers should consider alerting everyone with a informational message on gcc-4.4.1 or maybe even make a news item. Neither Gentoo's Gnome Herd (us) or upstream Gnome support gcc's -O3. Consider yourself lucky that nothing broke earlier on your system. Cheers (In reply to comment #19) > Neither Gentoo's Gnome Herd (us) or upstream Gnome support gcc's -O3. Consider > yourself lucky that nothing broke earlier on your system. > This bug makes a case for filtering of -O3 in glib/gtk+ (or atleast a big phat warning) Um, both gtk+ and glib filter 03. glib even filters O3 and O2 to O1 (although it would appear to not be working, based on this bug?) it's arch specific changes. I'd rather not see this -O3 generalized (or if you absolutely want to do it, just drop it in eclass). This bug stems from gcc bugs and I prefer we filter specific failing flags than everything for the sake of finding these hard to get gcc bugs. Users using -O3 and such should be aware that they are using this at their own risk as gnome herd always said and that supporting them is not really top priority given our open bugs backlog. (In reply to comment #22) > it's arch specific changes. > > I'd rather not see this -O3 generalized (or if you absolutely want to do it, > just drop it in eclass). > agree, even considering that push-it-to-the-limit is at least ONE of the reason I've chosen gentoo I run ~amd64 with -O3, I know I can have problems, just help me get through them and stay as near the "limit" as I can :) That's besides the point; glib *is* filtering -O3, but the filter appears to not work. We should either fix the filter so it works, or remove it as misleading. (In reply to comment #24) > That's besides the point; glib *is* filtering -O3, but the filter appears to > not work. We should either fix the filter so it works, or remove it as > misleading. I guess you're talking about this in the ebuild: if use ppc64 && use hardened ; then replace-flags -O[2-3] -O1 epatch "${FILESDIR}/glib-2.6.3-testglib-ssp.patch" fi Obviously it only applies to hardened ppc64 systems. *** Bug 284905 has been marked as a duplicate of this bug. *** *** Bug 286221 has been marked as a duplicate of this bug. *** *** Bug 293330 has been marked as a duplicate of this bug. *** *** Bug 293330 has been marked as a duplicate of this bug. *** *** Bug 292861 has been marked as a duplicate of this bug. *** |