nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

libclang: Nix commands seem to completely hang when copying path '/nix/store/...-clang-19.1.7-lib'

Open nyankittone opened this issue 1 year ago • 8 comments

Nixpkgs version

  • Unstable (25.11)

Describe the bug

After updating the NixOS unstable channel for my user today, I noticed that I could no longer nix-shell into one of my C projects anymore. The command now hangs at copying path '/nix/store/nh4ir1ylpnirrvp5jqddf4p072c7kf02-clang-19.1.7-lib' from 'https://cache.nixos.org'....

A bit later, I also tried upgrading NixOS (I am using NixOS unstable), and then had the nixos-rebuild switch --upgrade command I ran also hang at copying the exact same derivation. At the moment, I can't even upgrade my system at the moment.

I have not tried running any other Nix commands yet.

Steps to reproduce

  1. Create a directory containing a shell.nix file with the following contents:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
  buildInputs = [
    pkgs.libclang
  ];
}
  1. Ensure that is the current nixos-unstable channel
  2. Try to run nix-shell inside the new directory
  3. Watch as it hangs

Expected behaviour

the nix-shell command doesn't hang

Screenshots

No response

Relevant log output


Additional context

I'm pretty new to NixOS, (and have only been using Nix for the past year) so I don't know too much about why this is happening or how this could be fixed.

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.12.42, NixOS, 25.11 (Xantusia), 25.11pre846535.20075955deac
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.28.4
  • channels(root): "nixos"
  • nixpkgs: /nix/store/8ifwm76dxdr5g0lqw598x6hffpsqa601-nixos/nixos

Notify maintainers

@dtzWill @Ericson2314 @lovek323 @alyssais @RossComputerGuy @rrbutani @sternenseemann


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a :+1: reaction to issues you find important.

nyankittone avatar Aug 27 '25 13:08 nyankittone

Can't repro, maybe you have a connection issue?

$ nix-store --realise /nix/store/nh4ir1ylpnirrvp5jqddf4p072c7kf02-clang-19.1.7-lib
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/nh4ir1ylpnirrvp5jqddf4p072c7kf02-clang-19.1.7-lib

$ ls /nix/store/nh4ir1ylpnirrvp5jqddf4p072c7kf02-clang-19.1.7-lib
lib  libexec

eclairevoyant avatar Aug 27 '25 15:08 eclairevoyant

Surely this can't be a Nixpkgs bug — Nix should be able to copy any path, regardless of content — so if there is an issue here it must be a Nix one.

alyssais avatar Aug 27 '25 15:08 alyssais

Surely this can't be a Nixpkgs bug — Nix should be able to copy any path, regardless of content — so if there is an issue here it must be a Nix one.

That's what I'd think, but for some reason it freezes on this one specific path after updating the channel. I find this very weird.

nyankittone avatar Aug 27 '25 16:08 nyankittone

Can't repro, maybe you have a connection issue?

$ nix-store --realise /nix/store/nh4ir1ylpnirrvp5jqddf4p072c7kf02-clang-19.1.7-lib
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/nh4ir1ylpnirrvp5jqddf4p072c7kf02-clang-19.1.7-lib

$ ls /nix/store/nh4ir1ylpnirrvp5jqddf4p072c7kf02-clang-19.1.7-lib
lib  libexec

I'm away from my PC right now, so I can't test if there's a connection problem. Though I'm unsure how it'd be caused by that since everything else other than this one path seems to copy fine?

nyankittone avatar Aug 27 '25 16:08 nyankittone

Can't reproduce

RossComputerGuy avatar Aug 27 '25 16:08 RossComputerGuy

Can't repro

RossSmyth avatar Aug 27 '25 18:08 RossSmyth

Can't repro

Hmm, this seems to be a common response... I'll definitely have to look at this in more depth once I can

nyankittone avatar Aug 27 '25 19:08 nyankittone

Ok, so it appears the issue I had mysteriously went away after updating the unstable channel again and rebooting. Still don't know why the problem happened to begin with... but whatever, it works for now.

nyankittone avatar Aug 28 '25 05:08 nyankittone