!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

255 Members
A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena87 Servers

Load older messages


SenderMessageTime
15 Jan 2022
@angerman:matrix.organgermanThere is no way to see the raw nix commands Coleman is calling?12:47:02
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @angerman:matrix.org
There is no way to see the raw nix commands Coleman is calling?

Not at the moment and I really should add a bunch of debug prints. You can manually evaluate from the repo with

nix-instantiate -E 'let eval = import ./src/nix/hive/eval.nix; hive = eval { rawHive = import ./path/to/your/hive.nix; }; in hive.nodes.helios64.config.system.build.toplevel'
12:53:51
@angerman:matrix.organgerman Zhaofeng Li: what I did try was -v2 but there seem to be no verbosity levels. 13:34:24
@angerman:matrix.organgerman

If I run

NIX_PATH=nixpkgs=https://github.com/NixOs/nixpkgs/archive/nixpkgs-21.11-darwin.tar.gz colmena build

I get

[INFO ] Using configuration: /Users/angerman/Projects/zw3rk/nixos-docker-sd-image-builder/hive.nix
[INFO ] Enumerating nodes...
error: The option `services.getty' defined in `/nix/store/c39y3z66vmr5q152998wymdi0zk7q8hh-source/nixos/modules/profiles/installation-device.nix' does not exist.
(use '--show-trace' to show detailed location information)
[ERROR] -----
[ERROR] Operation failed with error: Nix exited with error code: 1
13:34:54
@angerman:matrix.organgermanIf I run it with the same pin I set in the meta.nixpkgs attribute I get the segfault. The pin is from 20.09 or so, so somewhat older.13:35:43
@angerman:matrix.organgermanI'm not sure how that service.getty is getting in there though.13:36:07
@zhaofeng:zhaofeng.liZhaofeng Li Your Nixpkgs is mixed (20.09 didn't have services.getty - it was mingetty or something) 13:37:59
@zhaofeng:zhaofeng.liZhaofeng LiLet's first try invoking Nix manually and see if we can directly reproduce the segfault13:38:31
@angerman:matrix.organgermanso the host nixpkgs & the target nixpgks need to align?13:38:41
@zhaofeng:zhaofeng.liZhaofeng LiThere should just be one nixpkgs version. How are you pinning nixpkgs in your config?13:39:31
@angerman:matrix.organgerman meta.nixpkgs = import (fetchTarball { ... }); 13:40:00
@angerman:matrix.organgerman with nixops, I used to just set NIX_PATH=nixpgks=<pin> 13:40:19
@angerman:matrix.organgermanNIX_PATH=nixpkgs=https://github.com/NixOs/nixpkgs/archive/65c9cc79f1d179713c227bf447fb0dac384cdcda.tar.gz:colmena=https://github.com/zhaofengli/colmena/archive/main.tar.gz nix-instantiate -E 'let eval = import <colmena/src/nix/hive/eval.nix>; hive = eval { rawHive = import ./hive.nix; }; in hive.nodes.helios64.config.system.build.toplevel' 13:40:26
@angerman:matrix.organgerman * NIX_PATH=nixpkgs=https://github.com/NixOs/nixpkgs/archive/65c9cc79f1d179713c227bf447fb0dac384cdcda.tar.gz:colmena=https://github.com/zhaofengli/colmena/archive/main.tar.gz nix-instantiate -E 'let eval = import <colmena/src/nix/hive/eval.nix>; hive = eval { rawHive = import ./hive.nix; }; in hive.nodes.helios64.config.system.build.toplevel' keeps segfaulting 13:40:35
@angerman:matrix.organgerman * NIX_PATH=nixpkgs=https://github.com/NixOs/nixpkgs/archive/65c9cc79f1d179713c227bf447fb0dac384cdcda.tar.gz:colmena=https://github.com/zhaofengli/colmena/archive/main.tar.gz nix-instantiate -E 'let eval = import <colmena/src/nix/hive/eval.nix>; hive = eval { rawHive = import ./hive.nix; }; in hive.nodes.helios64.config.system.build.toplevel' keeps segfaulting 13:40:41
@angerman:matrix.organgerman last thing it prints prior to segfaulting is evaluating file '/nix/store/0gqvlf61cyjavvalfql96jxykrf0q0nb-source/pkgs/build-support/kernel/modules-closure.nix'. 13:41:03
@angerman:matrix.organgermanGC_DONT_GC... 13:41:51
@angerman:matrix.organgermangod i hate this nix binary.13:41:55
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @angerman:matrix.org
meta.nixpkgs = import (fetchTarball { ... });
With this there <nixpkgs> in NIX_PATH shouldn't have matterered, but apparently something in the config is trying to use <nixpkgs>. But I think that's a red herring
13:41:57
@angerman:matrix.organgerman
GC_DONT_GC=1 NIX_PATH=nixpkgs=https://github.com/NixOs/nixpkgs/archive/65c9cc79f1d179713c227bf447fb0dac384cdcda.tar.gz:colmena=https://github.com/zhaofengli/colmena/archive/main.tar.gz nix-instantiate -E 'let eval = import <colmena/src/nix/hive/eval.nix>; hive = eval { rawHive = import ./hive.nix; }; in hive.nodes.helios64.config.system.build.toplevel'
trace: warning: The following Nixpkgs configuration keys set in meta.nixpkgs will be ignored: allowBroken allowUnsupportedSystem
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/jaccla0pvhfr9wy5vf4l0kdd1qdr7a26-nixos-system-nixos-20.09pre-git.drv
13:42:16
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @angerman:matrix.org
NIX_PATH=nixpkgs=https://github.com/NixOs/nixpkgs/archive/65c9cc79f1d179713c227bf447fb0dac384cdcda.tar.gz:colmena=https://github.com/zhaofengli/colmena/archive/main.tar.gz nix-instantiate -E 'let eval = import <colmena/src/nix/hive/eval.nix>; hive = eval { rawHive = import ./hive.nix; }; in hive.nodes.helios64.config.system.build.toplevel' keeps segfaulting
If you can get a backtrace, that may be valuable in submitting an issue upstream to Nix
13:42:17
@angerman:matrix.organgerman nix (Nix) 2.5pre20211007_844dd90 13:42:41
@angerman:matrix.organgermanI guess I could break out my debugger now, and figure out why the GC keeps failing... or I'll just use GC_DONT_GC for now, and ignore the failure.13:43:12
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @angerman:matrix.org
GC_DONT_GC...
Ah, I didn't know about https://github.com/NixOS/nix/issues/4893
13:44:03
@zhaofeng:zhaofeng.liZhaofeng LiYeah, that is indeed pretty annoying 🙁13:44:28
@zhaofeng:zhaofeng.liZhaofeng LiBut it should be fixed in the release version of 2.5 I guess13:44:48
@angerman:matrix.organgermanin this case it does help; I just hate this nix binary for the amount of issues I have with it too much.13:44:56
@angerman:matrix.organgermanand for its slowness. 13:45:22
@zhaofeng:zhaofeng.liZhaofeng LiSlightly tangential, but 2.5 also has another regression that has yet to be fixed: https://github.com/NixOS/nix/issues/581613:47:16
@angerman:matrix.organgermangreat. and now it fails to find my build...13:53:18

Show newer messages


Back to Room ListRoom Version: 6