Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 458958 - >=www-client/firefox-18 with media-libs/mesa-9.1 with USE=llvm - segmentation fault in r600g_dri.so
Summary: >=www-client/firefox-18 with media-libs/mesa-9.1 with USE=llvm - segmentation...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-24 09:50 UTC by Klaus Kusche
Modified: 2014-03-09 13:35 UTC (History)
4 users (show)

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


Attachments
emerge --info (emerge-info,5.96 KB, text/plain)
2013-02-27 06:34 UTC, Klaus Kusche
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2013-02-24 09:50:56 UTC
After upgrading to media-libs/mesa-9.1.x, firefox (both 18 and 19) 
crashes immediately on startup (before opening any window):

Feb 24 10:22:14 lap kernel: firefox[15113]: segfault at 0 ip 000003b3840dab68 
sp 000003c76faef8c0 error 4 in r600g_dri.so[3b383b89000+116d000]

Thunderbird is not affected, glxgears works, too.

mesa 9.0.x works fine with firefox.

amd64, grsec/pax kernel, r600 (ChipID = 0x68a0) with kms, mesa has USE="egl g3dvl gallium gbm gles1 gles2 llvm nptl openvg pax_kernel pic shared-glapi xa xorg xvmc -bindist -classic -debug -osmesa -r600-llvm-compiler (-selinux) -vdpau -wayland" VIDEO_CARDS="r600 radeon -i915 -i965 -intel -nouveau -r100 -r200 -r300 -radeonsi -vmware"
Comment 1 Jory A. Pratt gentoo-dev 2013-02-26 23:21:33 UTC
emerge --info and what plugins do you have installed. Without this info your asking for help that can not be given.
Comment 2 Klaus Kusche 2013-02-27 06:34:53 UTC
Created attachment 340272 [details]
emerge --info
Comment 3 Klaus Kusche 2013-02-27 06:40:36 UTC
Plugins are adobe-flash-11.2.202.270, icedtea-bin-7.2.3.6 and
libreoffice-4.0.0.3, but they are not responsible for the crash:
Firefox also crashes with all plugins disabled.

Tried to compile mesa with debug, but the backtrace is still not very useful:
(gdb) where
#0  0x000003097d8d9c4e in ?? () from /usr/lib64/dri/r600_dri.so
#1  0x000003097d8e1450 in radeon_drm_winsys_create () from /usr/lib64/dri/r600_dri.so
#2  0x000003097d4562f8 in ?? () from /usr/lib64/dri/r600_dri.so
#3  0x000003097d8d515c in ?? () from /usr/lib64/dri/r600_dri.so
#4  0x000003097b906acc in ?? () from /usr/lib64/dri/swrast_dri.so
#5  0x000003097f71ee61 in ?? () from /usr/lib64/libGL.so.1
#6  0x000003097f6e595f in ?? () from /usr/lib64/libGL.so.1
#7  0x000003097f6e5d54 in ?? () from /usr/lib64/libGL.so.1
#8  0x000003097f6df326 in ?? () from /usr/lib64/libGL.so.1
#9  0x000003097f6e1775 in glXChooseVisual () from /usr/lib64/libGL.so.1
#10 0x000003098b8b8bd9 in ?? () from /usr/lib64/firefox/libxul.so
#11 0x000003098b8b8e7d in ?? () from /usr/lib64/firefox/libxul.so
#12 0x000003098b8b0dce in ?? () from /usr/lib64/firefox/libxul.so
#13 0x000003098b8b40d1 in ?? () from /usr/lib64/firefox/libxul.so
#14 0x000003098b8b4344 in XRE_main () from /usr/lib64/firefox/libxul.so
#15 0x0000000000402fe0 in ?? ()
#16 0x000003098dea491d in __libc_start_main (main=0x402ce0, argc=1, ubp_av=0x3c28f6563a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x3c28f656398) at libc-start.c:225
#17 0x0000000000403041 in _start ()
Comment 4 Klaus Kusche 2013-03-10 13:23:15 UTC
Tried again, as mesa 9.0 no longer compiles with xorg-server 1.14.

