!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

917 Members
For people hacking on the Nix package manager itself191 Servers

Load older messages


SenderMessageTime
18 Feb 2025
@jade_:matrix.orgjade_also recommended --max-jobs 017:12:24
@jade_:matrix.orgjade_the expected behaviour in such a case is that it will actually fail without the very modern --always-allow-substitutes set, which has an egregiously bad error message also17:13:09
@jade_:matrix.orgjade_ * 17:13:28
@jade_:matrix.orgjade_if that's not what happens, your daemon has diverged from the modern ones17:14:02
@jade_:matrix.orgjade_also if you want to not deal with an evaluator you can probably nix-copy-closure the drv files into $PWD/store before beginning the test substitution17:14:47
@roberthensing:matrix.orgroberthand https://github.com/NixOS/nix/pull/12503, to be upstreamed into nixpkgs too18:42:27
@emilazy:matrix.orgemily mra: fwiw our side of the ecosystem is on the way towards deprecating allowSubstitutes = false; (hence --always-allow-substitutes etc.) as not really useful in practice 22:40:38
@emilazy:matrix.orgemilynot sure whether Guix would have an easier time phasing it out than us, but if so it might be worth considering rather than fixing22:41:15
@emilazy:matrix.orgemily(I thought Guix had rewritten the daemon, 2012 nix-daemon sounds scary…)22:41:45
@emilazy:matrix.orgemily(there's been a good few CVEs since then)22:41:46
@elvishjerricco:matrix.orgElvishJerriccoWhy is it not really useful?23:19:32
@emilazy:matrix.orgemilythere's a bunch of discussion in https://github.com/NixOS/nix/issues/444223:20:23
@emilazy:matrix.orgemilyand tl;dr rationale in https://github.com/NixOS/nix/pull/8047 https://github.com/NixOS/nix/issues/368623:21:04
@emilazy:matrix.orgemily(mostly it just does not seem like "whether you can fetch a built result from a substituter" should be within the purview of a derivation anyway. hints to prefer building on a local machine are one thing)23:21:40
@jade_:matrix.orgjade_ guessing it is probably because guix cares far, far too mucha tremendous amount about licensing and so stuff like zfs integrated into a linux kernel is not something they consider ok to substitute 23:21:58
@emilazy:matrix.orgemily I somewhat doubt Guix has a zfs.ko package to begin with 23:24:23
@emilazy:matrix.orgemilybut in this case the bug report was about TeX Live23:24:29
@emilazy:matrix.orgemily (I'd expect hydraPlatforms/license to be disjoint from allowSubstitutes anyway? but I have no idea how they do things in Guixland :) ) 23:25:14
19 Feb 2025
@apteryx:matrix.orgapteryx there is one in the zfs package (its 'module' output). and indeed, looking into this is motivated by being able to reliably prevent fetching binaries which could constitute copyright violations, such as the combination of GPLv2 only linux modules with the zfs CDDL in a binary initrd, for example. 01:24:25
@apteryx:matrix.orgapteryxand the texlive issue (where apparently we aren't able to control that the way we thought it should work) appeared related, or worrying in that context :-)01:25:21
@apteryx:matrix.orgapteryxThanks for the pointers! It seems our 'guix-daemon' binary doesn't expose a --store argument :-/01:32:19
@apteryx:matrix.orgapteryx We do have --max-jobs though 01:32:38
@apteryx:matrix.orgapteryxI'll try setting it to 0 and see what it does. So far I'm following the daemon execution flow in GDB01:33:58
@apteryx:matrix.orgapteryx the --max-jobs=0 trick is useful, I think it causes builds to fail like: guix build: erreur : path /gnu/store/b5sn5ha961hab37r7vl5p2n6sf46x582-texlivetexmf-20240312' is not valid` 01:51:33
@apteryx:matrix.orgapteryxany idea how I can pretty print a nix::Goal shared pointer in GDB?02:16:03
@apteryx:matrix.orgapteryxa std::set containing such objects, I meant02:16:21
@apteryx:matrix.orgapteryx p goals looks like this: $5 = std::set with 1 element = {[0] = std::shared_ptr<nix::Goal> (use count 1, weak count 3) = {get() = 0x72d570}} 02:20:35
@apteryx:matrix.orgapteryxstarting to look like the problem is that buildPaths builds a lists of substitutable goals, which include the output of an unsubstitutable derivation:02:32:06
@apteryx:matrix.orgapteryx
2: *goal = {<std::enable_shared_from_this<nix::Goal>> = {_M_weak_this = std::weak_ptr<nix::Goal> (use count 2, weak count 3) = {get() = 0x5e29a0}}, _vptr.Goal = 0x4c75e0 <vtable for nix::SubstitutionGoal+16>, worker = @0x7fffffff85c0, waitees = std::set with 0 elements, waiters = std::__cxx11::list = {[0] = std::weak_ptr<nix::Goal> (use count 1, weak count 5) = {get() = 0x5b08f0}}, nrFailed = 0, nrNoSubstituters = 0, nrIncompleteClosure = 0, name = "substitution of `/gnu/store/b5sn5ha961hab37r7vl5p2n6sf46x582-texlivetexmf-20240312'", exitCode = nix::Goal::ecBusy}
(gdb) where
#0  nix::Worker::run (this=0x7fffffff85c0, _topGoals=std::set with 1 element = {...}) at nix/libstore/build.cc:3448
#1  0x00000000004659c9 in nix::LocalStore::buildPaths (this=0x55b4d0, drvPaths=std::set with 1 element = {...}, buildMode=nix::bmNormal) at nix/libstore/build.cc:3642
#2  0x000000000040ad6c in performOp (trusted=false, clientVersion=356, from=..., to=..., op=9) at nix/nix-daemon/nix-daemon.cc:481
#3  0x000000000040e01b in processConnection (trusted=false, userId=1000) at nix/nix-daemon/nix-daemon.cc:841
#4  0x000000000040e754 in operator() (__closure=0x524f50) at nix/nix-daemon/nix-daemon.cc:1003
#5  0x0000000000410fda in std::__invoke_impl<void, acceptConnection(int)::<lambda()>&>(std::__invoke_other, struct {...} &) (__f=...) at /gnu/store/d50i890p2lg97kvc131p62wy52krapbd-profile/include/c++/bits/invoke.h:61
#6  0x000000000040f718 in std::__invoke_r<void, acceptConnection(int)::<lambda()>&>(struct {...} &) (__fn=...) at /gnu/store/d50i890p2lg97kvc131p62wy52krapbd-profile/include/c++/bits/invoke.h:154
#7  0x000000000040f5db in std::_Function_handler<void(), acceptConnection(int)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /gnu/store/d50i890p2lg97kvc131p62wy52krapbd-profile/include/c++/bits/std_function.h:290
#8  0x0000000000441f00 in std::function<void()>::operator() (this=0x7fffffffaf10) at /gnu/store/d50i890p2lg97kvc131p62wy52krapbd-profile/include/c++/bits/std_function.h:590
#9  0x00000000004ab2ef in nix::startProcess (fun=..., dieWithParent=false, errorPrefix="unexpected build daemon error: ", runExitHandlers=true) at nix/libutil/util.cc:1025
#10 0x000000000040ed6b in acceptConnection (fdSocket=3) at nix/nix-daemon/nix-daemon.cc:977
#11 0x000000000040f40e in daemonLoop (sockets=std::vector of length 1, capacity 1 = {...}) at nix/nix-daemon/nix-daemon.cc:1055
#12 0x000000000040f4bd in run (sockets=std::vector of length 1, capacity 1 = {...}) at nix/nix-daemon/nix-daemon.cc:1064
#13 0x000000000041a262 in main (argc=12, argv=0x7fffffffc208) at nix/nix-daemon/guix-daemon.cc:569

02:32:14
@apteryx:matrix.orgapteryx texlivetexmf is a private package marked with #:substitutable? #f while texlive uses texlivetexmf as an input but isn't marked itself as non-substitutable. 02:34:11

Show newer messages


Back to Room ListRoom Version: 6