Skip to content

Broken Nix and NixOS binaries due to linker errors #6563

Closed as not planned
Closed as not planned

Description

@jakubgs

Describe the bug

On one of my hosts after a rebuild I lost the ability to use ANY Nix commands because of this error:

 > nix --verison
nix: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0:
  version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)

It happens for other binaries too:

 > sudo nixos-rebuild boot   
building the system configuration...
nix: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0:
  version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)s
 > nix-store --version
nix-store: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0:
  version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)

Steps To Reproduce

No clue whatsoever.

Expected behavior

It doesn't explode.

nix-env --version output

 > nix-env --version
nix-env: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0:
  version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)

Additional context
I managed to find that some older versions of Nix do work:

 > which nix
/run/current-system/sw/bin/nix

 > ls -l /run/current-system/sw/bin/nix                                   
lrwxrwxrwx 1 root root 61 Jan  1  1970 /run/current-system/sw/bin/nix -> /nix/store/y6daxy2r6l2w8afpqw8dmxks71p9v8va-nix-2.7.0/bin/nix

 > /nix/store/y6daxy2r6l2w8afpqw8dmxks71p9v8va-nix-2.7.0/bin/nix --version
/nix/store/y6daxy2r6l2w8afpqw8dmxks71p9v8va-nix-2.7.0/bin/nix: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0:
  version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)

 > find /nix/store -maxdepth 1 -iname '*nix-2.7.0'                        
/nix/store/7c4cp4pj389j8rmrc40x5sq6csf0m8ks-nix-2.7.0
/nix/store/h538v75x5xgwzy31s5ia3ah7k6cdyzmy-nix-2.7.0
/nix/store/v2f9abhmmvk2slns100c2h696d5xj4gm-nix-2.7.0
/nix/store/rvwxh34igy78fzgjwr3z1biygpbxn66h-nix-2.7.0
/nix/store/y6daxy2r6l2w8afpqw8dmxks71p9v8va-nix-2.7.0

 > /nix/store/7c4cp4pj389j8rmrc40x5sq6csf0m8ks-nix-2.7.0/bin/nix --version
nix (Nix) 2.7.0

I also tried verifying and repairing Nix store, but that did nothing:

 > sudo /nix/store/7c4cp4pj389j8rmrc40x5sq6csf0m8ks-nix-2.7.0/bin/nix-store \
      --verify --check-contents --repair
reading the Nix store...
checking path existence...
checking link hashes...
checking store hashes...

Activity

  1. Kha commented on May 23, 2022

    @Kha
    Contributor

    Do you have LD_PRELOAD or LD_LIBRARY_PATH set by any chance? NixOS/nixpkgs#327854

  2. jakubgs commented on May 23, 2022

    @jakubgs
    Author

    I do not:

     > echo $LD_PRELOAD
    
     > echo $LD_LIBRARY_PATH
    
     > nix --version
    nix: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0: version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)
    
  3. nixos-discourse commented on May 23, 2022

    @nixos-discourse
  4. fogti commented on May 25, 2022

    @fogti
    Contributor

    with which nixpkgs (against which the broken nix is built) version is this happening?

  5. jakubgs commented on May 25, 2022

    @jakubgs
    Author

    Right now it's NixOS/nixpkgs@2d474d6, but I also used NixOS/nixpkgs@79385ae and it was broken.

  6. jakubgs commented on Jun 1, 2022

    @jakubgs
    Author

    Oh boy, now I've seen it on another host, except it's the nix-daemon this time:

     > sudo journalctl -n4 -u nix-daemon
    -- Journal begins at Sun 2022-02-13 15:58:27 EET, ends at Wed 2022-06-01 17:58:44 EEST. --
    Jun 01 17:58:29 arael systemd[1]: Started Nix Daemon.
    Jun 01 17:58:29 arael nix-daemon[1248862]: nix-daemon: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0: version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)
    Jun 01 17:58:29 arael systemd[1]: nix-daemon.service: Main process exited, code=exited, status=1/FAILURE
    Jun 01 17:58:29 arael systemd[1]: nix-daemon.service: Failed with result 'exit-code'.
    

    That can't be good...

  7. jakubgs commented on Jun 1, 2022

    @jakubgs
    Author

    This is weird, when I try to run nix-daemon with strace -f and filter for libpthread I see this:

     > strace -f /nix/store/gjr9ylm023rl9di484g1wxcd1jp84xxv-nix-2.8.1/bin/nix-daemon 2>&1 | grep libpthread             
    openat(AT_FDCWD, "/nix/store/gjr9ylm023rl9di484g1wxcd1jp84xxv-nix-2.8.1/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/pkxyfwarcq081rybpbnprjmnkiy1cz6g-libsodium-1.0.18/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/r6mrf9pz4dpax6rcszcmbyrpsk8j6saz-editline-1.17.1/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/ppm63lvkyfa58sgcnr2ddzh14dy1k9fn-boehm-gc-8.0.6/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/sgw2i15l01rwxzj62745h30bsjmh7wc1-lowdown-0.11.1-lib/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/glibc-hwcaps/x86-64-v3/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/glibc-hwcaps/x86-64-v2/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/tls/x86_64/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/tls/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/tls/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/tls/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/x86_64/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
    writev(2, [{iov_base="/nix/store/gjr9ylm023rl9di484g1w"..., iov_len=68}, {iov_base=": ", iov_len=2}, {iov_base="/nix/store/bvy2z17rzlvkx2sj7fy99"..., iov_len=78}, {iov_base=": ", iov_len=2}, {iov_base="version `GLIBC_PRIVATE' not foun"..., iov_len=121}, {iov_base="\n", iov_len=1}], 6/nix/store/gjr9ylm023rl9di484g1wxcd1jp84xxv-nix-2.8.1/bin/nix-daemon: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0: version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)
    

    But when I filter for librt I get this:

     > strace -f /nix/store/gjr9ylm023rl9di484g1wxcd1jp84xxv-nix-2.8.1/bin/nix-daemon 2>&1 | grep librt.so.1      
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/glibc-hwcaps/x86-64-v3/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/glibc-hwcaps/x86-64-v2/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/x86_64/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/x86_64/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
    writev(2, [{iov_base="/nix/store/gjr9ylm023rl9di484g1w"..., iov_len=68}, {iov_base=": ", iov_len=2}, {iov_base="/nix/store/bvy2z17rzlvkx2sj7fy99"..., iov_len=78}, {iov_base=": ", iov_len=2}, {iov_base="version `GLIBC_PRIVATE' not foun"..., iov_len=121}, {iov_base="\n", iov_len=1}], 6/nix/store/gjr9ylm023rl9di484g1wxcd1jp84xxv-nix-2.8.1/bin/nix-daemon: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0: version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)
    

    Why is that in one case glibc-2.34-210 is being searched, and in another glibc-2.33-123? That doesn't seem right.

  8. jakubgs commented on Jun 1, 2022

    @jakubgs
    Author

    I don't get what's happening here:

     > $SAFENIX/bin/nix show-derivation -r /nix/store/gjr9ylm023rl9di484g1wxcd1jp84xxv-nix-2.8.1 > nix-2.8.1.drv
    
     > grep glibc-2.34-210 nix-2.8.1.drv | wc -l   
    75
    
     > grep glibc-2.33-123 nix-2.8.1.drv | wc -l
    0
    

    Where is the glibc-2.33-123 coming from?

  9. added a commit that references this issue on Jun 1, 2022
  10. jakubgs commented on Jun 1, 2022

    @jakubgs
    Author

    I've managed to fix it by reverting back to nix_2_7 from nixos-21.11 channel.

    Previously I was using nixos-unstable at f1c167688a6f81f4a51ab542e5f476c8c595e457 and pulling nix_2_8 from it.

    Bad idea apparently. Though it worked fine on most of my hosts, just two had issue.

  11. Kha commented on Jun 1, 2022

    @Kha
    Contributor

    For what it's worth, I believe LD_DEBUG=all ldd nix gives much more helpful output in such cases

  12. jakubgs commented on Jun 1, 2022

    @jakubgs
    Author

    Indeed it does. That's a helpful tip, thanks @Kha. Here's what I got:
    https://gist.github.com/jakubgs/d050192b1c55e8cc0ab9143856ffee3b
    The most interesting parts might be:

       1279546:	file=librt.so.1 [0];  needed by /nix/store/vbhnjr79d7lmlay5ayyiapm0l03lf0pc-malloc-provider-scudo/lib/libclang_rt.scudo-x86_64.so [0]
       1279546:	find library=librt.so.1 [0]; searching
       1279546:	 search path=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/glibc-hwcaps/x86-64-v3:/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/glibc-hwcaps/x86-64-v2:/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/haswell/x86_64:/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/haswell:/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/x86_64:/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls:/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/haswell/x86_64:/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/haswell:/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/x86_64:/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib		(system search path)
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/glibc-hwcaps/x86-64-v3/librt.so.1
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/glibc-hwcaps/x86-64-v2/librt.so.1
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/haswell/x86_64/librt.so.1
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/haswell/librt.so.1
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/x86_64/librt.so.1
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/tls/librt.so.1
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/haswell/x86_64/librt.so.1
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/haswell/librt.so.1
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/x86_64/librt.so.1
       1279546:	  trying file=/nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1
    
       1279546:	checking for version `GLIBC_2.3.2' in file /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0 [0] required by file /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1 [0]
       1279546:	checking for version `GLIBC_PRIVATE' in file /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0 [0] required by file /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1 [0]
       1279546:	/nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0: error: version lookup error: version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1) (continued)
    /run/current-system/sw/bin/nix: /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0: version `GLIBC_PRIVATE' not found (required by /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1)
       1279546:	checking for version `GLIBC_2.2.5' in file /nix/store/bvy2z17rzlvkx2sj7fy99ajm853yv898-glibc-2.34-210/lib/libpthread.so.0 [0] required by file /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/librt.so.1 [0]
    

    Not sure what to make of it though.

  13. Kha commented on Jun 1, 2022

    @Kha
    Contributor

    Are you using the NixOS option environment.memoryAllocator.provider? malloc-provider-scudo is definitely not a default dependency of nix.

    nix shell github:NixOS/nixpkgs/f1c167688a6f81f4a51ab542e5f476c8c595e457#nixVersions.nix_2_8 -c ldd $(which nix)
    	linux-vdso.so.1 (0x00007ffc69dc4000)
    	libsodium.so.23 => /nix/store/c6inislcbc0g5c0i4ck0a0pmkskar1sg-libsodium-1.0.18/lib/libsodium.so.23 (0x00007ff1b9015000)
    	libeditline.so.1 => /nix/store/2npn6mbl8fx14df3avk7sgplr7aaif3c-editline-1.17.1/lib/libeditline.so.1 (0x00007ff1b9009000)
    	libnixexpr.so => /nix/store/6mjgljq8sm9bsz6k22as5ar3jw78644m-nix-2.8.1/lib/libnixexpr.so (0x00007ff1b8d83000)
    	libgc.so.1 => /nix/store/8930fqjjypcnqgraxrbgnym64vvi8dmk-boehm-gc-8.0.4/lib/libgc.so.1 (0x00007ff1b8aff000)
    	libnixmain.so => /nix/store/6mjgljq8sm9bsz6k22as5ar3jw78644m-nix-2.8.1/lib/libnixmain.so (0x00007ff1b8aa9000)
    	libnixfetchers.so => /nix/store/6mjgljq8sm9bsz6k22as5ar3jw78644m-nix-2.8.1/lib/libnixfetchers.so (0x00007ff1b89a6000)
    	libnixstore.so => /nix/store/6mjgljq8sm9bsz6k22as5ar3jw78644m-nix-2.8.1/lib/libnixstore.so (0x00007ff1b85a2000)
    	libnixutil.so => /nix/store/6mjgljq8sm9bsz6k22as5ar3jw78644m-nix-2.8.1/lib/libnixutil.so (0x00007ff1b8459000)
    	libnixcmd.so => /nix/store/6mjgljq8sm9bsz6k22as5ar3jw78644m-nix-2.8.1/lib/libnixcmd.so (0x00007ff1b83b0000)
    	libstdc++.so.6 => /nix/store/paqfl70z4zxip8lvpsijbspi0y2wzg4i-gcc-10.3.0-lib/lib/libstdc++.so.6 (0x00007ff1b81db000)
    	libm.so.6 => /nix/store/nprym6lf8lzhp1irb42lb4vp8069l5rj-glibc-2.32-54/lib/libm.so.6 (0x00007ff1b8096000)
    	libgcc_s.so.1 => /nix/store/nprym6lf8lzhp1irb42lb4vp8069l5rj-glibc-2.32-54/lib/libgcc_s.so.1 (0x00007ff1b807c000)
    	libpthread.so.0 => /nix/store/nprym6lf8lzhp1irb42lb4vp8069l5rj-glibc-2.32-54/lib/libpthread.so.0 (0x00007ff1b805b000)
    	libc.so.6 => /nix/store/nprym6lf8lzhp1irb42lb4vp8069l5rj-glibc-2.32-54/lib/libc.so.6 (0x00007ff1b7e9a000)
    	/nix/store/nprym6lf8lzhp1irb42lb4vp8069l5rj-glibc-2.32-54/lib/ld-linux-x86-64.so.2 => /nix/store/lyl6nysc3i3aqhj6shizjgj0ibnf1pvg-glibc-2.34-210/lib64/ld-linux-x86-64.so.2 (0x00007ff1b9073000)
    	libboost_context.so.1.69.0 => /nix/store/6mjgljq8sm9bsz6k22as5ar3jw78644m-nix-2.8.1/lib/libboost_context.so.1.69.0 (0x00007ff1b7e94000)
    	libdl.so.2 => /nix/store/nprym6lf8lzhp1irb42lb4vp8069l5rj-glibc-2.32-54/lib/libdl.so.2 (0x00007ff1b7e8d000)
    	libcrypto.so.1.1 => /nix/store/b4bclrfy1jljzvic10qv5iymw68mzrc0-openssl-1.1.1l/lib/libcrypto.so.1.1 (0x00007ff1b7ba0000)
    	libsqlite3.so.0 => /nix/store/8jn2afds8gxpz5zq3dd667j2mrcjlch8-sqlite-3.35.5/lib/libsqlite3.so.0 (0x00007ff1b7a5e000)
    	libcurl.so.4 => /nix/store/nizz9fc4wd7qs916x9y343rg80vya4hp-curl-7.76.1/lib/libcurl.so.4 (0x00007ff1b79c0000)
    	libaws-cpp-sdk-transfer.so => /nix/store/jy3gc3sdyd8j2ylw346f5zw2bn3705gd-aws-sdk-cpp-1.8.121/lib/libaws-cpp-sdk-transfer.so (0x00007ff1b798b000)
    	libaws-cpp-sdk-s3.so => /nix/store/jy3gc3sdyd8j2ylw346f5zw2bn3705gd-aws-sdk-cpp-1.8.121/lib/libaws-cpp-sdk-s3.so (0x00007ff1b76c6000)
    	libaws-cpp-sdk-core.so => /nix/store/jy3gc3sdyd8j2ylw346f5zw2bn3705gd-aws-sdk-cpp-1.8.121/lib/libaws-cpp-sdk-core.so (0x00007ff1b75aa000)
    	libseccomp.so.2 => /nix/store/whfwl7jbf4n45zxa9rl53d4hdwx67abn-libseccomp-2.5.1-lib/lib/libseccomp.so.2 (0x00007ff1b7587000)
    	libbrotlienc.so.1 => /nix/store/69x2irfhvhscdb61j51qda7l93jzlim3-brotli-1.0.9-lib/lib/libbrotlienc.so.1 (0x00007ff1b74e5000)
    	libbrotlidec.so.1 => /nix/store/69x2irfhvhscdb61j51qda7l93jzlim3-brotli-1.0.9-lib/lib/libbrotlidec.so.1 (0x00007ff1b74d7000)
    	libarchive.so.13 => /nix/store/sg1nhv53f5skcb20566kpr8jqfv7cnjl-libarchive-3.5.2-lib/lib/libarchive.so.13 (0x00007ff1b740c000)
    	libcpuid.so.15 => /nix/store/l4k6scch9g55v1g9j347ninn7k5g096q-libcpuid-0.5.1/lib/libcpuid.so.15 (0x00007ff1b73f2000)
    	librt.so.1 => /nix/store/nprym6lf8lzhp1irb42lb4vp8069l5rj-glibc-2.32-54/lib/librt.so.1 (0x00007ff1b73e5000)
    	libz.so.1 => /nix/store/b48mzk6yf4i897zzy0waqybdkv7ws227-zlib-1.2.11/lib/libz.so.1 (0x00007ff1b73c8000)
    	libnghttp2.so.14 => /nix/store/fkxbprfwzz14509236621bfvj9xwq6dg-nghttp2-1.43.0-lib/lib/libnghttp2.so.14 (0x00007ff1b739a000)
    	libssh2.so.1 => /nix/store/pla78sns8gz0l0picyajgmgrcfp4m2k5-libssh2-1.9.0/lib/libssh2.so.1 (0x00007ff1b7359000)
    	libssl.so.1.1 => /nix/store/b4bclrfy1jljzvic10qv5iymw68mzrc0-openssl-1.1.1l/lib/libssl.so.1.1 (0x00007ff1b72c0000)
    	libgssapi_krb5.so.2 => /nix/store/cd91x4x64ijzyxapqp68c8i6q1r66pri-libkrb5-1.18/lib/libgssapi_krb5.so.2 (0x00007ff1b726d000)
    	libkrb5.so.3 => /nix/store/cd91x4x64ijzyxapqp68c8i6q1r66pri-libkrb5-1.18/lib/libkrb5.so.3 (0x00007ff1b7193000)
    	libk5crypto.so.3 => /nix/store/cd91x4x64ijzyxapqp68c8i6q1r66pri-libkrb5-1.18/lib/libk5crypto.so.3 (0x00007ff1b7163000)
    	libcom_err.so.3 => /nix/store/cd91x4x64ijzyxapqp68c8i6q1r66pri-libkrb5-1.18/lib/libcom_err.so.3 (0x00007ff1b715d000)
    	libaws-c-event-stream.so.1.0.0 => /nix/store/x8lng14s9w4qpasdcqj3zlfaf6ajnlkq-aws-c-event-stream-0.2.7/lib/libaws-c-event-stream.so.1.0.0 (0x00007ff1b7144000)
    	libaws-c-io.so.1.0.0 => /nix/store/3zi155ps4sf8y1h2yp6wbghvhpk1h6d6-aws-c-io-0.9.1/lib/libaws-c-io.so.1.0.0 (0x00007ff1b7110000)
    	libs2n.so => /nix/store/yyc3wki6rx2kfhfa7vg37rk1zgxzwpc0-s2n-tls-1.0.0/lib/libs2n.so (0x00007ff1b6ff1000)
    	libaws-c-cal.so.1.0.0 => /nix/store/pjcrnw6yk4y7793yxz231nslq3ar31lj-aws-c-cal-0.4.5/lib/libaws-c-cal.so.1.0.0 (0x00007ff1b6fe3000)
    	libaws-checksums.so.1.0.0 => /nix/store/6dgkss765krj2x8k7cj1b1gnxvjxnm8f-aws-checksums-0.1.11/lib/libaws-checksums.so.1.0.0 (0x00007ff1b6fd3000)
    	libaws-c-common.so.1 => /nix/store/71ifgy0c7w99kprfxi7iiv85f2bm7c7p-aws-c-common-0.5.5/lib/libaws-c-common.so.1 (0x00007ff1b6f9e000)
    	libbrotlicommon.so.1 => /nix/store/69x2irfhvhscdb61j51qda7l93jzlim3-brotli-1.0.9-lib/lib/libbrotlicommon.so.1 (0x00007ff1b6f7b000)
    	libacl.so.1 => /nix/store/vxnh0p57lh7xvsbvd6mr7rb7dmk6j2la-acl-2.3.0/lib/libacl.so.1 (0x00007ff1b6f6e000)
    	liblzma.so.5 => /nix/store/r8ba12j6x2771jd1q252xgq2iflcrw3g-xz-5.2.5/lib/liblzma.so.5 (0x00007ff1b6f44000)
    	libzstd.so.1 => /nix/store/2qd7zgbsdsbf4gwlap2nhsb5da00rw86-zstd-1.4.9/lib/libzstd.so.1 (0x00007ff1b6e8c000)
    	libbz2.so.1 => /nix/store/zix9d9fqc4k1jn6gc6510c25irnziav1-bzip2-1.0.6.0.2/lib/libbz2.so.1 (0x00007ff1b6e79000)
    	libxml2.so.2 => /nix/store/lm88rijmrs98k3svxlypwll0p23zp2zc-libxml2-2.9.12/lib/libxml2.so.2 (0x00007ff1b6d0b000)
    	libkrb5support.so.0 => /nix/store/cd91x4x64ijzyxapqp68c8i6q1r66pri-libkrb5-1.18/lib/libkrb5support.so.0 (0x00007ff1b6cf9000)
    	libkeyutils.so.1 => /nix/store/0l8kkiv0d31hwh2f4x6142drcdibhx7n-keyutils-1.6.3-lib/lib/libkeyutils.so.1 (0x00007ff1b6cf2000)
    	libresolv.so.2 => /nix/store/nprym6lf8lzhp1irb42lb4vp8069l5rj-glibc-2.32-54/lib/libresolv.so.2 (0x00007ff1b6cda000)
    	libattr.so.1 => /nix/store/6sh733l9nz46j5bnbndybndl4s35dg7k-attr-2.4.48/lib/libattr.so.1 (0x00007ff1b6cd2000)
    
  14. jakubgs commented on Jun 1, 2022

    @jakubgs
    Author

    Not to my knowledge, no, I can't find it anywhere in my config.

  15. 2 remaining items

  16. jakubgs commented on Jun 2, 2022

    @jakubgs
    Author

    Actually, I can't fix this on one of my hosts because when I try to nixos-rebuild boot it explodes without a reason:

     > export SAFE_NIXOS_REBUILD=/nix/store/2f2f40g6x74rf7ff48kmcdznxj1k8y49-nixos-rebuild
    
     > sudo $SAFE_NIXOS_REBUILD/bin/nixos-rebuild build                                  
    building the system configuration...
    
     > sudo $SAFE_NIXOS_REBUILD/bin/nixos-rebuild boot 
    building the system configuration...
    /nix/store/0d3wgx8x6dxdb2cpnq105z23hah07z7l-bash-5.1-p16/bin/bash: symbol lookup error: /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
    warning: error(s) occurred while switching to the new configuration
    

    Not sure how I'm supposed to switch/boot into a fixed NixOS generation.

  17. jakubgs commented on Jun 2, 2022

    @jakubgs
    Author

    I can't even activate the newly built system:

     > ls -l /nix/var/nix/profiles/ | grep 22.05            
    lrwxrwxrwx 1 root root 87 Jun  2 15:37 system-63-link -> /nix/store/m8xl6dfsb2kh7w9fyak5bvad6szpmb0c-nixos-system-bardiel-22.05.20220531.08950a6
    
     > /nix/var/nix/profiles/system-63-link/activate        
    /nix/store/0d3wgx8x6dxdb2cpnq105z23hah07z7l-bash-5.1-p16/bin/bash: symbol lookup error: /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
    
     > sudo nixos-enter --system /nix/var/nix/profiles/system-63-link --root /
    /nix/store/0d3wgx8x6dxdb2cpnq105z23hah07z7l-bash-5.1-p16/bin/bash: symbol lookup error: /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
    /nix/var/nix/profiles/system/sw/bin/bash: symbol lookup error: /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
    

    I'm worried rebooting the host will break things if I nixos-rebuild boot doesn't properly run.

  18. cstich commented on Jun 5, 2022

    @cstich

    I'm worried rebooting the host will break things if I nixos-rebuild boot doesn't properly run.

    At least I ended up with a broken generation and the reboot failed. I could boot into an old one for what it is worth.

  19. jakubgs commented on Jun 6, 2022

    @jakubgs
    Author

    I guess that's one way to do it, boot into an older generation and try to rebuild using new stable Nix.

    Although, I don't think I know a way to switch grub config to and older generation, and I can't boot it on Hetzner without requesting a KVM. I think I'll just have to get a KVM. I guess I can just manually try editing grub.cfg to change the default.

  20. jakubgs commented on Jun 6, 2022

    @jakubgs
    Author

    Well, I've booted into the oldest generation of the OS I have and it still has the issue, so I don't know how I'm supposed to fix this.

  21. jakubgs commented on Jun 6, 2022

    @jakubgs
    Author

    Oh for the love of Zeus. I booted into a kexec I built from a working system and it still fails:

    [root@kexec:~]# sudo nixos-install --flake /mnt/etc/nixos#bardiel
    warning: Git tree '/mnt/etc/nixos' is dirty
    copying channel...
    building the flake in git+file:///mnt/etc/nixos...
    warning: Git tree '/mnt/etc/nixos' is dirty
    installing the boot loader...
    /nix/store/0d3wgx8x6dxdb2cpnq105z23hah07z7l-bash-5.1-p16/bin/bash: symbol lookup error: /nix/store/rir9pf0kz1mb84x5bd3yr0fx415yy423-glibc-2.33-123/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
    chroot: failed to run command ‘systemd-tmpfiles’: No such file or directory
    chroot: failed to run command ‘/run/current-system/bin/switch-to-configuration’: No such file or directory
    

    I literally cannot even.

  22. Kha commented on Jun 6, 2022

    @Kha
    Contributor

    Can't you just (temporarily) remove the /etc/ld-nix.so.preload? Not using the custom allocator shouldn't break anything.

  23. jakubgs commented on Jun 6, 2022

    @jakubgs
    Author

    I ended up purging everything from /mnt(root) aside from /etc/nixos and a few others look /boot{1,2} and also disabled the hardened profile, and ran nixos-install. I've managed to install a working system that has a functional nixos-rebuild.

    That was VERY annoying.

  24. jakubgs commented on Jun 6, 2022

    @jakubgs
    Author

    After booting back in my system I re-enabled the hardened profile, but while using stable version of nix_2_8, and it's back:

     > sudo nixos-rebuild switch
    building the system configuration...
    updating GRUB 2 menu...
    /nix/store/bcwyhqvik6jhcklib33v6kykdl4zp9d4-bash-5.1-p8/bin/bash: /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/mfqn6scafbp6fhrrwyj12hzr20yrkxsv-malloc-provider-scudo/lib/libclang_rt.scudo-x86_64.so)
    /nix/store/bcwyhqvik6jhcklib33v6kykdl4zp9d4-bash-5.1-p8/bin/bash: /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/g9x3cm8wdmpm86pyiff6arx8skmdwkn7-gcc-11.3.0-lib/lib/libstdc++.so.6)
    failed to create initrd secrets: No such file or directory
    warning: error(s) occurred while switching to the new configuration
    

    So it appears the issue is with the hardened profile, and the unstable Nix version was just a red herring.

  25. jakubgs commented on Jun 6, 2022

    @jakubgs
    Author

    And indeed, after re-enabling hardened profile but explicitly setting this:

      environment.memoryAllocator.provider = "libc";

    Now it works fine after reboot, so as you suggested correctly, this was indeed the issue.

  26. jakubgs commented on Jun 7, 2022

    @jakubgs
    Author

    Interestingly, on another host I tried your suggestion and I backed up the ld-nix.so.preload symlink:

     > sudo nixos-rebuild boot
    building the system configuration...
    warning: Git tree '/home/jakubgs/nixos' is dirty
    /nix/store/0d3wgx8x6dxdb2cpnq105z23hah07z7l-bash-5.1-p16/bin/bash: symbol lookup error: /nix/store/kq5mfvarbjar95xahcf7kd5mfkc64qz3-glibc-2.33-78/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
    warning: error(s) occurred while switching to the new configuration
    
     > sudo mv /etc/ld-nix.so.preload /etc/ld-nix.so.preload_bkp
    
     > sudo nixos-rebuild boot
    building the system configuration...
    warning: Git tree '/home/jakubgs/nixos' is dirty
    updating GRUB 2 menu...
    

    Which allowed the Grub config to be updated and me to reboot into a fresh installation with working Nix.

  27. roberth commented on Jul 25, 2025

    @roberth
    Member

    Thank you for sharing your solution!
    I'll close this as it's not actionable, but it can still be found using issue search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions