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

Bug 411171

Summary: gnome-base/gnome-shell crashes when LIBGL_ALWAYS_INDIRECT=1 ist set
Product: Gentoo Linux Reporter: Sven E. <dark>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED NEEDINFO    
Severity: normal CC: x11
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Sven E. 2012-04-07 17:31:51 UTC
When logging in and gnome-shell is supposed to be started, the system freezes as soon as LIBGL_ALWAYS_INDIRECT=1 is set. Sometimes messages in .xsession-errors suggest that gnome-shell was killed by a signal, sometimes there seems no indication of what is happening and X seems alltogether stuck. Switching to console works though.

Reproducible: Always

Steps to Reproduce:
1. log into gnome with gnome-shell and have LIBGL_ALWAYS_INDIRECT=1

Actual Results:  
crash/hangup

Expected Results:  
Working shell

I am using KMS and the OSS radeon drivers (not fglrx). It seems that something in the whole setup (KMS,X,OSS Radeon drivers) with LIBGL_ALWAYS_INDIRECT=1 makes gnome-shell behave undefined. This should be fixed by either doing a proper fallback, or killing the session and informing the user properly.

Sometimes I got a screen saying that something went wrong and offered me to log out, but there was no indication anywhere I could find, what the problem was.

Since there was nothing in any log etc. there's no further information I can provide, except, what fixed it for me.
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-04-07 18:01:45 UTC
What version of mesa are you using, and with what USE flags?
What version of xorg-server, libdrm, and linux kernel?
How are you starting gnome-shell (logging in from gdm, or another login manager, or manually launching it somehow - please explain)?
How are you setting LIBGL_ALWAYS_INDIRECT?
Are there gnome-shell, radeon, or gl-related error messages or warnings in dmesg, /var/log/messages, ~/.xsesession-errors(.old), or /var/log/Xorg.0.log(.old)?

Please provide the output of "eselect mesa show" and "emerge --info".
Comment 2 Sven E. 2012-04-07 19:05:36 UTC
uname -sr
Linux 2.6.38.8
----------------------------
[ebuild   R    ] x11-libs/libdrm-2.4.33  USE="-libkms -static-libs" VIDEO_CARDS="radeon -intel -nouveau (-omap) -vmware" 0 kB
[ebuild   R    ] media-libs/mesa-8.0.2  USE="classic egl gallium llvm nptl shared-glapi -bindist -d3d -debug -g3dvl -gbm -gles1 -gles2 -openvg -osmesa -pax_kernel -pic (-selinux) -shared-dricore -vdpau -wayland -xa -xvmc" VIDEO_CARDS="radeon -i915 -i965 -intel -nouveau -r100 -r200 -r300 -r600 -vmware" 0 kB
[ebuild   R    ] x11-base/xorg-server-1.12.0-r1  USE="ipv6 kdrive nptl udev xnest xorg -dmx -doc -minimal (-selinux) -static-libs -tslib -xvfb" 0 kB
----
I was/am using gdm3 and started the session from there
----
The env variable 'LIBGL_ALWAYS_INDIRECT' was set through /etc/profile (via env.d file)
----
eselect mesa show
r300 gallium
r600 gallium
sw gallium
-----
oncerning the logs, I'll need to add the env var again and check all of them...
Comment 3 Sven E. 2012-04-07 19:18:59 UTC
Excerpt from dmesg:

gnome-settings-[1903]: segfault at b3f24296 ip b3f24296 sp bfa2f2ac error 14 in libltdl.so.7.3.0[b3f57000+7000]

gnome-shell[2680]: segfault at 0 ip b63bbd42 sp bffc6d30 error 4 in libcogl.so.5.0.1[b63a1000+5e000]
gnome-shell[2768]: segfault at 2c ip b647a118 sp bff2b380 error 4 in libcogl.so.5.0.1[b643c000+5e000]

(Added the gnome-settings stuff sine it happens right before the gshell crash and doesn'T seem to happen when env var is not set - Could be ralted)

.xsession-errors:

Failed to play sound: File or data not found
** Message: applet now removed from the notification area
gnome-session[2613]: WARNING: Application 'gnome-shell.desktop' killed by signal
gnome-session[2613]: WARNING: App 'gnome-shell.desktop' respawning too quickly
gnome-session[2613]: WARNING: Application 'gnome-shell.desktop' killed by signal

.Xorg.0.log:

No EEs no WWs related to GL or graphics at all.
Comment 4 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-04-07 22:21:10 UTC
To find out in whose code the crash happens, try to get a backtrace. Do note that X.org upstream does not care much about indirect rendering, so it is unlikely that this problem will be fixed if X/mesa is at fault.

If no other way works, start gnome-session from failsafe xterm, with libsigsegv in LD_PRELOAD.
Comment 5 Pacho Ramos gentoo-dev 2013-07-27 11:08:18 UTC
Also check with gnome 3.8