Compiling mesa 9.1 with +llvm makes firefox crash,
using -llvm makes firefox happy (-r600-llvm-compiler in both cases).

So it's the llvm-specific code which causes trouble.

Complete USE list (working fine):

media-libs/mesa-9.1  USE="egl gallium gbm gles1 gles2 nptl openvg pax_kernel pic shared-glapi xa xorg xvmc -bindist -classic -debug -llvm -osmesa -r600-llvm-compiler (-selinux) -vdpau -wayland" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" VIDEO_CARDS="r600 radeon -i915 -i965 -intel -nouveau -r100 -r200 -r300 -radeonsi -vmware"
Comment 5 jannis 2013-03-10 14:23:45 UTC
Can you please modify the bug's title accordingly? the llvm USE-flag is the reason I'm not seeing any bad behaviour
Comment 6 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-03-10 20:18:56 UTC
Default mesa-9.0 builds fine against xorg-server-1.14, only if you enable the xorg state tracker (which should remain disabled except in a few very specific cases) the build fails.

But that might give a hint what is wrong with your setup. Disable the USE="xorg" for mesa.
Comment 7 Klaus Kusche 2013-03-12 19:43:36 UTC
(In reply to comment #6)
> Default mesa-9.0 builds fine against xorg-server-1.14, only if you enable
> the xorg state tracker (which should remain disabled except in a few very
> specific cases) the build fails.

The naming of the "xorg" flag is unfortunate:
xorg-server uses the same flag with a very different meaning,
namely "build the xorg server". So you almost always want to have "xorg" on!
(I've turned it on for that reason in my make.conf)

mesa should have used a different name for its flag,
as it really means something different...

> But that might give a hint what is wrong with your setup. Disable the
> USE="xorg" for mesa.

Didn't try with mesa-9.0, but the "xorg" flag is not related 
to the crash of mesa 9.1:
Even with "xorg" turned off, firefox sigsegv's in r600g_dri.so when mesa
has been built with "llvm" on (and it works fine with "llvm" off).
Comment 8 Aljoscha Vollmerhaus 2013-07-19 15:54:15 UTC
Seems like I am suffering from this one, too:

[2061362.546044] firefox[20702]: segfault at 0 ip 00007f30e14af4a8 sp 00007fff321b2e70 error 4 in r600g_dri.so[7f30e0fd1000+10b9000]
[2061370.514975] firefox[20704]: segfault at 0 ip 00007fb4357af4a8 sp 00007fff7a7d2b60 error 4 in r600g_dri.so[7fb4352d1000+10b9000]
[2062456.033964] firefox[20721]: segfault at 0 ip 00007f542f0af4a8 sp 00007fff14a74cb0 error 4 in r600g_dri.so[7f542ebd1000+10b9000]

I just merged mesa without llvm, let's see whether it helps.
Comment 9 Klaus Kusche 2013-07-21 07:55:05 UTC
(In reply to Aljoscha Vollmerhaus from comment #8)
> Seems like I am suffering from this one, too:
> 
> I just merged mesa without llvm, let's see whether it helps.

I have not looked into the problem for some time
(my mesa & firefox work fine with -llvm, didn't try llvm),
but I noticed (and fixed) something in my system 
which could have been responsible for the problem, too:

- My firefox runs in a separate, very restriced user, not my normal user.
- That user had no access rights on the /dev/dri/* device files.
- Hence, while all my other applications were able to open the DRI devices,
firefox/mesa noticed that there is r600 hardware and a driver for it,
and tried to use them, but were unable to access the GPU.
They should fall back to software rendering, but perhaps that failed...
Comment 10 Aljoscha Vollmerhaus 2013-07-22 23:58:02 UTC
Thanks for the pointer, I forgot to add my user to the video group so that could have affected me as well.
I have added my user to the video group, will re-emerge mesa with llvm and see how that goes.
Comment 11 Klaus Kusche 2014-03-09 13:35:49 UTC
No problem any more.