Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 571220 - [mozilla overlay] www-client/firefox-45.0 segfaults on musl-amd64
Summary: [mozilla overlay] www-client/firefox-45.0 segfaults on musl-amd64
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on: 571036 576928
Blocks: musl-porting
  Show dependency tree
 
Reported: 2016-01-07 22:21 UTC by tt_1
Modified: 2017-07-17 01:13 UTC (History)
3 users (show)

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


Attachments
output of emerge --info (emerge-info,5.07 KB, text/plain)
2016-01-07 22:21 UTC, tt_1
Details
backtrace (firefox-44.0beta_4-html5-crash.log,9.18 KB, text/x-log)
2016-01-07 22:29 UTC, tt_1
Details
firefox backtrace with mesa debug symbols (firefox-45.0b2-html5-crash.log,7.22 KB, text/plain)
2016-02-07 07:11 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2016-01-07 22:21:40 UTC
Created attachment 422242 [details]
output of emerge --info

emerge -pv firefox 

[ebuild   R   ~] www-client/firefox-44.0_beta4::mozilla  USE="dbus debug gstreamer hwaccel jemalloc3 jit minimal system-cairo system-icu system-jpeg system-libevent system-libvpx system-sqlite -bindist -custom-cflags -custom-optimization -egl -ffmpeg% -gmp-autoupdate -gstreamer-0 -gtk3 (-hardened) (-neon) (-pgo) -pulseaudio (-qt5) (-selinux) -startup-notification {-test} -wifi" 0 KiB
Comment 1 tt_1 2016-01-07 22:29:37 UTC
Created attachment 422244 [details]
backtrace

I tried to load html5test.com for testing. 

there is a warning a few lines before the crash happens

JavaScript warning: https://html5test.com/scripts/6/engine.js, line 2962: Error: WebGL: Disallowing antialiased backbuffers due to blacklisting. 

to me the backtrace seems to be incomplete, as there are no helpfull lines from #50 to #24 and I don't know why. The missing informations for #1 to #3 are related to the fact that right now it is not possible to compile media-libs/mesa with debug useflag on musl.
Comment 2 toast+misc 2016-01-07 23:12:43 UTC
The most common reason for incomplete backtraces are external libraries being called which have not been compiled with proper debugging flags.

Looking at your emerge --info, I notice -O2 and -fomit-frame-pointer, both of which can interfere with debugging. My guess here is that firefox is calling something else (that doesn't have a debug use flag, for example).

Quickly looking through, I notice that xserver and libxcb don't have said flags, not that it particularly matters.

If you want to always be able to generate a meaningful backtrace in the future, having -Og and no -fomit-frame-pointer, as well as the nostrip FEATURE should probably help. Alternatively, what's suggested in https://wiki.gentoo.org/wiki/Debugging.

As you pointed out with the depends, however, this does very much seem to be linked to libgl/mesa as per bug #571036).
Comment 3 Jory A. Pratt gentoo-dev 2016-01-08 00:04:49 UTC
Please do not cc myself or blueness to the bug report, I do not need 3 copies of the same bug in my inbox and blueness doesn't need 2 copies either.
Comment 4 tt_1 2016-01-08 07:27:21 UTC
I forgot to tell that I add feature="splitdebug" and replace fomit-frame-pointer with -ggdb via /etc/portage/env 

=================================================================
                        Package Settings
=================================================================

www-client/firefox-44.0_beta4::mozilla was built with the following:
USE="dbus debug gstreamer hwaccel jemalloc3 jit minimal system-cairo system-icu system-jpeg system-libevent system-libvpx system-sqlite -bindist -custom-cflags -custom-optimization -egl -gmp-autoupdate -gstreamer-0 -gtk3 (-hardened) (-neon) (-pgo) -pulseaudio (-selinux) -startup-notification -test -wifi"
CFLAGS="-march=core2 -O2 -pipe -ggdb"
CXXFLAGS="-march=core2 -O2 -pipe -ggdb"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib/firefox"

I will try to compile with -Og though and see wether it makes a difference.
Comment 5 Felix Janda 2016-02-06 18:24:02 UTC
@tt_1: You said in bug 571036 that you have been able to compile mesa with
debug symbols. Could you post the resulting more complete backtrace?
Comment 6 tt_1 2016-02-07 07:11:32 UTC
Created attachment 424806 [details]
firefox backtrace with mesa debug symbols

=================================================================
                        Package Settings
=================================================================

www-client/firefox-45.0_beta2::mozilla was built with the following:
USE="dbus debug gstreamer gtk3 hwaccel jemalloc3 jit system-cairo system-icu system-jpeg system-libevent system-libvpx system-sqlite -bindist -custom-cflags -custom-optimization -egl -ffmpeg -gmp-autoupdate -gstreamer-0 (-hardened) (-neon) (-pgo) -pulseaudio (-qt5) (-selinux) -startup-notification -test -wifi"
CFLAGS="-march=core2 -Og -pipe -ggdb"
CXXFLAGS="-march=core2 -Og -pipe -ggdb"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib/firefox"



It is the same crash as before, just #24 till #52 are left empty in the backtrace and I don't understand why?
Comment 7 tt_1 2016-02-15 22:35:21 UTC
In addition to the backtrace there are a few warnings in the terminal. 

[2233] WARNING: Unable to locate an XBL binding for URI about:abp-elemhidehit?170495129147#dummy in document http://html5test.com/: file /var/tmp/portage/www-client/firefox-45.0_beta4/work/firefox-45.0b4/dom/xbl/nsXBLService.cpp, line 746
[2233] WARNING: Unable to locate an XBL binding for URI about:abp-elemhidehit?060298330707#dummy in document http://html5test.com/: file /var/tmp/portage/www-client/firefox-45.0_beta4/work/firefox-45.0b4/dom/xbl/nsXBLService.cpp, line 746
JavaScript warning: http://html5test.com/scripts/6/engine.js, line 2962: Error: WebGL: Disallowing antialiased backbuffers due to blacklisting.
ATTENTION: default value of option force_s3tc_enable overridden by environment.


should I try to disable hardware acceleration and test again? I tried to switch the ffmpeg and gstreamer useflags with no effect, the backtrace stays the same. 


=================================================================
                        Package Settings
=================================================================

www-client/firefox-45.0_beta4::mozilla was built with the following:
USE="dbus debug ffmpeg gtk3 hwaccel jemalloc3 jit system-libevent -bindist -custom-cflags -custom-optimization -egl -gmp-autoupdate -gstreamer -gstreamer-0 (-hardened) (-neon) (-pgo) -pulseaudio (-qt5) (-selinux) -startup-notification -system-cairo -system-icu -system-jpeg -system-libvpx -system-sqlite -test -wifi"
CFLAGS="-march=core2 -Og -pipe -ggdb"
CXXFLAGS="-march=core2 -Og -pipe -ggdb"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib/firefox"
Comment 8 tt_1 2016-03-12 14:05:43 UTC
the reason for the crash is the lack of glx_tls in musl. it can be avoided by disabling the nptl useflag of both mesa and xorg-server. the musl-extras overlay does have the appropiate ebuilds
Comment 9 Felix Janda 2016-03-12 18:38:09 UTC
So this bug should depend on bug 576928.