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

Task cache issues when broken symlink in the root folder, since v0.31 #2196

Closed
2 tasks done
visr opened this issue Oct 3, 2024 · 8 comments · Fixed by #2209
Closed
2 tasks done

Task cache issues when broken symlink in the root folder, since v0.31 #2196

visr opened this issue Oct 3, 2024 · 8 comments · Fixed by #2209
Labels
🐞 bug Something isn't working

Comments

@visr
Copy link

visr commented Oct 3, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

pixi init .
pixi add gcc_impl_linux-64==14.1.0

Issue description

I noticed today in Deltares/Ribasim#1870 that the upgrade from pixi v0.30 to v0.31 broke some of our CI jobs on Ubuntu that install rust and its dependency gcc_impl_linux-64 via pixi. When doing pixi run of different tasks, I regularly but not always run into:

  × /home/runner/work/Ribasim/Ribasim/.pixi/envs/dev/lib/gcc/x86_64-conda-
  │ linux-gnu/14.1.0/libhwasan.so: No such file or directory (os error 2)

I don't have a clear reproducer, but by installing only gcc_impl_linux-64==14.1.0 I do see that the referenced file is a broken symlink:

ls -la .pixi/envs/default/lib/gcc/x86_64-conda-linux-gnu/14.1.0/
libhwasan.so -> ../../../libhwasan.so

ls -la .pixi/envs/default/lib/
lrwxrwxrwx  1 visr visr        18 Oct  3 21:15 libhwasan.so.0 -> libhwasan.so.0.0.0
-rwxrwxr-x  2 visr visr   3708944 Aug 28 01:39 libhwasan.so.0.0.0

This symlink is equally broken when I install this environment with pixi v0.30, but it seems like v0.31 doesn't like broken symlinks. Might be something that needs fixing in a feedstock instead.

Expected behavior

Like pixi v0.30 no file not found errors.

@wolfv
Copy link
Member

wolfv commented Oct 3, 2024

I just tried to debug with rattler, but could not reproduce the issue yet.

@Hofer-Julian
Copy link
Contributor

@visr can you please try if you can reproduce the issue with the cache disabled?

@visr
Copy link
Author

visr commented Oct 4, 2024

Disabling the cache doesn't seem to help: Deltares/Ribasim#1871

@Hofer-Julian
Copy link
Contributor

@wolfv
Copy link
Member

wolfv commented Oct 4, 2024

@Hofer-Julian unfortunately that's the code that would write a package so I think this might be unrelated.

@Hofer-Julian
Copy link
Contributor

Hofer-Julian commented Oct 4, 2024

@Hofer-Julian unfortunately that's the code that would write a package so I think this might be unrelated.

You are right, I debugged pixi on Ribasim and this PR is to blame: #2141

Since our last release, we follow symlinks when searching for files for task caching:

.follow_links(true)

But actually that is only the symptom of the problem. When running with RUST_LOG=debug I've seen that files in .pixi are probed for task caching. There is also nothing in Ribasim's pixi.toml which should cause something like that.

That's the reason why the broken symlink in .pixi/envs suddenly matters.

@Hofer-Julian
Copy link
Contributor

Here is a small reproducer: https://github.com/Hofer-Julian/broken_symlink_pixi

@wolfv
Copy link
Member

wolfv commented Oct 4, 2024

Here is an even smaller one that works easily on macOS:

[project]
authors = ["Julian Hofer <[email protected]>"]
channels = ["conda-forge"]
description = "Add a short description here"
name = "broken_symlink"
platforms = ["linux-64", "osx-64", "osx-arm64"]
version = "0.1.0"

[tasks]
mklink = { cmd = "mkdir -p .pixi/envs/default && ln -s /broken .pixi/envs/default/broken" }
test = { cmd = "echo Hello", inputs = [".gitignore"], depends-on = ["mklink"] }

@ruben-arts ruben-arts changed the title Pixi run fails on broken symlink since v0.31 Task cache issues when broken symlink in the root folder, since v0.31 Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants