| 26 Jun 2026 |
emily | uh | 19:33:19 |
emily | well whatever that is was a recent merge | 19:33:23 |
emily | libxml2… Grimmauld (any/all)? | 19:33:27 |
emily | oh wait isn't this just the GC bug | 19:33:33 |
emily | there's a GC bug right? | 19:33:38 |
hexa | could be | 19:33:41 |
hexa | we can retry | 19:33:50 |
emily | no libxml2 merges in a while | 19:33:55 |
Grimmauld (any/all) | github.com/NixOS/nixpkgs/pull/527525 was libxml2, and i did built to cmake and a bunch of python things on that | 19:39:08 |
emily | whatever it was would have had to be in the last day | 19:39:24 |
emily | so pretty sure it's just the bug | 19:39:28 |
emily | oh I wonder if I know what the bug is | 19:39:51 |
emily | I actually ran into a GC bug recently | 19:40:02 |
emily | is it already diagnosed? | 19:40:12 |
hexa | I'm building on the community builder in parallel | 19:40:29 |
emily | I believe structured attributes + remote builders can result in deps being GC'd mid-build | 19:40:31 |
emily | by it I mean the GC bug | 19:40:36 |
hexa | https://github.com/NixOS/infra/pull/1104 hm | 19:41:01 |
emily | ok, not the bug I was thinking of | 19:41:59 |
Sergei Zimmerman (xokdvium) | Remote builds are generally ugh... very racy yeah | 19:43:35 |
Sergei Zimmerman (xokdvium) | Some work to be done there certainly | 19:43:49 |
Sergei Zimmerman (xokdvium) | Specifically https://github.com/NixOS/nix/pull/15719, which I'll return to | 19:44:16 |
emily | tl;dr normally materialized .drv keeps deps of a running build alive; in remote build scenario you don't necessarily have .drv; you are saved by the fact that /proc/*/environ is used as gcroots; but with structured attrs your builder's root process's /proc/*/environ doesn't contain the paths | 19:44:22 |
emily | but it does contain paths to .attrs.json/.attrs.sh admittedly | 19:44:35 |
emily | BUT the builder user owns those and can delete them | 19:44:40 |
emily | so you can stash a path from your structured attrs, delete those files, wait for a GC, use after free | 19:44:54 |
Sergei Zimmerman (xokdvium) | The issue in question is probably that the build hook doesn't root inputs befory copying those over | 19:44:57 |
emily | (I forgot that you had to actually delete the structured attrs files to exploit this) | 19:45:07 |
emily | (which admittedly makes it unlikely to happen in the real world, but it's not great!) | 19:45:23 |
emily | oh I see dram is way ahead of me yeah | 19:45:52 |