Unexpected crash while debugging faulting build #145

Closed
opened 2024-03-18 18:53:48 +00:00 by lunaphied · 5 comments
Owner

While trying to rebuild my system config, I encountered the following crash.

lunaphied@Ran ~/.config (main) @ nix --extra-experimental-features "nix-command flakes" build --out-link /tmp/nixos-rebuild.Krh1VQ/nixos-rebuild "/
home/lunaphied/.config#nixosConfigurations.Ran.config.system.build.nixos-rebuild" --print-build-logs --verbose --debugger --ignore-try
warning: Git tree '/home/lunaphied/.config' is dirty
error: attribute 'default' missing
       at /nix/store/marargbmwi7aqjrp7m60ly162090zf9i-source/overlay.nix:17:13:
           16|   );
           17|   lix-pkg = (import lix).default;
             |             ^
           18| in

evaluating derivation 'git+file:///home/lunaphied/.config#nixosConfigurations.Ran.config.system.build.nixos-rebuild'
Segmentation fault (core dumped)

I did a little investigating of the coredump and arrived at:

Core was generated by `nix --extra-experimental-features nix-command flakes build --out-link /tmp/nixo'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  nix::mapStaticEnvBindings (st=..., se=..., env=..., vm=...) at src/libexpr/eval.cc:759

warning: Source file is more recent than executable.
759                     vm[st[i.first]] = env.values[i.second];
[Current thread is 1 (Thread 0x7f730dc0d580 (LWP 638733))]
(gdb) p i
$1 = {first = Cannot access memory at address 0x4
(gdb) p i.first
Cannot access memory at address 0x4
(gdb) p (void*)i.first
Cannot access memory at address 0x4
(gdb) p &i.first
$2 = (nix::Symbol *) 0x4

Clearly something is fucked here.

This is against 706cee5c49

While trying to rebuild my system config, I encountered the following crash. ``` lunaphied@Ran ~/.config (main) @ nix --extra-experimental-features "nix-command flakes" build --out-link /tmp/nixos-rebuild.Krh1VQ/nixos-rebuild "/ home/lunaphied/.config#nixosConfigurations.Ran.config.system.build.nixos-rebuild" --print-build-logs --verbose --debugger --ignore-try warning: Git tree '/home/lunaphied/.config' is dirty error: attribute 'default' missing at /nix/store/marargbmwi7aqjrp7m60ly162090zf9i-source/overlay.nix:17:13: 16| ); 17| lix-pkg = (import lix).default; | ^ 18| in evaluating derivation 'git+file:///home/lunaphied/.config#nixosConfigurations.Ran.config.system.build.nixos-rebuild' Segmentation fault (core dumped) ``` I did a little investigating of the coredump and arrived at: ``` Core was generated by `nix --extra-experimental-features nix-command flakes build --out-link /tmp/nixo'. Program terminated with signal SIGSEGV, Segmentation fault. #0 nix::mapStaticEnvBindings (st=..., se=..., env=..., vm=...) at src/libexpr/eval.cc:759 warning: Source file is more recent than executable. 759 vm[st[i.first]] = env.values[i.second]; [Current thread is 1 (Thread 0x7f730dc0d580 (LWP 638733))] (gdb) p i $1 = {first = Cannot access memory at address 0x4 (gdb) p i.first Cannot access memory at address 0x4 (gdb) p (void*)i.first Cannot access memory at address 0x4 (gdb) p &i.first $2 = (nix::Symbol *) 0x4 ``` Clearly something is fucked here. This is against https://gerrit.lix.systems/plugins/gitiles/lix/+/706cee5c493b39e25bdb0add55d2e1771dc31696
lunaphied added the
bug
label 2024-03-18 18:53:48 +00:00
Author
Owner

I can provide the coredump on request, it's too big to upload here (~0.7 GiB)

I can provide the coredump on request, it's too big to upload here (~0.7 GiB)
Owner

a reproducing config would be more helpful than a coredump to us personally

a reproducing config would be more helpful than a coredump to us personally
Owner

oh we know what happened

oh we know what happened
Author
Owner

oh we know what happened

Elaborate?

> oh we know what happened Elaborate?
Owner

oh we know what happened

Elaborate?

the debugger hookup code hooked an expression up the wrong way, that caused a type confusion in the debugger and ultimately a segfault. https://gerrit.lix.systems/c/lix/+/573

> > oh we know what happened > > Elaborate? the debugger hookup code hooked an expression up the wrong way, that caused a type confusion in the debugger and ultimately a segfault. https://gerrit.lix.systems/c/lix/+/573
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#145
No description provided.