| 1 Aug 2021 |
Vladimír Čunát | Example:
nix build -f. nixosTests.gnome-xorg --dry-run
error: store path 'xdkj2bfhfdpx8r0k1dny29km3b6yyp9r-vm-test-run-gnome-xorg.drv!out' contains illegal character '!'
| 15:00:40 |
niksnut | Yeah that's a bug | 18:04:27 |
| 2 Aug 2021 |
Vladimír Čunát | So... should I be opening these as GH issues? One per a sufficiently different error, or all together? | 08:29:31 |
manveru | seems like i have some kind of race condition when adding packages to nix profiles at the same time: fatal: cannot copy '\''/nix/store/55wy09xjj463r1rdx8qy1b82y5kg3z1d-git-2.31.1/share/git-core/templates/hooks/pre-applypatch.sample'\'' to '\''/root/.cache/nix/gitv3/1nj7pkpa1rip8qyz7s8xv5k69maz0bk93drm0limrvl06xkvyjns/hooks/pre-applypatch.sample'\'': File exists | 09:33:22 |
manveru | it's not 100% reproducible, but happens within a nixos test quite often | 09:39:54 |
manveru | i assume the error is from git.cc where it might try to clone the same git repository at the same time... | 09:42:48 |
manveru | #!/usr/bin/env bash
url='git+ssh://github.com/NixOS/nix?ref=master&rev=087c5f5325c46485a9bc5f8e7f2620af6bf6bf56#nix'
rm -rf ~/.cache/nix
rm -f a* b*
nix profile install "$url" --profile a &
nix profile install "$url" --profile b &
wait
| 09:55:04 |
manveru | i think that's the easiest way to reproduce it reliably | 09:55:16 |
manveru | so i dug further, and the main issue is parallel execution of git init | 11:05:30 |
manveru | i can probably wrap the nix invocation in a flock, but i think the better way would be to replace https://github.com/NixOS/nix/blob/master/src/libfetchers/git.cc#L320 with an attempt to mkdir the repoDir and skip the init if it fails? | 11:07:23 |
manveru | atm it's just not atomic enough, and the createDirs only makes the parent directory of cacheDir, so that pathExists check will always pass until git is already invoked | 11:09:47 |
manveru | https://github.com/NixOS/nix/pull/5082 | 11:53:52 |
manveru | Eelco Dolstra: would be nice if you could take a look at this :) | 11:54:10 |
manveru | thanks a lot! | 14:34:17 |
pamplemousse | Is the daemon protocol documented somewhere? | 21:12:49 |
tomberek | not well last time I tried to interpret it. also see: https://github.com/NixOS/nix/issues/4655 | 21:14:03 |
andi- | In reply to @pamplemouss_:matrix.org Is the daemon protocol documented somewhere? It is not documented AFAIK. It isn't hard to implement just tedious. | 21:29:53 |
andi- | If you can read haskell there is this: https://github.com/haskell-nix/hnix-store/blob/master/hnix-store-remote/src/System/Nix/Store/Remote.hs | 21:31:13 |
andi- | otherwise just read the C++ code | 21:31:19 |
pamplemousse | In reply to @andi:kack.it otherwise just read the C++ code ^^ That's what I was doing, but eventually, I wondered if there was a spec at all | 21:38:22 |
andi- | What are you working on? | 21:38:36 |
pamplemousse | As part of https://discourse.nixos.org/t/tweag-fellowship-fuzzing-nix-0, I am at a point where I want to target the daemon. | 21:39:50 |
andi- | Neat. I've some rust code that exposes most of the store operations via commands... Code isn't public yet but I wanted to do that as well | 21:40:33 |
pamplemousse | Problem is, if I only send random data, it will take a while to mutate to discover new paths.
Also, if I only send structured input, I might miss some interesting errors (especially as there is no spec / everything is hand made). | 21:41:31 |
| 3 Aug 2021 |
| Gytis Ivaskevicius joined the room. | 10:10:15 |
Gytis Ivaskevicius | Pls review 🥺 👉️👈️
Mines:
https://github.com/NixOS/nix/pull/4914
Friends:
https://github.com/NixOS/nix/pull/4641
https://github.com/NixOS/nix/pull/4765 | 10:10:22 |
Gytis Ivaskevicius | (at this point I am being redirected from one channel to another just to get a review 😀 ) | 10:11:11 |
manveru | Eelco Dolstra: is there anything else needed for https://github.com/NixOS/nix/pull/4895 to get merged as well? | 10:32:43 |
Robert Hensing (roberth) | I will refrain from writing a rant about incremental fixes not getting merged | 11:25:50 |
Robert Hensing (roberth) | please merge manveru 's pr | 11:26:18 |