NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.48k stars 1.5k forks source link

x86_64-linux nix build segfault #6593

Open exarkun opened 2 years ago

exarkun commented 2 years ago

Describe the bug

nix build -f thisexpr.nix crashes with a segmentation violation.

Steps To Reproduce

  1. Get nix (Nix) 2.9.0pre20220512_d354fc3 (in my case, via https://github.com/nixos/nixpkgs/archive/b62ada430501de88dfbb08cea4eb98ead3a5e3e7.tar.gz)
  2. nix build -f thisexpr.nix
  3. See segfault

thisexpr.nix:

let
  pkgs = import (builtins.fetchGit {
    url = "https://github.com/NixOS/nixpkgs";
    rev = "838eefb4f93f2306d4614aafb9b2375f315d917f";
  }) { };

  mach-nix = import (pkgs.fetchFromGitHub {
    owner = "DavHau";
    repo = "mach-nix";
    rev = "refs/tags/3.4.0";
    hash = "sha256:19vh5qfqlml22d6mpi34nnbh71i259sh223l4dr4axar3byy1408";
  });
in
pkgs.callPackage mach-nix

Expected behavior

A nix-level error or a successful build

Artturin commented 2 years ago

try a newer nix https://github.com/NixOS/nixpkgs/pull/175492

thufschmitt commented 2 years ago

That's probably a duplicate of https://github.com/NixOS/nix/pull/6582 (which got its fix merged just yesterday). Can you try with the latest master Nix (more recent than the one in nixpkgs master afaik)?