Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 439148

Summary: {www-client/firefox,mail-clientthunderbird}-bin-{15,16},seamonkey-bin-2.13.2 with net-libs/libproxy-0.4.10 crash on exit
Product: Gentoo Linux Reporter: vltg0903
Component: [OLD] LibraryAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: normal CC: bruno, dark.shadow, enrico.tagliavini, fcoiffie, nandhp
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: backtrace

Description vltg0903 2012-10-21 11:31:15 UTC
After updating libproxy to 0.4.10, both firefox-bin and thunderbird-bin crash on exit, every time. Going back to 0.4.7 fixes this.

libproxy USE flags: 
[ebuild     U  ] net-libs/libproxy-0.4.10 [0.4.7] USE="kde networkmanager spidermonkey%* -gnome -mono -perl -python {-test} -webkit%" 0 kB


Portage 2.2.0_alpha141 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.3, glibc-2.15-r3, 3.5.3-gentoo x86_64)
=================================================================
System uname: Linux-3.5.3-gentoo-x86_64-Intel-R-_Core-TM-_i5_CPU_M_520_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Sat, 20 Oct 2012 16:30:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x11 java-netbeans java-binary aeoverlay
Installed sets: @mykde, @networking, @portageutils, @toolbox
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/data/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j5"
PKGDIR="/data/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="/var/lib/layman/x11 /data/portage/java-netbeans /data/portage/java-binary /data/portage/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa alsashared amd64 apng bzip2 cairo cdda cdr cli clucene consolekit cracklib crypt cups cxx dbus declarative device-mapper dri dts dvb dvd dvdr dvdread encode exif firefox flac foomaticdb gif gles gles1 gles2 glut glx gps hou iconv icu inotify irda java6 javadoc javasrc jpeg kde kipi kpathsea latex libnotify mmx modules mp3 mp4 mpeg mudflap multilib ncurses nepomuk netbeans-integration netbeans-library networkmanager nls nptl nptlonly ogg opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds private-headers python3 qt3support quicktime rdp readline sasl scanner semantic-desktop session sou spell sse sse2 ssl startup-notification strigi svg system-sqlite systemjava tcpd theora threads tiff truetype udev udisks udisks2 unicode upower usb userlocales v4l vorbis vpx wayland x264 xcb xcomposite xetex xinerama xml xscreensaver xv xvid zlib" ALSA_CARDS="hda-intel" 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="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" CAMERAS="*" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="arm x86_64 i386" QEMU_USER_TARGETS="arm armeb x86_64 i386" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel i965 i915" 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


Reproducible: Always
Comment 1 Paul Bredbury 2012-10-21 11:50:37 UTC
Sounds like https://bugs.mageia.org/show_bug.cgi?id=6299

http://ftp.nluug.nl/ibiblio/distributions/mageia/distrib/cauldron/SRPMS/core/release/libproxy-0.4.10-1.mga3.src.rpm contains:

-DWITH_MOZJS=OFF

That's your "spidermonkey" USE flag.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-10-22 04:08:08 UTC
What does crashing on exit mean? Do you see any special output?
Comment 3 vltg0903 2012-10-22 08:53:04 UTC
Sorry, should have made that clearer. As soon as I shut down either application, the mozilla crash reporter starts and tells me that the application crashed. The details from the crash reporter are this:

Add-ons: tbtestpilot@labs.mozilla.com:1.3.9,{972ce4c6-7e08-4474-a285-3208198ce6fd}:15.0.1
BuildID: 20120907140327
CrashTime: 1350895999
EMCheckCompatibility: true
FramePoisonBase: 7ffffffff0dea000
FramePoisonSize: 4096
InstallTime: 1347449270
Notes: OpenGL: Tungsten Graphics, Inc -- Mesa DRI Intel(R) Sandybridge Desktop  -- 3.0 Mesa 8.0.4 -- texture_from_pixmap

ProductID: {3550f703-e582-4d05-9a08-453d09bdfdc6}
ProductName: Thunderbird
ReleaseChannel: release
SecondsSinceLastCrash: 30
StartupTime: 1350895995
Theme: classic/1.0
Throttleable: 1
Vendor: 
Version: 15.0.1

This report also contains technical information about the state of the application when it crashed.



Unfortunately, it doesn't say what this 'technical information is', and I don't see a stack trace anywhere. There is no helpful console output either.
Comment 4 Small_Penguin 2012-10-22 17:54:16 UTC
I can confirm this. It causes crashes in firefox (non-bin) when it's running and at exit. Additionally, it causes a segfault at thunderbird (non-bin) startup (after checking updates for add-ons). Reverting to 0.4.7 fixes the problems.

spidermonkey USE flag is enabled here too.

Note that neither rebuilding firefox nor thunderbird will fix the segfaults, the cause is definitely within libproxy (and very likely the spidermonkey USE flag).
Comment 5 N. Andrew Walsh 2012-10-25 10:12:30 UTC
updated to spidermonkey-1.8.5-r2 today, and I have this problem as well: firefox does not start, segfaulting without returning an error message.
Comment 6 N. Andrew Walsh 2012-10-25 22:40:04 UTC
furthermore: I just updated libproxy to 0.4.10-r1, with USE="-spidermonkey -webkit", and I still have this crash.
Comment 7 Rafał Mużyło 2012-10-26 02:00:55 UTC
If the problem is really related to spidermonkey, you should check all of the packages using it, not just libproxy.
While I had my share of trouble with libproxy[spidermonkey] awhile ago, the reason for this (as noted in comment 1) is a symbol clash between js symbols used in firefox and those in the installed in spidermonkey, so the problem could be triggered by *any* app/lib linking with spidermonkey, that's loaded in firefox.
Comment 8 Enrico Tagliavini 2012-10-26 16:52:31 UTC
Created attachment 327478 [details]
backtrace

This is the backtrace generated with firefox 16 compiled with USE=debug and splitdebug enabled. This issue is solved compiling libproxy with USE=webkit -spidermonkey. Please block libproxy[spidermonkey] at least in every mozilla application. This is a very nasty issue to understand for users.

