Install fails on a freshly installed Fedora 42 #59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Error
Metadata
I poked at this a little bit and found out that
/nix/store/1k1bnir265n7jpbmwinj8hiwygnwrw3s-aws-c-common-0.9.27is a symbolic link to itself:Edit:
The
lix-2.93.0-x86_64-linux.tar.xzarchive (SHA256 = f8847c5ee7e44ac2239652f92fe173175226df9b3db08710e5a2d943cfa5286a) looks correct to me.Edit again:
I re-extracted that directory from the tarball, placed it in
/nix/store, and then ran the install again, and it succeeded the second time.Having now looked at the code, I have a hypothesis about the reason for this failure, but it's weak because there's something I can't explain yet.
The
MoveUnpackedNixaction loops over the source store:while let Some(entry) = src_store_listing.next_entry().await.map_err(|e| ActionErrorKind::ReadDir(src_store.clone(), e)).map_err(Self::error)?{and then modifies that source directory while looping:
tokio::fs::symlink(&entry_dest, entry.path()).await.map_err(|e| ActionErrorKind::Symlink(entry_dest.to_owned(), entry.path(), e)).map_err(Self::error)?;I think that might be producing a sort of iterator invalidation error causing it to process the just-added symlink a second time, which would produce the symptom of a symlink pointing to itself in
/nix/store.The reason I'm uncertain is that I wouldn't expect this error to be deterministic, but both myself and @chklauser saw this on the same derivation, and I tried the install (from scratch) three times and it happened every time.
This issue was mentioned on Gerrit on the following CLs:
I feel a little silly now. I wrote a fix based on my hypothesis, then opened a CL for it, and Gerrit helpfully tells me that it conflicts with cl/3352 fixing #49, which is the same root cause as this issue.