Bug 2248915 - glibc: ldconfig writes an incomplete /etc/ld.so.cache file
Summary: glibc: ldconfig writes an incomplete /etc/ld.so.cache file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Florian Weimer
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-09 16:58 UTC by Mikhail
Modified: 2024-01-05 14:07 UTC (History)
12 users (show)

Fixed In Version: glibc-2.38.9000-21.fc40
Clone Of:
Environment:
Last Closed: 2024-01-05 14:07:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
build.log (1.21 MB, application/zip)
2023-11-10 20:04 UTC, Mikhail
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github ValveSoftware steam-for-linux issues 10209 0 None open Commit 2aa0974d2573441bffd596b07bff8698b1f2f18c in glibc breaks steam runtimes 2023-11-11 00:30:09 UTC

Description Mikhail 2023-11-09 16:58:58 UTC
Description of problem:
After update glibc to 2.38.9000-18.fc40 version stop working all Steam Runtimes.

/bin/sh\0-c\0/home/mikhail/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=391220 -- /home/mikhail/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/mikhail/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/home/mikhail/.local/share/Steam/steamapps/common/SteamLinuxRuntime'/scout-on-soldier-entry-point-v2 --  '/home/mikhail/.local/share/Steam/steamapps/common/Rise of the Tomb Raider/RiseOfTheTombRaider.sh'\0
chdir "/home/mikhail/.local/share/Steam/steamapps/common/Rise of the Tomb Raider"
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/home/mikhail/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier/pressure-vessel/bin/steam-runtime-launcher-interface-0: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
Uploaded AppInterfaceStats to Steam


python3: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/sh\0-c\0PROTON_LOG=1 /home/mikhail/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=2231380 -- /home/mikhail/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/mikhail/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper'/_v2-entry-point --verb=waitforexitandrun -- '/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental'/proton waitforexitandrun  '/home/mikhail/.local/share/Steam/steamapps/common/Ghost Recon Breakpoint/GRB_vulkan.exe' -uplay_steam_mode\0
chdir "/home/mikhail/.local/share/Steam/steamapps/common/Ghost Recon Breakpoint"
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/home/mikhail/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/pressure-vessel/bin/steam-runtime-launcher-interface-0: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
Uploaded AppInterfaceStats to Steam


python3: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/bin/sh\0-c\0PROTON_LOG=1 /home/mikhail/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1245620 -- /home/mikhail/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/mikhail/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper'/_v2-entry-point --verb=waitforexitandrun -- '/home/mikhail/.local/share/Steam/steamapps/common/Proton - Experimental'/proton waitforexitandrun  '/home/mikhail/.local/share/Steam/steamapps/common/ELDEN RING/Game/start_protected_game.exe'\0
chdir "/home/mikhail/.local/share/Steam/steamapps/common/ELDEN RING/Game"
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mikhail/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/home/mikhail/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/pressure-vessel/bin/steam-runtime-launcher-interface-0: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
Uploaded AppInterfaceStats to Steam


Version-Release number of selected component (if applicable):
Last good version is 2.38.9000-17.fc40

How reproducible:
Always.

Steps to Reproduce:
1. Update glibc to 2.38.9000-18.fc40 version
2. 
   a) Launch any Window game in Steam client with Proton compatibility layer.
   b) Or launch native Linux game in Steam client with "Steam Linux Runtime 1.0 (scount)"

Comment 1 Florian Weimer 2023-11-09 17:05:03 UTC
The libdl.so.2 file is still included in the glibc.i686 package:

https://koji.fedoraproject.org/koji/fileinfo?rpmID=36403687&filename=/lib/libdl.so.2

Could you post the output of these commands? Thanks.

stat /usr/lib/libdl.so.2 
rpm -V glibc

Comment 2 Mikhail 2023-11-09 17:28:14 UTC
Good glibc:
❯ stat /usr/lib/libdl.so.2
  File: /usr/lib/libdl.so.2
  Size: 14864     	Blocks: 32         IO Block: 4096   regular file
