-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
Describe the bug
While running nix-build -A pkgsMusl.zfs in a very fresh checkout of nixpkgs, nix-daemon crashed?
● nix-daemon.service - Nix Daemon
Loaded: loaded (/etc/systemd/system/nix-daemon.service; linked; preset: ignored)
Drop-In: /nix/store/lv3nxjjyag6vj5i0awnh66ia3frv4v2y-system-units/nix-daemon.service.d
└─overrides.conf
Active: active (running) since Sun 2025-11-09 01:27:11 EST; 3min 3s ago
Invocation: ccb2a8c268b54067a5bcd361f4c3fbea
TriggeredBy: ● nix-daemon.socket
Docs: man:nix-daemon
https://nixos.org/manual
Main PID: 20907 (nix-daemon)
IP: 1.3G in, 28.7M out
IO: 250.8M read, 0B written
Tasks: 29 (limit: 1048576)
Memory: 204.3M (peak: 281.1M)
CPU: 2min 30.154s
CGroup: /system.slice/nix-daemon.service
└─supervisor
├─20907 nix-daemon --daemon
└─22817 nix-daemon 22800
Nov 09 01:27:11 desktop systemd[1]: Started Nix Daemon.
Nov 09 01:27:11 desktop nix-daemon[20907]: accepted connection from pid 20880, user user
Nov 09 01:28:50 desktop nix-daemon[20924]: nix-daemon: ../build/derivation-goal.cc:186: nix::Goal::Co nix::DerivationGoal::haveDerivation(): Assertion `buildResult.builtOutputs.count(wantedOutput) > 0' failed.
Nov 09 01:28:51 desktop systemd-coredump[22591]: Process 20924 (nix-daemon) of user 0 dumped core.
Module libtbbmalloc.so.2 without build-id.
Module libkeyutils.so.1 without build-id.
Module libkrb5support.so.0 without build-id.
Module libcom_err.so.3 without build-id.
Module libk5crypto.so.3 without build-id.
Module libkrb5.so.3 without build-id.
Module libunistring.so.5 without build-id.
Module libattr.so.1 without build-id.
Module libpcre2-8.so.0 without build-id.
Module libllhttp.so.9.3 without build-id.
Module libaws-cpp-sdk-sts.so without build-id.
Module libaws-cpp-sdk-cognito-identity.so without build-id.
Module libaws-c-common.so.1 without build-id.
Module libaws-c-sdkutils.so.1.0.0 without build-id.
Module libaws-c-compression.so.1.0.0 without build-id.
Module libaws-checksums.so.1.0.0 without build-id.
Module libaws-c-cal.so.1.0.0 without build-id.
Module libs2n.so.1 without build-id.
Module libaws-c-io.so.1.0.0 without build-id.
Module libaws-c-http.so.1.0.0 without build-id.
Module libaws-c-auth.so.1.0.0 without build-id.
Module libaws-c-s3.so.0unstable without build-id.
Module libaws-c-event-stream.so.1.0.0 without build-id.
Module libaws-c-mqtt.so.1.0.0 without build-id.
Module libaws-crt-cpp.so without build-id.
Module libgssapi_krb5.so.2 without build-id.
Module libpsl.so.5 without build-id.
Module libssh2.so.1 without build-id.
Module libidn2.so.0 without build-id.
Module libnghttp2.so.14 without build-id.
Module libngtcp2.so.16 without build-id.
Module libngtcp2_crypto_ossl.so.0 without build-id.
Module libnghttp3.so.9 without build-id.
Module libicuuc.so.76 without build-id.
Module libicui18n.so.76 without build-id.
Module libicudata.so.76 without build-id.
Module libboost_system.so.1.87.0 without build-id.
Module libboost_random.so.1.87.0 without build-id.
Module libboost_regex.so.1.87.0 without build-id.
Module libbrotlicommon.so.1 without build-id.
Module libtbb.so.12 without build-id.
Module libxml2.so.16 without build-id.
Module liblzma.so.5 without build-id.
Module libz.so.1 without build-id.
Module libbz2.so.1 without build-id.
Module libzstd.so.1 without build-id.
Module libacl.so.1 without build-id.
Module libeditline.so.1 without build-id.
Module liblowdown.so.2 without build-id.
Module libgit2.so.1.9 without build-id.
Module libaws-cpp-sdk-core.so without build-id.
Module libaws-cpp-sdk-identity-management.so without build-id.
Module libaws-cpp-sdk-s3.so without build-id.
Module libaws-cpp-sdk-transfer.so without build-id.
Module libseccomp.so.2 without build-id.
Module libboost_url.so.1.87.0 without build-id.
Module libboost_iostreams.so.1.87.0 without build-id.
Module libboost_context.so.1.87.0 without build-id.
Module libcpuid.so.17 without build-id.
Module libbrotlienc.so.1 without build-id.
Module libbrotlidec.so.1 without build-id.
Module libblake3.so.0 without build-id.
Module libarchive.so.13 without build-id.
Module libgcc_s.so.1 without build-id.
Module libstdc++.so.6 without build-id.
Stack trace of thread 20924:
#0 0x00007fce80c63aac __pthread_kill_implementation (libc.so.6 + 0x9caac)
#1 0x00007fce80c0890e raise (libc.so.6 + 0x4190e)
#2 0x00007fce80bef942 abort (libc.so.6 + 0x28942)
#3 0x00007fce80bef85e __assert_fail_base.cold (libc.so.6 + 0x2885e)
#4 0x00007fce80c006f7 __assert_fail (libc.so.6 + 0x396f7)
#5 0x00007fce8180985f _ZN3nix14DerivationGoal14haveDerivationEPZNS0_14haveDerivationEvE47_ZN3nix14DerivationGoal14haveDerivationEv.Frame.actor (libnixstore.so + 0x15085f)
#6 0x00007fce8180c660 _ZN3nix4Goal4workEv (libnixstore.so + 0x153660)
#7 0x00007fce8181f84e _ZN3nix6Worker3runERKSt3setISt10shared_ptrINS_4GoalEENS_15CompareGoalPtrsESaIS4_EE (libnixstore.so + 0x16684e)
#8 0x00007fce81815b30 _ZN3nix5Store10buildPathsERKSt6vectorINS_11DerivedPathESaIS2_EENS_9BuildModeESt10shared_ptrIS0_E (libnixstore.so + 0x15cb30)
#9 0x00007fce81830913 _ZN3nix6daemonL9performOpEPNS0_12TunnelLoggerENS_3refINS_5StoreEEENS_11TrustedFlagENS0_13RecursiveFlagERNS_11WorkerProto21BasicServerConnectionENS8_2OpE (libnixstore.so + 0x177913)
#10 0x00007fce81833090 _ZN3nix6daemon17processConnectionENS_3refINS_5StoreEEEONS_8FdSourceEONS_6FdSinkENS_11TrustedFlagENS0_13RecursiveFlagE (libnixstore.so + 0x17a090)
#11 0x0000561ed77973e0 _ZNSt17_Function_handlerIFvvEZL10daemonLoopSt8optionalIN3nix11TrustedFlagEEEUlvE_E9_M_invokeERKSt9_Any_data (/nix/store/4bj1dkqa8w1xdl3phxx4nhh2fbl1s0pa-nix-2.31.2/bin/nix + 0x1973e0)
#12 0x00007fce81b864c9 _ZNSt17_Function_handlerIFvvEZN3nix12startProcessESt8functionIS0_ERKNS1_14ProcessOptionsEEUlvE_E9_M_invokeERKSt9_Any_data.lto_priv.0 (libnixutil.so + 0x1084c9)
#13 0x00007fce81b7d2a8 _ZN3nixL6doForkEbRSt8functionIFvvEE (libnixutil.so + 0xff2a8)
#14 0x00007fce81b815d0 _ZN3nix12startProcessESt8functionIFvvEERKNS_14ProcessOptionsE (libnixutil.so + 0x1035d0)
#15 0x0000561ed7795d75 _ZL10daemonLoopSt8optionalIN3nix11TrustedFlagEE (/nix/store/4bj1dkqa8w1xdl3phxx4nhh2fbl1s0pa-nix-2.31.2/bin/nix + 0x195d75)
#16 0x0000561ed77971c8 _ZL15main_nix_daemoniPPc (/nix/store/4bj1dkqa8w1xdl3phxx4nhh2fbl1s0pa-nix-2.31.2/bin/nix + 0x1971c8)
#17 0x0000561ed77480e5 _ZN3nix11mainWrappedEiPPc (/nix/store/4bj1dkqa8w1xdl3phxx4nhh2fbl1s0pa-nix-2.31.2/bin/nix + 0x1480e5)
#18 0x00007fce8115727a _ZN3nix16handleExceptionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFvvEE (libnixmain.so + 0x2d27a)
#19 0x0000561ed76b334b main (/nix/store/4bj1dkqa8w1xdl3phxx4nhh2fbl1s0pa-nix-2.31.2/bin/nix + 0xb334b)
#20 0x00007fce80bf14d8 __libc_start_call_main (libc.so.6 + 0x2a4d8)
#21 0x00007fce80bf159b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a59b)
#22 0x0000561ed76b77f5 _start (/nix/store/4bj1dkqa8w1xdl3phxx4nhh2fbl1s0pa-nix-2.31.2/bin/nix + 0xb77f5)
Stack trace of thread 21264:
#0 0x00007fce7f6b7a07 lzma_decode (liblzma.so.5 + 0x1fa07)
#1 0x00007fce7f6b9f1b lzma2_decode (liblzma.so.5 + 0x21f1b)
#2 0x00007fce7f6b0fea decode_buffer (liblzma.so.5 + 0x18fea)
#3 0x00007fce7f6a72c0 block_decode (liblzma.so.5 + 0xf2c0)
#4 0x00007fce7f6a9b15 stream_decode (liblzma.so.5 + 0x11b15)
#5 0x00007fce7f69cdcf lzma_code (liblzma.so.5 + 0x4dcf)
#6 0x00007fce80b25fdc xz_filter_read (libarchive.so.13 + 0x35fdc)
#7 0x00007fce80b1a886 __archive_read_filter_ahead (libarchive.so.13 + 0x2a886)
#8 0x00007fce80b4cf81 archive_read_format_raw_read_data (libarchive.so.13 + 0x5cf81)
#9 0x00007fce80b1a09b archive_read_data (libarchive.so.13 + 0x2a09b)
#10 0x00007fce81b183b2 _ZN3nix26ArchiveDecompressionSource4readEPcm (libnixutil.so + 0x9a3b2)
#11 0x00007fce81b5f731 _ZN3nix6Source9drainIntoERNS_4SinkE (libnixutil.so + 0xe1731)
#12 0x00007fce81b181f6 _ZNSt17_Function_handlerIFvRN3nix6SourceEEZNS0_21makeDecompressionSinkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_4SinkEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_ (libnixutil.so + 0x9a1f6)
#13 0x00007fce81b5eec0 _ZN5boost7context6detail11fiber_entryINS1_12fiber_recordINS0_5fiberENS0_21basic_fixedsize_stackINS0_12stack_traitsEEEZNS_11coroutines26detail14push_coroutineIbE13control_blockC4IS7_ZZN3nix12sourceToSinkESt8functionIFvRNSE_6SourceEEEEN12SourceToSinkclESt17basic_string_viewIcSt11char_traitsIcEEEUlRNS9_14pull_coroutineIbEEE_EENS0_12preallocatedEOT_OT0_EUlOS4_E_EEEEvNS1_10transfer_tE (libnixutil.so + 0xe0ec0)
#14 0x00007fce802c418f make_fcontext (libboost_context.so.1.87.0 + 0x118f)
#15 0x0000200000000000 n/a (n/a + 0x0)
ELF object binary architecture: AMD x86-64
I captured stack trace information with coredumpctl gdb
GNU gdb (GDB) 16.3
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /nix/store/4bj1dkqa8w1xdl3phxx4nhh2fbl1s0pa-nix-2.31.2/bin/nix...
(No debugging symbols found in /nix/store/4bj1dkqa8w1xdl3phxx4nhh2fbl1s0pa-nix-2.31.2/bin/nix)
warning: Can't open file /root/.cache/nix/binary-cache-v7.sqlite-shm during file-backed mapping note processing
[New LWP 20924]
[New LWP 21264]
[New LWP 21479]
[New LWP 21655]
[New LWP 21122]
[New LWP 21939]
[New LWP 21719]
[New LWP 21544]
[New LWP 21794]
[New LWP 21896]
[New LWP 20935]
[New LWP 21097]
[New LWP 21948]
[New LWP 21971]
[New LWP 21949]
[New LWP 21973]
[New LWP 21981]
[New LWP 20925]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/daamdpmaz2vjvna55ccrc30qw3qb8h6d-glibc-2.40-66/lib/libthread_db.so.1".
Core was generated by `/nix/store/4bj1dkqa8w1xdl3phxx4nhh2fbl1s0pa-nix-2.31.2/bin/nix-daemon 20880'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007fce80c63aac in __pthread_kill_implementation ()
from /nix/store/daamdpmaz2vjvna55ccrc30qw3qb8h6d-glibc-2.40-66/lib/libc.so.6
[Current thread is 1 (Thread 0x7fce7c43c280 (LWP 20924))]
(gdb) bt
#0 0x00007fce80c63aac in __pthread_kill_implementation ()
from /nix/store/daamdpmaz2vjvna55ccrc30qw3qb8h6d-glibc-2.40-66/lib/libc.so.6
#1 0x00007fce80c0890e in raise ()
from /nix/store/daamdpmaz2vjvna55ccrc30qw3qb8h6d-glibc-2.40-66/lib/libc.so.6
#2 0x00007fce80bef942 in abort ()
from /nix/store/daamdpmaz2vjvna55ccrc30qw3qb8h6d-glibc-2.40-66/lib/libc.so.6
#3 0x00007fce80bef85e in __assert_fail_base.cold ()
from /nix/store/daamdpmaz2vjvna55ccrc30qw3qb8h6d-glibc-2.40-66/lib/libc.so.6
#4 0x00007fce80c006f7 in __assert_fail ()
from /nix/store/daamdpmaz2vjvna55ccrc30qw3qb8h6d-glibc-2.40-66/lib/libc.so.6
#5 0x00007fce8180985f in nix::DerivationGoal::haveDerivation(nix::DerivationGoal::haveDerivation()::_ZN3nix14DerivationGoal14haveDerivationEv.Frame*) [clone .actor] ()
from /nix/store/6rcja5n4p68i8cb00dscazq17ai1h9zk-nix-store-2.31.2/lib/libnixstore.so
#6 0x00007fce8180c660 in nix::Goal::work() ()
from /nix/store/6rcja5n4p68i8cb00dscazq17ai1h9zk-nix-store-2.31.2/lib/libnixstore.so
#7 0x00007fce8181f84e in nix::Worker::run(std::set<std::shared_ptr<nix::Goal>, nix::CompareGoalPtrs, std::allocator<std::shared_ptr<nix::Goal> > > const&) ()
from /nix/store/6rcja5n4p68i8cb00dscazq17ai1h9zk-nix-store-2.31.2/lib/libnixstore.so
#8 0x00007fce81815b30 in nix::Store::buildPaths(std::vector<nix::DerivedPath, std::allocator<nix::DerivedPath> > const&, nix::BuildMode, std::shared_ptr<nix::Store>) ()
from /nix/store/6rcja5n4p68i8cb00dscazq17ai1h9zk-nix-store-2.31.2/lib/libnixstore.so
#9 0x00007fce81830913 in nix::daemon::performOp(nix::daemon::TunnelLogger*, nix::ref<nix::Store>, nix::TrustedFlag, nix::daemon::RecursiveFlag, nix::WorkerProto::BasicServerConnection&, nix::WorkerProto::Op) ()
from /nix/store/6rcja5n4p68i8cb00dscazq17ai1h9zk-nix-store-2.31.2/lib/libnixstore.so
#10 0x00007fce81833090 in nix::daemon::processConnection(nix::ref<nix::Store>, nix::FdSource&&, nix::FdSink&&, nix::TrustedFlag, nix::daemon::RecursiveFlag) ()
from /nix/store/6rcja5n4p68i8cb00dscazq17ai1h9zk-nix-store-2.31.2/lib/libnixstore.so
#11 0x0000561ed77973e0 in std::_Function_handler<void (), daemonLoop(std::optional<nix::TrustedFlag>)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#12 0x00007fce81b864c9 in std::_Function_handler<void (), nix::startProcess(std::function<void ()>, nix::ProcessOptions const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) [clone .lto_priv.0] ()
from /nix/store/v658ljw1q7dhd527j7wl798lzwvx1db1-nix-util-2.31.2/lib/libnixutil.so
#13 0x00007fce81b7d2a8 in nix::doFork(bool, std::function<void ()>&) ()
from /nix/store/v658ljw1q7dhd527j7wl798lzwvx1db1-nix-util-2.31.2/lib/libnixutil.so
--Type <RET> for more, q to quit, c to continue without paging--
ocessOptions const&) () from /nix/store/v658ljw1q7dhd527j7wl798lzwvx1db1-nix-util-2.31.2/lib/libnixutil.so
#15 0x0000561ed7795d75 in daemonLoop(std::optional<nix::TrustedFlag>) ()
#16 0x0000561ed77971c8 in main_nix_daemon(int, char**) ()
#17 0x0000561ed77480e5 in nix::mainWrapped(int, char**) ()
#18 0x00007fce8115727a in nix::handleExceptions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void ()>) ()
from /nix/store/3iyg8w1zb8x8xvignkvkl3wjpgl1lpfx-nix-main-2.31.2/lib/libnixmain.so
#19 0x0000561ed76b334b in main ()
I didn't save the output from the client-side, but it was something to the effect of... "nix-daemon went away".
I tried reproducing the crash by re-running the same command. But Nix didn't crash, it continued on building.
Steps To Reproduce
- Upgrade system to NixOS master branch -- 25.11.20251109.5fdec42 (Xantusia)
- git clone https://github.com/NixOS/nixpkgs.git
- cd nixpkgs
- nix-build -A pkgsMusl.zfs
Expected behavior
nix-daemon should not go away while client is connected and running a build
Metadata
nix-env (Nix) 2.31.2
Additional context
core dump here: https://mega.nz/file/PEsSzaDT#vauBTxMiMBlS1bYjkpmPWuspdzuDIbnAY18LEQFZrTc
Checklist
- checked latest Nix manual (source)
- checked open bug issues and pull requests for possible duplicates
Add 👍 to issues you find important.