Bug 952454 - update to 9.1-6 makes glxinfo segfault
Summary: update to 9.1-6 makes glxinfo segfault
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mesa
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-16 02:23 UTC by Sergio Basto
Modified: 2013-04-28 19:08 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-28 19:08:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
gdb glxinfo (1.78 KB, text/plain)
2013-04-16 23:29 UTC, Sergio Basto
no flags Details
/var/log/Xorg.0.log (16.54 KB, text/plain)
2013-04-16 23:30 UTC, Sergio Basto
no flags Details
Patch from openSuSE (2.57 KB, patch)
2013-04-21 19:57 UTC, Erik van Pienbroek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 26663 0 None None None Never
Red Hat Bugzilla 951910 0 unspecified CLOSED ldconfig wrong search order 2021-02-22 00:41:40 UTC

Internal Links: 951910

Description Sergio Basto 2013-04-16 02:23:21 UTC
Description of problem:
http://lists.fedoraproject.org/pipermail/devel/2013-April/181502.html

Version-Release number of selected component (if applicable):
9.1-6.fc19

How reproducible:
After upgrade to 9.1-6.fc19 , glxinfo crash with segfault , 
glxinfo says:  libGL
error: failed to load driver: swrast   

downgrade mesa to f19 base , we don't have this problem

Comment 1 Dave Airlie 2013-04-16 03:22:19 UTC
gdb glxinfo
r
bt

from the crash.

Also attach /var/log/Xorg.0.log

Comment 2 Sergio Basto 2013-04-16 23:29:36 UTC
Created attachment 736564 [details]
gdb glxinfo

after install all debuginfos

Comment 3 Sergio Basto 2013-04-16 23:30:35 UTC
Created attachment 736565 [details]
/var/log/Xorg.0.log

Comment 4 Nicolas Chauvet (kwizart) 2013-04-17 06:47:00 UTC
Wild guess, is there any rpath involved ?

Comment 5 Nicolas Chauvet (kwizart) 2013-04-17 06:48:32 UTC
Also I wonder why the intel glamor module is enforced from the config files.
Aren't xorg modules expected to be loaded automatically nowadays ?
"Loading /usr/lib64/xorg/modules/libglamoregl.so"

Comment 6 dominique 2013-04-17 17:26:34 UTC
I have same problem, see this bug on rpmfusion bugzilla : https://bugzilla.rpmfusion.org/show_bug.cgi?id=2758

Particularly see comment 5 and 6.