Device: 0,33	Inode: 21465982    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:lib_t:s0
Access: 2023-11-09 22:05:24.300432796 +0500
Modify: 2023-10-26 05:00:00.000000000 +0500
Change: 2023-11-09 22:05:24.263433585 +0500
 Birth: 2023-11-09 22:05:24.238434118 +0500
❯ rpm -V glibc


Bad glibc:
❯ stat /usr/lib/libdl.so.2
  File: /usr/lib/libdl.so.2
  Size: 14864     	Blocks: 32         IO Block: 4096   regular file
Device: 0,33	Inode: 21470273    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:lib_t:s0
Access: 2023-11-09 22:25:59.351234949 +0500
Modify: 2023-11-07 05:00:00.000000000 +0500
Change: 2023-11-09 22:25:59.310235798 +0500
 Birth: 2023-11-09 22:25:59.282236378 +0500
❯ rpm -V glibc

Comment 3 Mikhail 2023-11-10 20:04:49 UTC
Created attachment 1998476 [details]
build.log

I wanna make bisect but stuck with problem failing tests of glibc.

❯ git bisect good dd32e1db38
You need to start by "git bisect start"

Do you want me to do it for you [Y/n]? Y
status: waiting for both good and bad commits
status: waiting for bad commit, 1 good commit known
❯ git bisect bad 5dd3bda59c
Bisecting: 26 revisions left to test after this (roughly 5 steps)
[2bd00179885928fd95fcabfafc50e7b5c6e660d2] AArch64: Add support for MOPS memcpy/memmove/memset




  > /builddir/build/BUILD/glibc-2.38.9000-207-g2bd0017988/build-i686-redhat-linux/tests.sum
UNSUPPORTED: elf/tst-cet-legacy-8
UNSUPPORTED: elf/tst-cet-property-2
UNSUPPORTED: elf/tst-env-setuid
UNSUPPORTED: elf/tst-env-setuid-tunables
XPASS: elf/tst-ifunc-isa-1
XPASS: elf/tst-ifunc-isa-1-static
XPASS: elf/tst-ifunc-isa-2
XPASS: elf/tst-ifunc-isa-2-static
FAIL: math/test-float-hypot
FAIL: math/test-float32-hypot
UNSUPPORTED: misc/tst-adjtimex
UNSUPPORTED: misc/tst-adjtimex-time64
UNSUPPORTED: misc/tst-clock_adjtime
UNSUPPORTED: misc/tst-clock_adjtime-time64
UNSUPPORTED: misc/tst-ntp_adjtime
UNSUPPORTED: misc/tst-ntp_adjtime-time64
UNSUPPORTED: misc/tst-ttyname-namespace
UNSUPPORTED: nptl/test-cond-printers
UNSUPPORTED: nptl/test-condattr-printers
UNSUPPORTED: nptl/test-mutex-printers
UNSUPPORTED: nptl/test-mutexattr-printers
UNSUPPORTED: nptl/test-rwlock-printers
UNSUPPORTED: nptl/test-rwlockattr-printers
UNSUPPORTED: nptl/tst-pthread-gdb-attach
UNSUPPORTED: nptl/tst-pthread-gdb-attach-static
FAIL: nptl/tst-robust1
FAIL: nptl/tst-robust3
FAIL: nptl/tst-robust4
FAIL: nptl/tst-robust6
FAIL: nptl/tst-robust7
FAIL: nptl/tst-robust9
FAIL: nptl/tst-robustpi8
UNSUPPORTED: posix/tst-cet-vfork-1
UNSUPPORTED: posix/tst-spawn-cgroup
UNSUPPORTED: stdlib/tst-secure-getenv
UNSUPPORTED: string/tst-memchr-rtm
UNSUPPORTED: string/tst-memcmp-rtm
UNSUPPORTED: string/tst-memmove-rtm
UNSUPPORTED: string/tst-memrchr-rtm
UNSUPPORTED: string/tst-memset-rtm
UNSUPPORTED: string/tst-strcasecmp-rtm
UNSUPPORTED: string/tst-strchr-rtm
UNSUPPORTED: string/tst-strcmp-rtm
UNSUPPORTED: string/tst-strcpy-rtm
UNSUPPORTED: string/tst-strlen-rtm
UNSUPPORTED: string/tst-strncasecmp-rtm
UNSUPPORTED: string/tst-strncmp-rtm
UNSUPPORTED: string/tst-strrchr-rtm
UNSUPPORTED: string/tst-wcscmp-rtm
UNSUPPORTED: string/tst-wcsncmp-rtm
UNSUPPORTED: time/tst-clock_settime
UNSUPPORTED: time/tst-clock_settime-time64
UNSUPPORTED: time/tst-settimeofday
UNSUPPORTED: time/tst-settimeofday-time64
UNSUPPORTED: time/tst-strftime4
UNSUPPORTED: time/tst-y2039
Summary of test results:
      9 FAIL
   4826 PASS
     43 UNSUPPORTED
     16 XFAIL
      4 XPASS
