32-bit GLX (nvidia) not working after update, unless running with strace
TLDR: using binutils-2.42 to compile glibc-multilib on slackware isn't compatible with the 32-bit nvidia binary libGLX_nvidia. If binutils-2.41 is used to compile glibc-multilib then everything is ok. Also copying ld-2.39.so from a slackware-current 32-bit system breaks libGLX_nvidia in the same way (but libGLX_mesa is ok).
I did upgrade-all on slackware64-current and restarted the PC since it also updated glibc. Now 32-bit GLX things segfault unless I run them with strace. I have recompiled the nvidia-kernel and nvidia-driver 535.154.05_multilib packages. Also upgraded mesa-compat32 by using convertpkg on the mesa-24.0.0-i586 package. I would have tried downgrading glibc back to 2.38_multilib but there doesn't seem to be anywhere to download older versions from. Anything else I can try? The backtrace from /usr/bin/32/glxinfo is: Code:
Program terminated with signal SIGSEGV, Segmentation fault. |
Hrm. I got that, too. But the 32-bit vkcube works, as does a 32-bit WINE game. Does anything else that's 32-bit break for you?
ETA: Steam segfaults for me. I tried to reset it, and gets to about this line and crashes: "steam.sh[5893]: Can't find 'steam-runtime-check-requirements'" glxgears is also broken for me. LDD isn't showing anything missing, though. |
It is only 32 bit glx things that segfault for me. I just tested vkcube and that works ok.
It was actually when running steam I first noticed the problem :) I got steam working last night by running it as: Code:
DEBUGGER="strace -o/dev/null" steam |
I've reinstalled (completely) nvidia drivers (instead of just using -K). (Patched to work with the 6.6.15 kernel.), 535.154.05. I tried the old kernel, too, thinking it might be the patch causing it.
I've upgraded mesa for 32-bit (thinking there was a mismatch), ditto for SDL2. I've tried a completely new user. Steam is apparently working for Chrisretusn: https://www.linuxquestions.org/quest...ml#post6481208 |
I wonder if it's something to do with nvidia 535. Chrisretus seems to be using nvidia driver 470.
I will have to try building nvidia 545 or 550 and see if they work. |
Nope. I just built nvidia-driver-550.40.07_multilib but still get the segfault with glx* programs.
|
Quote:
|
I guess it is something to do with multilib since only the 32bit versions are broken. Maybe some more of the packages need recompiling against glibc-2.39. It seems to be /usr/lib/libGLX.so.0 where the problem is, and that is the libglvnd-compat32-1.7.0 package.
edit: Just recompiled libglvnd but that doesn't fix it. |
Quote:
|
Removed
|
I think that glvnd just calls whatever the real libGLX is on the system, and it looks like when trying to load the nvidia libGLX it is running into the problem.
You can tell libglvnd to use a different vendor GLX using the __GLX_VENDOR_LIBRARY_NAME env var. This works: Code:
__GLX_VENDOR_LIBRARY_NAME=mesa /usr/bin/32/glxinfo This doesn't: Code:
__GLX_VENDOR_LIBRARY_NAME=nvidia /usr/bin/32/glxinfo Code:
__GLX_VENDOR_LIBRARY_NAME=nvidia strace -o/dev/null /usr/bin/32/glxinfo edit: I just tried changing the symlink /usr/lib/libGLX_nvidia.so.0 to point to libGLX_mesa.so.0.0.0 and then glxinfo works using the "nvidia" vendor. So we know it is finding the nvidia GLX library OK, it's just crashing when trying to load it. |
From a reddit thread.
Quote:
Quote:
|
Quote:
|
Quote:
Code:
d/nv-codec-headers-12.1.14.0-x86_64-1.txz: Added. Otherwise, I'm waiting for the official multilib refresh. (Should be Real Soon Now) I know Chrisretusn is more current than we are, and there could be something we need an update on that has been updated since Jan. 5. It shouldn't matter, I know, but weird library errors sometimes happen when multilib gets stale. |
Quote:
Everything else 32-bit seems to be fine, including vkcube, so I don't think it is a problem with multilib. Since libglvnd works OK with the Mesa 32-bit libs, it looks more like the nvidia libGLX isn't compatible with glibc-2.39 and so when libglvnd tries to dlopen it, it segfaults. Can't see any mention of it on the nvidia forums though. |
Quote:
|
I have started a thread on the nvidia forums now at https://forums.developer.nvidia.com/...egfault/281769
So will see if any others have the same problem. |
Quote:
|
Just thought I would report in. I just tested this right now and I am having the same issue.
/usr/bin/32/glxgears Code:
Segmentation fault Code:
# ------------------------------------ # Code:
���d4�aV EXTDOMAIN=steam_=/home/daedra/.local/share/Steam/ubuntu12_32/steam `e��!`��30 I used Alien Bob's mirror_slackware_current.sh script to create an up to date 32bit iso, so my multilib packages are perfectly in sync with -current. I will start investigating and report back here if I find something. |
Added my two cents to the nvidia thread. So strange that Arch isn't having the same problem. Normally if they encounter a strange bug, so do we. (Since slackware-current and arch are often on the same versions of things.)
|
Quote:
Arch also seems to have the same version of libglvnd without any extra patches. Arch does use different configure options when building 32bit glibc though (I think) Arch from https://gitlab.archlinux.org/archlin...ref_type=heads: Code:
--prefix=/usr Code:
--prefix=/usr \ |
So I'm wondering if it's something 64-bit has that 32-bit doesn't, namely something added to Slackware that needs to be picked up for multilib. Here's a complete list of everything that was added since Jan. 5, the last time multilib was refreshed:
l/libnvme-1.7.1-x86_64-1.txz d/nv-codec-headers-12.1.14.0-x86_64-1.txz l/libass-0.17.1-x86_64-1.txz l/libplacebo-6.338.2-x86_64-1.txz l/python-editables-0.5-x86_64-1 l/python-hatchling-1.21.0-x86_64-1.txz l/python-pathspec-0.12.1-x86_64-1.txz l/python-pluggy-1.4.0-x86_64-1.txz: l/python-sphinx_rtd_theme-2.0.0-x86_64-1.txz l/python-trove-classifiers-2024.1.8-x86_64-1.txz l/python-html5lib-1.1-x86_64-1.txz l/python-webencodings-0.5.1-x86_64-1.txz I'm not completely convinced it's an nvidia bug, since Arch isn't having the same problem. (Nor is 64-bit Slackware.) |
If it was a missing library then it just wouldn't work at all, even when run with gdb or strace.
The reason I think it's something to do with the way the nvidia libGLX_nvidia is compiled is because it works OK when forcing libGLX_mesa instead. ldd /usr/lib/libGLX_nvidia.so.0 shows that no libraries are missing for me. Maybe we could try rebuilding some of the libraries listed there though, like libxcb, libXau, libXdmcp. edit: it looks like they are all built as part of a bigger x11 build script, so can't just build them individually |
I just recompiled glibc 2.39 multilib and added the configure options that are present in the Arch build script (except --enable-systemtap) but I still get the same segfault with glx.
|
In the past, though, whenever there's been an unexplained issue with a library and multilib, it's usually something missing from multilib. My logic was that 64-bit slackware works, so it's got something the multilib set doesn't have, since a whole lot was added to it. Aside from that and what's been tried here, I'm not sure. There's not much movement on the nvidia forum thread.
|
I know what you mean about waiting for multilib to catchup, I have noticed that before too in the past :)
This problem only started for me after installing updates yesterday, and those updates were: Code:
-rw-r--r-- 1 root root 4036 Feb 3 21:19 SDL2-2.30.0-x86_64-1 I was sure it was glibc 2.39 which caused the problem.. but I have now recompiled glibc 2.38 and I am still getting exactly the same segfault. So now i'm more confused :) Edit: just had another thought about the kernel headers. Maybe since I have the 6.6.15 kernel headers installed now, my glibc build used them and so it's not the same as the old 2.38 that was built before. I'm not sure if they would make a difference to the resulting glibc but I guess trying with older kernel headers is something I could test tomorrow. |
Quote:
I wish I had an AMD card I could toss in and see what happens. |
going through logs. I found this:
Code:
Feb 4 18:49:13 zdeno kernel: glxgears[12991]: segfault at c ip 00000000f7f3f2b3 sp 00000000ffb96830 error 4 in ld-2.39.so[f7f34000+27000] likely on CPU 3 (core 4, socket 0) |
Quote:
|
I have now installed the linux kernel headers 6.6.8 and used them to rebuild glibc-2.38 and libglvnd but still getting the segfault.
Also other libraries listed by ldd for glxinfo and libGLX_nvidia.so were last modified before February. So that should mean I have all the versions back to how they were before it went wrong, but it's still not working. Code:
ls -l -H /usr/lib/libX11.so.6 /usr/lib/libXext.so.6 /usr/lib/libGL.so.1 /usr/lib/libGLU.so.1 /usr/lib/libOpenGL.so.0 /lib/libm.so.6 /lib/libc.so.6 /usr/lib/libxcb.so.1 /usr/lib/libGLX.so.0 /usr/lib/libGLdispatch.so.0 /usr/lib/libstdc++.so.6 /usr/lib/libgcc_s.so.1 /usr/lib/libXau.so.6 /usr/lib/libXdmcp.so.6 /usr/lib/libnvidia-glsi.so.535.154.05 /usr/lib/libnvidia-tls.so.535.154.05 /usr/lib/libnvidia-glcore.so.535.154.05 /usr/lib/libX11.so.6 /usr/lib/libXext.so.6 /lib/libc.so.6 /lib/libdl.so.2 /lib/libpthread.so.0 /lib/librt.so.1 /lib/libm.so.6 /usr/lib/libxcb.so.1 /usr/lib/libXau.so.6 /usr/lib/libXdmcp.so.6 |
Quote:
Quote:
|
Quote:
The reason I used 6.6.8 is because that's the kernel I currently have installed, and it was after updating to 6.6.15 that people needed an extra patch to build the nvidia module. |
Or you could use Alien Bob's old multilib glibc-2.38. Google found a mirror not upgraded yet: https://www.slackjeff.com.br/multilib/current/. If you check the packages against the gpg signatures, it should be safe.
|
Thanks, I had tried searching for old versions but google just kept sending me to Eric's site, and archive.org only had 2.37. Eric still has the signatures up on his site so I can use them to verify.
|
Finding those old packages made things much easier :)
I have just reinstalled Eric's original versions (verified the md5sums) and now 32bit glxinfo and steam are working fine again. Just before, I did recompile glibc using kernel headers 5.15.145 from Slackware-15.0 since it was easy to install them but that glibc also caused a segfault. So there seems to be something else different about those 2.38 packages. GCC hasn't been updated since August 2023 so shouldn't be that. Maybe binutils makes a difference? But Arch is also using binutils-2.42. The working versions for me are: glibc-profile-2.38_multilib-x86_64-3alien.txz glibc-i18n-2.38_multilib-x86_64-3alien.txz aaa_glibc-solibs-2.38_multilib-x86_64-3alien.txz glibc-2.38_multilib-x86_64-3alien.txz |
I have just rebuilt binutils-2.41 but without the binutils-readelf-other-sym-info.patch.gz patch which seems to have been added for the 2.42 build.
I then rebuilt glibc-2.38 again using my binutils-2.41 and kernel-headers 5.15. This glibc 2.38 is also working with 32bit GLX. So now I'm not sure if the problem is binutil-2.42, the binutils-readelf-other-sym-info.patch.gz patch, or does it just work because I built it while I already had Eric's original glibc-2.38 installed? So many possibilities :) I guess the next thing to try is update everything except binutils and then recompile glibc-2.39 using binutils-2.41. |
https://slackware.uk/cumulative/ Does this help out any?
So if glibc 2.39 is the issue, could it be something with our build? I'm still stuck on arch having binutils 2.42 and glibc 2.39 and no problems reported... That would indicate an issue with us, correct? (And why Christesrun isn't having problems.) |
Quote:
If Christesrun is using an old version of the nvidia driver it might not be using libglvnd and programs are just linked directly to the nvidia libGLX. The crash is happening when libglvnd tries to load the nvidia libGLX. I have just updated my system again now apart from binutils (it looks like a lot of compat32 updates are there now too). After the update 32 bit glx is broken again. So now I will rebuild glibc-2.39 using binutils-2.41 and see what happens. edit: glibc-2.39 built with binutils-2.41 + kernel-headers 6.6.15 works. So next is to try binutils-2.42 without the readelf patch. |
https://gitlab.archlinux.org/archlin...ls/-/tree/main Could be something to it. They don't use the readelf patch.
|
Quote:
Since they only used the gold-warn-unsupported patch in arch I tried building binutils-2.42 with only that patch but that also resulted in a bad glibc. I now got a good glibc-2.39 by using binutils-2.41 with all but the readelf patch. So far I have: Code:
original glibc-2.38 + binutils 2.41 some patches + kernel 5.15 -> good glibc-2.38 I have uploaded my working glibc-2.39 which was compiled with binutils-2.41 and headers 6.6.15 to http://135.125.183.217/glibc/ in case anyone wanted to test if it works for them. At your own risk of course :) |
Hrm. I wonder why we need the readelf patch? (Is Pat lurking? Some insight would be interesting.)
|
Quote:
edit: just tried again building binutils-2.42 with all except readelf patch, and rebuilding glibc starting with a working glibc this time and the result is a broken glibc again. So it looks like binutils-2.42 is causing the problem somehow. |
Quote:
Code:
# Purpose: Changes readelf so that when it displays extra information about |
Quote:
|
Quote:
While looking at the Arch build script I saw the comment Quote:
|
Quote:
But maybe you see changes in md5sum between a working and broken libc-2.39.so ? |
I don't think there's ever been a gcc rebuild before/after glibc? There was a giant mass rebuild a couple years ago, though.
|
Quote:
Code:
#0 0xf7f872b3 in _dl_open () from /lib/ld-linux.so.2 Code:
266ebd09c97e73790a2f8b4004fbcac5 /lib/libdl-2.39.so I think I should try installing my binutils-2.41 glibc again, then build binutils-2.42 with all the Slackware patches, and then rebuild gcc _before_ building glibc again. I haven't compiled gcc since about 1999 on a Pentium 166Mhz, hopefully it doesn't take as long as it did back then :) |
Quote:
|
Quote:
Code:
-rwxr-xr-x 1 root root 244836 Feb 5 16:54 ./ld-2.39.so* (bad) edit: the libc sizes are also the same, but md5sums different edit2: I did objdump -D on them and diff and there are a lot of changes to the instructions, so the difference isn't just some version string |
All times are GMT -5. The time now is 11:02 AM. |