Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sporadic segmentation faults when running nixos-rebuild on NixOS #2968

Closed
alexeymuranov opened this issue Jun 23, 2019 · 5 comments
Closed

Comments

@alexeymuranov
Copy link

From time to time a get a segmentation fault when i do nixos-rebuild boot --upgrade.

It used to happen on the older of two machines on which i am trying NixOS, but it has just happened on the newer one too:

# nixos-rebuild boot --upgrade
/run/current-system/sw/bin/nixos-rebuild: line 208:  2595 Segmentation fault      nix-channel --update nixos

Trying nixos-rebuild second time normally works. I do not know how to reliably reproduce this either.

System info:

# nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.55-hardened, NixOS, 19.03.172968.3ddd23719bb (Koi)`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.2.2`
 - channels(alexey): `"nixos-17.03-17.03.1949.78e9665b48f, nixos-17.09-17.09.3238.e984f9e48e1"`
 - channels(root): `"nixos-19.03.172968.3ddd23719bb"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@Ekleog
Copy link
Member

Ekleog commented Jun 23, 2019

As you appear to be using -hardened, does anything interesting appear in dmesg when this happens? (it should be possible to find it in journalctl too, if you have rebooted since the last time this happened)

@alexeymuranov
Copy link
Author

I haven't rebooted yet, here is what i have in dmesg:

[  500.653973] fuse init (API version 7.27)
[  506.734127] rfkill: input handler disabled
[  831.481141] show_signal_msg: 2 callbacks suppressed
[  831.481153] nix-channel[2600]: segfault at 8 ip 00007f2263fbd330 sp 00007f2249106190 error 4 in libc-2.27.so[7f2263f71000+13d000]
[  831.481186] Code: 85 db 0f 84 22 01 00 00 8b 01 49 89 fc 49 89 f2 49 89 c9 25 00 80 00 00 75 59 4c 8b 81 88 00 00 00 64 48 8b 2c 25 10 00 00 00 <49> 3b 68 08 74 3e be 01 00 00 00 83 3d 76 74 14 00 00 74 09 f0 41

I should note that the older machine uses "plain" Linux 4.19, and there this or similar segfault was observed multiple times. On the newer machine that has Linux 4.19 hardened, this is the first one.

@sorpaas
Copy link
Member

sorpaas commented Jul 12, 2019

I'm having a similar error when trying to run a game in steam-fhs:

[22864.736592] ThreeKingdoms[13273]: segfault at 0 ip 00007fcb3d80b4b1 sp 00007fcad7fec108 error 4 in libc-2.27.so[7fcb3d6db000+13d000]
[22864.736597] Code: 84 00 00 00 00 00 0f 1f 00 31 c0 c5 f8 77 c3 66 2e 0f 1f 84 00 00 00 00 00 89 f9 48 89 fa c5 f9 ef c0 83 e1 3f 83 f9 20 77 1f <c5> fd 74 0f c5 fd d7 c1 85 c0 0f 85 df 00 00 00 48 83 c7 20 83 e1

@domenkozar
Copy link
Member

Make sure to get a core dump and run bt.

@zimbatm
Copy link
Member

zimbatm commented Oct 3, 2019

@alexeymuranov's segfault is probably related to #2733 . nixos-rebuild <action> --upgrade calls nix-channel --update under the hood. You could test that by running nix-channel --upgrade and then nixos-rebuild boot and see which one segfaults.

@sorpaas's segfault happens inside of a game. It's best to report this in the nixpkgs repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants