!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

931 Members
For people hacking on the Nix package manager itself194 Servers

Load older messages


SenderMessageTime
1 Apr 2026
@dramforever:matrix.orgdramforever *

the recipe:

  • run two of while nix -vvv --min-free 512T --no-auto-optimise-store --store teststore/ build --no-link nixpkgs#pkgsCross.riscv64.hello ; do : ; done
  • run one of while nix -vvv --min-free 512T --no-auto-optimise-store --store teststore/ store gc; do : ; done

put them each in a tmux pane and watch the chaos unfold

15:21:37
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @dramforever:matrix.org
so if i have multiple nix processes on the same --store that each may build stuff and/or run gc, are these supposed to be synchronized?
Yeah that’s the idea. What’s exactly breaking?
15:30:53
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Pathlocks being messed up?15:31:48
@dramforever:matrix.orgdramforeverso firstly if the autogc thread is still running when the main thread exits the logger crashes. i've hacked this https://fars.ee/b2go to make it less likely to crash15:35:31
@dramforever:matrix.orgdramforeverand secondly... uh, readdir is not thread safe15:35:41
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Hm where are we doing readdir on the same fd?15:36:08
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)* Hm where are we doing readdir on the same fd from different threads?15:36:18
@dramforever:matrix.orgdramforeveroh, it's not thread safe in posix (yet)15:36:36
@dramforever:matrix.orgdramforeverbut should be fine on glibc, so scratch that15:36:43
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Hm I did see a crash in runtime roots scanning15:39:11
@dramforever:matrix.orgdramforever secondly i'm getting a sigsegv on this boost::regex_match https://github.com/NixOS/nix/blob/b8b3e37b38d2bcc4a4633bf2c7d67e60603308a6/src/libstore/local-gc.cc#L74 15:39:41
@dramforever:matrix.orgdramforeveri don't know why15:39:43
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Yeah that’s what I got too. It’s strange. Since it’s const surely there’s no way it’s not thread-safe right?15:40:26
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Right????15:40:33
@dramforever:matrix.orgdramforeveroh, i can't tell if the first hunk here is necessary15:40:53
@dramforever:matrix.orgdramforever anyway i made that if (procDir && false) 15:42:06
@dramforever:matrix.orgdramforeverit shouldn't matter, right? builder should do their own temproots15:42:14
@dramforever:matrix.orgdramforeverand now the real fun begins15:42:18
@dramforever:matrix.orgdramforever

these things probably have the same cause, i think - the build can have paths gc'd from under them

       > checking for riscv64-unknown-linux-gnu-gcc... riscv64-unknown-linux-gnu-gcc
       > checking whether the C compiler works... no
       > configure: error: in '/build/hello-2.12.3':
       > configure: error: C compiler cannot create executables
       > See 'config.log' for more details
terminating due to unexpected unrecoverable internal error: Assertion 'false' failed in nix::DerivationTrampolineGoal::init()::<lambda()> at ../src/libstore/build/derivation-trampoline-goal.cc:125
15:44:25
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Hm, that is on master right?15:44:52
@dramforever:matrix.orgdramforever b8b3e37b38d2bcc4a4633bf2c7d67e60603308a6 with #15469 merged in 15:45:40
@dramforever:matrix.orgdramforeverbut i think i managed to get similar things on 2.34.415:45:52
@dramforever:matrix.orgdramforever

this one is probably the fetcher thing?

       … while calling the 'import' builtin
         at /home/dram/code/config/flake.nix:53:24:
           52|     flake-utils.lib.eachDefaultSystem (system: {
           53|       legacyPackages = import nixpkgs {
             |                        ^
           54|         inherit system;

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: path '/nix/store/yxn9vm8hjp9j9vkn1979bh9rzg2gga94-source' is not valid
15:47:19
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Hm fetcher cache is busted in that regard yes15:47:45
@dramforever:matrix.orgdramforever yxn9v... is indeed supposed to be nixpkgs 15:48:13
@dramforever:matrix.orgdramforeveractually wait that's my flake15:48:27
@dramforever:matrix.orgdramforever* actually wait that's importing my flake15:48:41
@dramforever:matrix.orgdramforeveri lied lol nixpkgs on my computer is my flake 15:49:57
@dramforever:matrix.orgdramforeveri hope it's not relevant, i'll try again later with actual nixpkgs15:49:58
@dramforever:matrix.orgdramforever

here's another error from the gc process

finding garbage collector roots...
deleting garbage...
deleting '/nix/store/tmp-942181-1014327575'
1 store paths deleted, 0.0 KiB freed
error:
       … While deleting garbage in store directory "/home/dram/tmp/teststore/nix/store/tmp-942181-1014327575"

       error: opening directory "/home/dram/tmp/teststore/nix/store/tmp-942181-1014327575/x/pkgs/by-name/an/anime4k": No such file or directory
15:51:56

Show newer messages


Back to Room ListRoom Version: 6