Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390911 - www-client/firefox 9.0 hangs at startup (hardened/pie issue)
Summary: www-client/firefox 9.0 hangs at startup (hardened/pie issue)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal critical with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/bugzilla/show_b...
Whiteboard:
Keywords:
: 410463 412849 (view as bug list)
Depends on: 414865
Blocks:
  Show dependency tree
 
Reported: 2011-11-18 11:56 UTC by Kfir Lavi
Modified: 2012-10-06 12:50 UTC (History)
4 users (show)

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


Attachments
running firefox with strace (firefox.strace.log,5.02 KB, text/plain)
2011-11-18 11:57 UTC, Kfir Lavi
Details
strace -f firefox (strace.minus.f.firefox.8.0.log,5.02 KB, text/plain)
2011-11-20 21:12 UTC, Kfir Lavi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kfir Lavi 2011-11-18 11:56:10 UTC
Hi,
When running firefox, no window opens, and the command hangs at the commandline.

Regards,
Kfir

Reproducible: Always
Comment 1 Kfir Lavi 2011-11-18 11:57:21 UTC
Created attachment 292983 [details]
running firefox with strace

you can see it hangs on futex...
Comment 2 Kfir Lavi 2011-11-18 11:58:51 UTC
Portage 2.1.10.35 (hardened/linux/x86, gcc-4.5.3, glibc-2.13-r4, 3.0.7-gentoo i686)
=================================================================
System uname: Linux-3.0.7-gentoo-i686-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Fri, 18 Nov 2011 09:15:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.6-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo gentoo-haskell sunrise
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2 -fno-strict-overflow -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
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/terminfo"
CXXFLAGS="-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2 -fno-strict-overflow -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.isoc.org.il/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US he"
MAKEOPTS="-j3"
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="/var/lib/layman/haskell /var/lib/layman/sunrise"
SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage/"
USE="X aac acl acpi alsa bash-completion berkdb bidi branding bzip2 cairo cli cracklib crypt cscope cups curl cxx djvu dri dri2 extras fbsplash flac fts3 gdbm gif gnutls gpm hal hardened hdaps iconv id3tag jpeg laptop lcms libnotify mikmod mmx mng modules mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pax_kernel pcre pic png pppd raw readline ruby samba scanner sdl session smapi sqlite sqlite3 sse sse2 ssl ssse3 svg sysfs tcpd theora thinkpad threads tiff truetype unicode urandom vaapi vim-syntax vorbis win32codecs x264 x86 xml xorg xosd xv 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US he" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" SANE_BACKENDS="hp hpsj5s hp5590" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Graham Murray 2011-11-19 08:45:39 UTC
I see that you are using hardened. You have to build firefox with nopie to avoid this hanging. Note that adding "-nopie" to CFLAGS/CXXFLAGS/LDFLAGS does not work as the ebuild/eclass filters out this flag - you have to use the "hardenednopie" gcc profile.
Comment 4 Jory A. Pratt gentoo-dev 2011-11-19 13:42:49 UTC
(In reply to comment #3)
> I see that you are using hardened. You have to build firefox with nopie to
> avoid this hanging. Note that adding "-nopie" to CFLAGS/CXXFLAGS/LDFLAGS does
> not work as the ebuild/eclass filters out this flag - you have to use the
> "hardenednopie" gcc profile.

This is incorrect. I actually build firefox/thunderbird all the time on hardened using the default hardened compiler. I even built this set using gcc-4.6.2
Comment 5 Jory A. Pratt gentoo-dev 2011-11-19 13:44:59 UTC
Please provide the output of strace -f firefox we need to see the children.
Comment 6 Graham Murray 2011-11-19 18:01:36 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > I see that you are using hardened. You have to build firefox with nopie to
> > avoid this hanging. Note that adding "-nopie" to CFLAGS/CXXFLAGS/LDFLAGS does
> > not work as the ebuild/eclass filters out this flag - you have to use the
> > "hardenednopie" gcc profile.
> 
> This is incorrect. I actually build firefox/thunderbird all the time on
> hardened using the default hardened compiler. I even built this set using
> gcc-4.6.2

Ok, I had the same problem and building with nopie fixed it for me.
Comment 7 Kfir Lavi 2011-11-20 21:12:26 UTC
Created attachment 293223 [details]
strace -f firefox
Comment 8 Kfir Lavi 2011-11-21 03:54:34 UTC
(In reply to comment #3)
> I see that you are using hardened. You have to build firefox with nopie to
> avoid this hanging. Note that adding "-nopie" to CFLAGS/CXXFLAGS/LDFLAGS does
> not work as the ebuild/eclass filters out this flag - you have to use the
> "hardenednopie" gcc profile.

Thanks,
This solved my problem. 
Can you please explain why you can't use pie with firefox?

Regrads,
Kfir
Comment 9 Jory A. Pratt gentoo-dev 2011-11-21 04:31:16 UTC
(In reply to comment #8)
> (In reply to comment #3)
> > I see that you are using hardened. You have to build firefox with nopie to
> > avoid this hanging. Note that adding "-nopie" to CFLAGS/CXXFLAGS/LDFLAGS does
> > not work as the ebuild/eclass filters out this flag - you have to use the
> > "hardenednopie" gcc profile.
> 
> Thanks,
> This solved my problem. 
> Can you please explain why you can't use pie with firefox?
> 
> Regrads,
> Kfir

This is by no means fixed, if you are having an issue myself the mozilla and hardened team need to address it.
Comment 10 Kfir Lavi 2011-11-22 08:11:07 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #3)
> > > I see that you are using hardened. You have to build firefox with nopie to
> > > avoid this hanging. Note that adding "-nopie" to CFLAGS/CXXFLAGS/LDFLAGS does
> > > not work as the ebuild/eclass filters out this flag - you have to use the
> > > "hardenednopie" gcc profile.
> > 
> > Thanks,
> > This solved my problem. 
> > Can you please explain why you can't use pie with firefox?
> > 
> > Regrads,
> > Kfir
> 
> This is by no means fixed, if you are having an issue myself the mozilla and
> hardened team need to address it.

Yes, I guess you are right. Thanks you pointed that out. 
So again, I'm asking, why I need to use nopie compiler with mozilla?

Regards,
Kfir
Comment 11 Anthoine Bourgeois 2012-01-21 01:28:28 UTC
The PIE lock during firefox startup seem to be addressed by binutils-2.22-r1. Note, I've got the same issue on firefox 9.0 build with xpcshell (not related to #396275 but more with #374289 that melting this one and #396275, I think)

See https://bugs.gentoo.org/show_bug.cgi?id=374289#c9
Comment 12 Nirbheek Chauhan (RETIRED) gentoo-dev 2012-01-28 04:57:02 UTC
Jory, how do we proceed here? Do we need to get that patch backported to 2.21 binutils or can we fix it in mozilla somehow?
Comment 13 SpanKY gentoo-dev 2012-02-05 04:35:27 UTC
if it's fixed in ~arch, i'm inclined to just wait for that to stabilize
Comment 14 Jory A. Pratt gentoo-dev 2012-02-25 14:06:10 UTC
*** Bug 405627 has been marked as a duplicate of this bug. ***
Comment 15 Jory A. Pratt gentoo-dev 2012-04-03 21:58:31 UTC
*** Bug 410463 has been marked as a duplicate of this bug. ***
Comment 16 Jory A. Pratt gentoo-dev 2012-04-22 16:36:49 UTC
*** Bug 412849 has been marked as a duplicate of this bug. ***
Comment 17 Jory A. Pratt gentoo-dev 2012-05-24 17:10:23 UTC
(In reply to comment #13)
> if it's fixed in ~arch, i'm inclined to just wait for that to stabilize

Any ideal roughly when you all request 2.22 stable?
Comment 18 Jory A. Pratt gentoo-dev 2012-10-06 12:50:18 UTC
binutils-2.22 is stable so closing this, reopen if problem persists.
Comment 19 Jory A. Pratt gentoo-dev 2012-10-06 12:50:39 UTC
err closed!!