Cheers
Comment 9 Rafał Mużyło 2012-10-26 17:00:57 UTC
@comment 8: if the problem lies in a symbol clash, backtraces will usually be quite misleading - they will point to code that's most likely will be correct.
Comment 10 Enrico Tagliavini 2012-10-27 09:58:29 UTC
(In reply to comment #9)
> @comment 8: if the problem lies in a symbol clash, backtraces will usually
> be quite misleading - they will point to code that's most likely will be
> correct.

Surely I don't understand the backtrace I posted, I'm still not used to this stuff, but compiling libproxy with USE spidermonkey makes firefox not usable. The vodafone website, google street view, my bank website, all of the crashes and it is very easy to reproduce. If there is still doubt it is a fault of libmozjs then feel free to ask me some more testing given I can easly reproduce the issue.

Otherwise please block libproxy[spidermonkey] ASAP
Comment 11 Rafał Mużyło 2012-10-27 12:28:06 UTC
@comment 10: not quite what I've meant.
The backtrace is actually nice, but if the problem really is a symbol clash (which it most likely *is*), it's not as useful for debugging the problem, as it would be in the usual segfault case.

Other than enforcing libproxy[-spidermonkey] not much can be done, as any attempt of a real fix would require upstream to use something alike to symbol versioning... I'll just say it would be a very special kind of 'fun' convincing them to do that.

My problem was (sort of) back with bug 373397, even if I managed to trigger it several firefox releases later (and initially thought it was flash related).
Comment 12 Enrico Tagliavini 2012-10-27 12:43:48 UTC
(In reply to comment #11)
> @comment 10: not quite what I've meant.
> The backtrace is actually nice, but if the problem really is a symbol clash
> (which it most likely *is*), it's not as useful for debugging the problem,
> as it would be in the usual segfault case.

Ok thank you for pointing this out.

> Other than enforcing libproxy[-spidermonkey] not much can be done, as any
> attempt of a real fix would require upstream to use something alike to
> symbol versioning... I'll just say it would be a very special kind of 'fun'
> convincing them to do that.

I agree. That's why I stress for blocking spidermonkey. In the short term it seems to be the only workaround. This is a nasty issue since it involves web browsers and email clients from mozilla, both widespread and very important program for daily usage.
Comment 13 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-31 15:22:02 UTC
(In reply to comment #7)
> If the problem is really related to spidermonkey, you should check all of
> the packages using it, not just libproxy.
> While I had my share of trouble with libproxy[spidermonkey] awhile ago, the
> reason for this (as noted in comment 1) is a symbol clash between js symbols
> used in firefox and those in the installed in spidermonkey, so the problem
> could be triggered by *any* app/lib linking with spidermonkey, that's loaded
> in firefox.


I did a quick tests against firefox-16.0.1 with the freewrl browser plugin; freewrl (via libFreeWRL) does link to spidermonkey (mandatory) but the plugin launches separate sub-processes of freewrl rather than directly loading the spidermonkey-linked library; this may be why it works fine and doesn't have any symbol collisions.

Given that the newer firefoxes/thunderbirds are using what is essentially packaged as spidermonkey-1.8.7 in gentoo (currently p.masked), would building libproxy[spidermonkey] against spidermonkey-1.8.7 alleviate the symbol collisions?
Comment 14 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-31 17:43:26 UTC
(In reply to comment #13)
> (In reply to comment #7)
> > If the problem is really related to spidermonkey, you should check all of
> > the packages using it, not just libproxy.
> > While I had my share of trouble with libproxy[spidermonkey] awhile ago, the
> > reason for this (as noted in comment 1) is a symbol clash between js symbols
> > used in firefox and those in the installed in spidermonkey, so the problem
> > could be triggered by *any* app/lib linking with spidermonkey, that's loaded
> > in firefox.
> 
> 
> I did a quick tests against firefox-16.0.1 with the freewrl browser plugin;
> freewrl (via libFreeWRL) does link to spidermonkey (mandatory) but the
> plugin launches separate sub-processes of freewrl rather than directly
> loading the spidermonkey-linked library; this may be why it works fine and
> doesn't have any symbol collisions.
> 
> Given that the newer firefoxes/thunderbirds are using what is essentially
> packaged as spidermonkey-1.8.7 in gentoo (currently p.masked), would
> building libproxy[spidermonkey] against spidermonkey-1.8.7 alleviate the
> symbol collisions?

Answered my own question -- it does not.  FF-bin-16.0.1 crashes (and reports the crash) immediately on startup, with libproxy-1.4.10-r1[spidemronkey] against spidermonkey-1.8.7-r1 ...  I haven't been able to confirm for sure that libproxy actually works with spidermonkey-1.8.7 since i have no proxy to bounce through nor any ability (apparently) to set up a temporary one, however other libproxy consumers do not crash so I expect it is working OK outside of firefox-bin
Comment 15 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-31 18:20:25 UTC
+  31 Oct 2012; Ian Stakenvicius <axs@gentoo.org> firefox-bin-15.0.1.ebuild,
+  firefox-bin-16.0.2.ebuild:
+  Interim solution to block net-libs/libproxy[spidermonkey] due to mozjs symbol
+  collisions that cause crashes, bug 439148
+

It's not a great solution but it'll keep users from having crashes, especially if/when spidermonkey-1.8.7 is unmasked since then the crash is immediate rather than on exit.

I confirmed that the firefox-bin ESR builds are exempt from this bug (at least my tests succeeded with no crashes)
Comment 16 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-31 19:12:54 UTC
An update regarding thunderbird-bin -- when libproxy[spidermonkey] is compiled against spidermonkey-1.8.5 , the ESR releases do not crash.  However when compiled against spidermonkey-1.8.7 they do crash after load and while checking for mail.

By comparison I had no luck getting FF ESR to crash at all.

As such it is possible that older versions of thunderbird-bin are potentially affected by libproxy[spidermonkey] (or any-other-plugin[spidermonkey]) conflicts as well that just haven't manifested to date.  However, I only added the mask to TB-bin 15.x and above.
Comment 17 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-31 19:53:31 UTC
tests against seamonkey-bin-2.13.2 have the same issue, whenever the 'mail' component is started.
Comment 18 Richard Li 2012-12-29 05:33:08 UTC
This bug also applies to non-bin ebuilds.

I experienced exactly the same problem with www-client/firefox. Random segmentation faults if libproxy is built with USE=spidermonkey. Rebuilt it with USE=-spidermonkey and the segmentation faults are gone.

Now that net-libs/libproxy[spidermonkey] is blocked in firefox-bin-*.ebuild:


  31 Oct 2012; Ian Stakenvicius <axs@gentoo.org> firefox-bin-15.0.1.ebuild,
  firefox-bin-16.0.2.ebuild:
  Interim solution to block net-libs/libproxy[spidermonkey] due to mozjs symbol
  collisions that cause crashes, bug 439148


Why not also block it in firefox-*.ebuild?
Comment 19 Ian Stakenvicius (RETIRED) gentoo-dev 2012-12-29 18:58:41 UTC
(In reply to comment #18)
> 
> Why not also block it in firefox-*.ebuild?

This has been fixed a different way in the non-bin ebuilds -- symbol versioning has been added to both spidermonkey (1.8.5-r2 and above, iirc) as well as {firefox,thunderbird}-17 and above, which allows libmozjs and libxul to co-exist in memory without firefox or libproxy trying to use the wrong library.

(note i will need to confirm that the patches are indeed in the tree, I'm pretty sure they are and have been for a few weeks now)
Comment 20 Jory A. Pratt gentoo-dev 2013-12-16 15:17:27 UTC
ALL mozilla products now have versioning support for libs.