Comment 7 Sergio Basto 2013-04-17 18:00:09 UTC
(In reply to comment #6)
> I have same problem, see this bug on rpmfusion bugzilla :
> https://bugzilla.rpmfusion.org/show_bug.cgi?id=2758
> 
> Particularly see comment 5 and 6.

seems it is related with --enable-glx-tls in .spec

Comment 8 Nicolas Chauvet (kwizart) 2013-04-17 19:54:44 UTC
(In reply to comment #7)
...
> seems it is related with --enable-glx-tls in .spec
Can you reproduce with the affected version of mesa but without xorg-x11-glamor

Comment 9 Dave Airlie 2013-04-18 00:38:46 UTC
is anyone seeing this without the binary driver? try reinstalling the binary driver maybe.

loading glamor explicitly is due to an interaction between glamor and glx load ordering, but nvidia glx shouldn't have any issues in theory.

Comment 10 Sergio Basto 2013-04-18 01:55:24 UTC
(In reply to comment #9)

from http://pkgs.fedoraproject.org/cgit/mesa.git/commit/?id=3d536441811fefd2a7b35eebb8e3288a3f5e1b86
-BuildRequires: libtalloc-devel

why ?  what propose or could influence in segfault ?

Comment 11 Sergio Basto 2013-04-18 02:03:39 UTC
(In reply to comment #8)
> (In reply to comment #7)
> ...
> > seems it is related with --enable-glx-tls in .spec
> Can you reproduce with the affected version of mesa but without
> xorg-x11-glamor

rpm -e xorg-x11-drv-ati.x86_64 xorg-x11-glamor.x86_64 --nodeps 

doesn't change glxinfo segfault ,

Comment 12 Sergio Basto 2013-04-18 03:44:55 UTC
diff --git a/mesa.spec b/mesa.spec
index cdf5126..53fccb5 100644
--- a/mesa.spec
+++ b/mesa.spec
@@ -48,7 +48,7 @@
 Summary: Mesa graphics libraries
 Name: mesa
 Version: 9.1
-Release: 6%{?dist}
+Release: 8%{?dist}
 License: MIT
 Group: System Environment/Libraries
 URL: http://www.mesa3d.org
@@ -349,7 +349,6 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
     --enable-shared-glapi \
     --enable-gbm \
     --disable-opencl \
-    --enable-glx-tls \
 %if %{with_hardware}
     %{?with_vmware:--enable-xa} \
 %if 0%{?with_llvm}

fix this problem

Comment 13 Dave Airlie 2013-04-18 04:11:27 UTC
libtalloc-devel isn't used in mesa anymore, --enable-glx-tls is an upstream configuration flag that we were meant to be using and require in order for ATI open source drivers to work properly. It won't be reverted.

I've no idea why the binary driver is choking here, reinstall its libGL and see do things still work.

I'm closing this as a Fedora bug unless someone can reproduce with no binary driver installed.

Maybe continue in the rpmfusion bug or talk to nvidia.

Comment 14 dominique 2013-04-18 04:45:21 UTC
(In reply to comment #13)
> libtalloc-devel isn't used in mesa anymore, --enable-glx-tls is an upstream
> configuration flag that we were meant to be using and require in order for
> ATI open source drivers to work properly. It won't be reverted.
> 
> I've no idea why the binary driver is choking here, reinstall its libGL and
> see do things still work.
> 
> I'm closing this as a Fedora bug unless someone can reproduce with no binary
> driver installed.
> 
> Maybe continue in the rpmfusion bug or talk to nvidia.

You say it's not a bug, but : 

- for test I install mesa 9.1-6 on my Fedora 18 (with nvidia drivers installed), and I have same problem : direct rendering=  NO.

- that work fine with mesa 9.1-3.

So I think that the 9.1-6 version introduce this bug, and say it is not a bug is not very responsible.

That work before and don't work after.

If it's not a bug, what is it?

Comment 15 Nicolas Chauvet (kwizart) 2013-04-18 06:30:56 UTC
For the record, I'm not reproducing the issue with nvidia binary 304.88 on 32bit with geforce 7.

nVidia binary users, please discuss the issue here:
https://bugzilla.rpmfusion.org/show_bug.cgi?id=2758

Comment 16 Sergio Basto 2013-04-18 11:45:48 UTC
(In reply to comment #14)

> 
> If it's not a bug, what is it?

Agree, at least you may close with a won't fix.

Comment 17 Erik van Pienbroek 2013-04-21 19:57:39 UTC
Created attachment 738338 [details]
Patch from openSuSE

I'm reopening this ticket as I've got more information about it and a patch which resolves it.

The problem is caused by the way the dynamic library loader decides which library it should use when there are multiple candidates. The latest mesa has changed the name which it exposes to the dynamic library loader. This change has caused the mesa libGL to have a higher preference than the nVidia libGL

With mesa-9.1-3.fc19:
$ ldconfig -p | grep libGL.so.1
	libGL.so.1 (libc6,x86-64) => /usr/lib64/nvidia/libGL.so.1
	libGL.so.1 (libc6,x86-64) => /lib64/libGL.so.1
	libGL.so.1 (libc6) => /usr/lib/nvidia/libGL.so.1
	libGL.so.1 (libc6) => /lib/libGL.so.1

With mesa-9.1-6.fc19:
$ ldconfig -p | grep libGL.so.1
	libGL.so.1 (libc6,x86-64, OS-ABI: Linux 2.4.20) => /lib64/libGL.so.1
	libGL.so.1 (libc6,x86-64) => /usr/lib64/nvidia/libGL.so.1
	libGL.so.1 (libc6) => /usr/lib/nvidia/libGL.so.1
	libGL.so.1 (libc6) => /lib/libGL.so.1

With the addition of the 'OS-ABI: Linux 2.4.20' label the mesa libGL always gets loaded instead of the nVidia libGL and causes breakage for environments where the nVidia driver is installed.

This issue was already reported in 2010 to upstream mesa and contains a patch to 'fix' the problem: https://bugs.freedesktop.org/show_bug.cgi?id=26663
The openSuSE folks also ran into this issue recently and updated the patch so it can be applied on the latest mesa: https://bugzilla.novell.com/show_bug.cgi?id=765294

I've attached the openSuSE patch to this ticket so you can consider applying it to the mesa package

Comment 18 Nicolas Chauvet (kwizart) 2013-04-21 20:19:22 UTC
Note that this only affects x86_64. i686 is not affected.

Comment 19 Simone Caronni 2013-04-22 07:02:15 UTC
Same problem here, I actually thought it was a glibc bug as I've never had the chance to try mesa-9.1-3.fc19.

https://bugzilla.redhat.com/show_bug.cgi?id=951910

I'm closing the other bug down.

Comment 20 Simone Caronni 2013-04-22 07:09:40 UTC
According to the changelog on kernel.org it has been released on 28th november 2002!... We get rid of much more recent stuff in Fedora....

According to freedesktop.org bug #26663 this seems pretty trivial.

Thanks,
--Simone

Comment 21 Sergio Basto 2013-04-23 04:09:55 UTC
hi , 
Erik nice catch, thanks.
I confirm, this patch, on this report, fix glxinfo segfault.
I think fix on upstream, is a better solution ...

Comment 22 Sergio Basto 2013-04-23 04:41:03 UTC
err I forgot renable-glx , I have to test it again , tomorrow, not today , big sorry :/ 
Comment #21 could be not corrected ...

Comment 23 dominique 2013-04-23 06:07:59 UTC
For test I rebuild mesa 9.1-6 (with rpmbuild and mock) with OpenSuse patch, and --enable-glx-tls \ in mesa.spec, and for me that solve problem :

Direct rendering= YES

[dominique@host ~]$ ldconfig -p | grep libGL.so.1
        libGL.so.1 (libc6,x86-64) => /usr/lib64/nvidia/libGL.so.1
        libGL.so.1 (libc6,x86-64) => /lib64/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib/nvidia/libGL.so.1
        libGL.so.1 (libc6) => /lib/libGL.so.1
[dominique@host ~]$

If that help you.

Comment 24 Sergio Basto 2013-04-24 01:02:23 UTC
hi, 
OK works also here and also loads glamor
[    21.946] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
[    24.570] (II) Loading /usr/lib64/xorg/modules/nvidia-304xx-304.88/libglx.so
[    24.607] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so

Comment 25 dominique 2013-04-24 05:21:49 UTC
(In reply to comment #24)
> hi, 
> OK works also here and also loads glamor
> [    21.946] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
> [    24.570] (II) Loading
> /usr/lib64/xorg/modules/nvidia-304xx-304.88/libglx.so
> [    24.607] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so

glamor is also load :
[     4.012] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
[     4.096] (II) Loading /usr/lib64/nvidia/xorg/libglx.so
[     4.150] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so

Comment 26 Sergio Basto 2013-04-26 04:46:01 UTC
Dominique , 
it is fixed upstream, 

in this patch 
http://cgit.freedesktop.org/mesa/mesa/patch/?id=904b03824b4c5cc24649aa69dd1a557ddfd5dda3

which means this patch can be add in Fedora before new upstream release. 

reference :
https://bugs.freedesktop.org/show_bug.cgi?id=26663 

Best regards,

Comment 27 dominique 2013-04-26 18:10:53 UTC
(In reply to comment #26)
> Dominique , 
> it is fixed upstream, 
> 
> in this patch 
> http://cgit.freedesktop.org/mesa/mesa/patch/
> ?id=904b03824b4c5cc24649aa69dd1a557ddfd5dda3
> 
> which means this patch can be add in Fedora before new upstream release. 
> 
> reference :
> https://bugs.freedesktop.org/show_bug.cgi?id=26663 
> 
> Best regards,

OK...
For test I rebuild mesa with this patch, and it's good: 

[dominique@host ~]$ ldconfig -p | grep libGL.so.1
        libGL.so.1 (libc6,x86-64) => /usr/lib64/nvidia/libGL.so.1
        libGL.so.1 (libc6,x86-64) => /lib64/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib/nvidia/libGL.so.1
        libGL.so.1 (libc6) => /lib/libGL.so.1

[dominique@host ~]$ ldconfig -p | grep libglamor
        libglamor.so.0 (libc6,x86-64) => /lib64/libglamor.so.0
        libglamor.so.0 (libc6) => /lib/libglamor.so.0

Comment 28 dominique 2013-04-28 05:42:39 UTC
mesa-9.1.1-1.fc19 in update testing fix the bug for me :  

Direct rendering= YES

[dominique@host ~]$ ldconfig -p | grep libGL.so.1
        libGL.so.1 (libc6,x86-64) => /usr/lib64/nvidia/libGL.so.1
        libGL.so.1 (libc6,x86-64) => /lib64/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib/nvidia/libGL.so.1
        libGL.so.1 (libc6) => /lib/libGL.so.1

[dominique@host ~]$ ldconfig -p | grep libglamor
        libglamor.so.0 (libc6,x86-64) => /lib64/libglamor.so.0
        libglamor.so.0 (libc6) => /lib/libglamor.so.0

Comment 29 Simone Caronni 2013-04-28 19:08:18 UTC
mesa-9.1.1-1.fc19 has gone into the updates and the bug is fixed.

Thanks,
--Simone


Note You need to log in before you can comment on or make changes to this bug.