!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

817 Members
For people hacking on the Nix package manager itself176 Servers

Load older messages


SenderMessageTime
2 May 2025
@zmitchell:matrix.orgzmitchell joined the room.20:16:07
@zmitchell:matrix.orgzmitchell

Hey all, I'm working on a bug I encountered related to a race condition between GC processes, but I'm a little stuck on a C++ thing (not my forte). All links will be to 2.24.12 since that's what I'm on at the moment, but I suspect the error is still present in recent versions.

If the GC socket is disconnected, you get errno = 32 here, and you throw SysError: https://github.com/NixOS/nix/blob/f22359ba1af6d976d248318aa14e6a6326682f5c/src/libutil/unix/file-descriptor.cc#L43

So, you would expect that to get caught in addTempRoot here: https://github.com/NixOS/nix/blob/f22359ba1af6d976d248318aa14e6a6326682f5c/src/libstore/gc.cc#L135

However, if I put some debug("I'm here")-style comments in that catch block, I don't see the exception caught. I know that the exception is being throw in writeFull because I can put a try-catch block around the body, catch the SysError, throw a std::exception instead, and catch that at this location in addTempRoot. It seems like "throw SysError here, catch SysError there" should be pretty straightforward, but it's not working, and I'm out of my C++-depth if there are any nuances involved.

20:22:37
@zmitchell:matrix.orgzmitchell I worked on this with Tom yesterday, and I'm planning to put together a PR once I know why this exception isn't being caught. 20:25:06
3 May 2025
@tomberek:matrix.orgtomberekPerhaps related to SysError being templated?18:42:16
@hexa:lossy.networkhexahttps://hydra.nixos.org/build/29602155121:36:42
@hexa:lossy.networkhexai686-gnu.nix.x86_64-linux is still allocating a build slot for 3 days21:37:06
@hexa:lossy.networkhexawondering if anyone feels responsible for that package21:37:22
@hexa:lossy.networkhexa

:: (nixbld13) → 
  UID     PID    PPID STIME     TIME COMMAND
30013  978082  977874 Apr30 00:00:00 bash -e /nix/store/vj1c3wf9c11a0qs6p3ymfvrnsdgsdcbq-source-stdenv.sh /nix/store/shkw4qm9qcw5sc5n1k5jznc83ny02r39-default-builder.sh
30013 2051738  978082 Apr30 00:01:09 /nix/store/fqm9bqqlmaqqr02qbalm1bazp810qfiw-python3-3.12.9/bin/python3.12 /nix/store/jvcm0xph04gl36xmwclfkg26736javak-meson-1.7.0/bin/meson test --no-rebuild --p
30013 2051835 2051738 Apr30 00:00:00 /nix/store/9nw8b61s8lfdn8fkabxhbz0s775gjhbr-bash-5.2p37/bin/bash -x -e -u -o pipefail gc-auto.sh
30013 2054090  978082 Apr30 00:00:00 /nix/store/9nw8b61s8lfdn8fkabxhbz0s775gjhbr-bash-5.2p37/bin/bash -x -e -u -o pipefail gc-non-blocking.sh
30013 2054096 2054090 Apr30 00:00:00 nix-store --gc -vvvvv
21:53:03
@hexa:lossy.networkhexa *
:: (nixbld13) → 
  UID     PID    PPID STIME     TIME COMMAND
30013  978082  977874 Apr30 00:00:00 bash -e /nix/store/vj1c3wf9c11a0qs6p3ymfvrnsdgsdcbq-source-stdenv.sh /nix/store/shkw4qm9qcw5sc5n1k5jznc83ny02r39-default-builder.sh
30013 2051738  978082 Apr30 00:01:09 /nix/store/fqm9bqqlmaqqr02qbalm1bazp810qfiw-python3-3.12.9/bin/python3.12 /nix/store/jvcm0xph04gl36xmwclfkg26736javak-meson-1.7.0/bin/meson test --no-rebuild --p
30013 2051835 2051738 Apr30 00:00:00 /nix/store/9nw8b61s8lfdn8fkabxhbz0s775gjhbr-bash-5.2p37/bin/bash -x -e -u -o pipefail gc-auto.sh
30013 2054090  978082 Apr30 00:00:00 /nix/store/9nw8b61s8lfdn8fkabxhbz0s775gjhbr-bash-5.2p37/bin/bash -x -e -u -o pipefail gc-non-blocking.sh
30013 2054096 2054090 Apr30 00:00:00 nix-store --gc -vvvvv
21:53:07
@jfly:matrix.orgJeremy Fleischman (jfly) joined the room.22:20:35
4 May 2025
@tomberek:matrix.orgtomberek@hex... testing with a Nixpkgs for now (i'm getting the 403 on Hydra: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36)00:29:45
@tomberek:matrix.orgtomberek * hexa: ... testing with a Nixpkgs for now (i'm getting the 403 on Hydra: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36) 00:29:54
@hexa:lossy.networkhexasorry, but I had to ban older chromium versions due to abuse00:30:51
@hexa:lossy.networkhexawe have 136 on master00:31:12
@hexa:lossy.networkhexabut 135 is also allowed00:31:15
@tomberek:matrix.orgtomberekgot it... I guess i'm due to upgrade00:31:28
@hexa:lossy.networkhexabots are basically enumerating all kinds of software versions, so I'm only allowing recent ones00:31:33
@tomberek:matrix.orgtomberekGC tests not ending seems to be an issue.. encountered it some where... we can add a timeout to fail faster. I'm poking into the gc system (see above, Zach's post), might be similar.00:35:26
@tomberek:matrix.orgtombereki get the same deadlock on gc-auto.sh and gc-non-blocking.sh00:39:16
@hexa:lossy.networkhexayeah, adding a timeout would be appreciated01:40:58
@dramforever:matrix.orgdramforever @tomberek:matrix.org @hexa:lossy.network just for the record i am fairly certain "gc" is a red herring, the cause is actually https://github.com/NixOS/nix/issues/13042 08:38:42
@dramforever:matrix.orgdramforeveri don't know how meson works in a nixpkgs build so i think everyone would appreciate some meson wizards check it out08:39:35
@dramforever:matrix.orgdramforeveralthough, i suppose these two are just tests that wait forever for a build to succeed, we could probably just patch the test scripts to not do that08:41:31
@martin:push-f.commartin joined the room.09:52:44
@martin:push-f.commartinThe README links the #nix:nixos.org Matrix channel but when I try to join I get an error that it doesn't exist. Shouldn't this rather suggest #users:nixos.org for user support and this channel for development?09:57:01
@martin:push-f.commartin(I'm not entirely sure that the channel doesn't exist ... perhaps sth is broken with my Matrix client/server.)09:58:35
@martin:push-f.commartin

Also in the 2nd last section of the CONTRIBUTING.md there's:

For larger changes see the Nix reference manual.

And Nix reference manual is linked to https://nix.dev/manual/nix/development/development/contributing.html which gives me a 403 Forbidden error.

10:01:39
@k900:0upti.meK900 It should, yes 10:02:13
@k900:0upti.meK900 Are you using some sort of weird web browser? 10:02:20
@martin:push-f.commartinNo ... I'm using Firefox.10:02:33

Show newer messages


Back to Room ListRoom Version: 6