19 Sep 2024 |
Eelco | In reply to @puck:puck.moe I tried running an even more aggressive GC patch, and hit some other issues (nix-instantiate doesn't GC root the entire EvalState) In principle EvalState was never intended to be traced, instead any fields in there that hold GC-allocated pointers should be marked as RootValue or use traceable_allocator | 18:16:18 |
puck | yeah but that doesn't stop it containing an Env , which isn't marked as a root value | 18:16:46 |
Eelco | yeah that's wrong | 18:17:02 |
Eelco | also there are a few new fields like vStringRegular that look suspicious | 18:17:17 |
puck | In reply to @puck:puck.moe yeah but that doesn't stop it containing an Env , which isn't marked as a root value and it's been that way since 31428c3a06, or 2010 | 18:17:44 |
Eelco | might be okay | 18:17:45 |
puck | and EvalState is GC-root-allocated in the new Nix commands too | 18:17:59 |
puck | iirc nix repl hit the same bug ages ago | 18:18:07 |
Eelco | what Env are you referring to? | 18:19:06 |
puck | ah, i missed that that was fixed in may 2024 | 18:19:45 |
puck | f34b52b52163ec0db60dca6907f309acc45e2205 added .. a slightly wonky workaround for the Env &baseEnv | 18:19:58 |
Eelco | yeah | 18:20:13 |
Eelco | okay vString* should be fine since they don't allocate | 18:21:22 |
puck | (assuming it chooses the right override?) | 18:22:59 |
puck | it feels iffy to depend on that guarantee when it's entirely plausible someone could drop it later without realising that this depends on it | 18:23:25 |
Eelco | yeah we should rename that mkString to something else to make sure it's the right variant | 18:24:00 |
Eelco | mkStringStatic or whatever | 18:24:07 |
Eelco | actually it used to be called mkStringNoCopy ... | 18:24:35 |
Robert Hensing (roberth) | In reply to @puck:puck.moe f34b52b52163ec0db60dca6907f309acc45e2205 added .. a slightly wonky workaround for the Env &baseEnv my bad for the wonkiness; tried to too hard to keep the diff small, because churn becomes part of the discussion sometimes, unfortunately | 18:24:58 |
puck | In reply to @niksnut:matrix.org In principle EvalState was never intended to be traced, instead any fields in there that hold GC-allocated pointers should be marked as RootValue or use traceable_allocator it's hard to read these intentions from just the code, especially when other places do depend on this (and this conflicts with e.g. a previous PR that traced the EvalState to fix a variety of issues regarding random crashes in e.g. nix run and nix eval ?) | 18:28:28 |
puck | * it's hard to read these intentions from just the code, especially when other places do depend on this (and this conflicts with e.g. a previous PR that traced the EvalState to fix a variety of issues regarding random crashes in e.g. nix run and nix eval ) | 18:28:32 |
puck | * it's hard to read these intentions from just the code, especially when other places do seemingly depend on this (and this conflicts with e.g. a previous PR that traced the EvalState to fix a variety of issues regarding random crashes in e.g. nix run and nix eval ) | 18:31:14 |
Eelco | yeah that's fair | 18:31:43 |
20 Sep 2024 |
tomberek | Cool: https://www.zombiezen.com/blog/2024/09/zb-early-stage-build-system/ This sort of thing is good to see. Especially if we can support this type of usage as a library. ( @fricklerhandwerk:matrix.org: similar to what you've talked about before) | 03:24:47 |
aleksana (force me to bed after 18:00 UTC) | @[Robert Hensing (roberth)] @Eelco also one folk from Chinese group reported this which seems to be the same type of bug (but only triggered on hydra): https://github.com/NixOS/hydra/issues/1409 | 04:22:23 |
Mic92 | @aleksana:mozilla.org: afaik hydra-eval-jobs disables boehmgc | 05:20:23 |
Mic92 | And this bug was related to gcroots | 05:20:50 |
aleksana (force me to bed after 18:00 UTC) | I'll bump nix_2_24 now and wait a few days before we try to bump default version of Nix again, since it involves some other fixes | 05:22:44 |
Mic92 | I don't think your local nix version will change anything | 05:23:23 |
Mic92 | Hydra itself links against nix | 05:23:38 |