make[1]: *** [Makefile:664: tests] Error 1
make[1]: Leaving directory '/builddir/build/BUILD/glibc-2.38.9000-207-g2bd0017988'
make: *** [Makefile:9: check] Error 2
+ test -n tests.sum
+ grep -Eq '^\s+=== Summary of results ===$' rpmbuild.check.log
+++ pwd
++ basename /builddir/build/BUILD/glibc-2.38.9000-207-g2bd0017988/build-i686-redhat-linux
+ echo 'FAIL: test suite build of target: build-i686-redhat-linux'
FAIL: test suite build of target: build-i686-redhat-linux
+ exit 1
error: Bad exit status from /var/tmp/rpm-tmp.i9uMx7 (%check)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.i9uMx7 (%check)
Finish: rpmbuild glibc-2.38.9000-20.fc40.src.rpm
Finish: build phase for glibc-2.38.9000-20.fc40.src.rpm
ERROR: Exception(/home/mikhail/rpmbuild/SRPMS/glibc-2.38.9000-20.fc40.src.rpm) Config(fedora-rawhide-i686) 65 minutes 44 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-i686/result
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M c3be84fa196146028b868216b6310efa -D /var/lib/mock/fedora-rawhide-i686/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.nzrfjfgs:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin '--setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007"' '--setenv=PS1=<mock-chroot> \s-\v\$ ' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c '/usr/bin/rpmbuild -bb --noclean --target i686 --nodeps /builddir/build/SPECS/glibc.spec'

Comment 4 Florian Weimer 2023-11-10 20:14:22 UTC
I suggest to run mock with “--without testsuite --without benchtests” for bisecting, or perhaps change the default in the spec file.

Some of the nptl tests are flaky, they time out occasionally, especially on slower machines.

Comment 5 Mikhail 2023-11-11 00:11:00 UTC
Thanks, I found problem commit.


❯ git bisect good
2aa0974d2573441bffd596b07bff8698b1f2f18c is the first bad commit
commit 2aa0974d2573441bffd596b07bff8698b1f2f18c
Author: Florian Weimer <fweimer>
Date:   Fri Oct 20 14:29:50 2023 +0200

    elf: ldconfig should skip temporary files created by package managers
    
    This avoids crashes due to partially written files, after a package
    update is interrupted.
    
    Reviewed-by: Adhemerval Zanella <adhemerval.zanella>

 NEWS           |  4 +++-
 elf/ldconfig.c | 39 +++++++++++++++++++++++++++------------
 2 files changed, 30 insertions(+), 13 deletions(-)

Comment 6 Florian Weimer 2023-11-11 06:37:36 UTC
Thank you so much.  It's a rather embarrassing mistake:

  if (memchr (name, len, ';') != NULL)
    return true;

Comment 7 Florian Weimer 2023-11-11 11:35:19 UTC
Posted a fix upstream:

[PATCH v2] ldconfig: Fixes for skipping temporary files.
<https://inbox.sourceware.org/libc-alpha/87v8a83f9t.fsf@oldenburg.str.redhat.com/>

Also added it to glibc-2.38.9000-21.fc40 as a downstream patch.


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