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

Windows os errors during build/test cleanup #1431

Open
bollwyvl opened this issue Feb 16, 2025 · 2 comments
Open

Windows os errors during build/test cleanup #1431

bollwyvl opened this issue Feb 16, 2025 · 2 comments

Comments

@bollwyvl
Copy link
Contributor

As always, thanks for rattler-build!

I have now seen issues during both the build and test phases where windows is unable to proceed due to (presumably) file permissions and/or dangling processes:

On conda-forge/granian-feedstock#42:

 ╰─────────────────── (took 3 minutes)
  all tests passed!
Error: 
  × failed to remove directory `D:\bld\bld\rattler-build_granian-with-
  │ all_1739238925\work\test`: Access is denied. (os error 5)

I tried using some python tricks (psutil and its lovely child tracking), but it was no good. I just skipped the test on windows and moved on.

On conda-forge/plantuml-feedstock#62:

 │ │ Archive written to 'D:\bld\win-64\plantuml-1.2025.1-he596248_0.conda'
 │ │
 │ ╰─────────────────── (took 4 seconds)
 │
 ╰─────────────────── (took 9 minutes)
Error: 
  × failed to remove directory `D:\bld\bld\rattler-
  │ build_plantuml_1739725916\build_env`: The process cannot access the file
  │ because it is being used by another process. (os error 32)

This is of course harder to work around, as I can't just skip the build.

While leaking disk/memory is of course A Bad Thing, I'd really rather be able to opt into getting a warning... which I could duly ignore on windows CI until it really failed due to resource exhaustion.

@bollwyvl
Copy link
Contributor Author

update: I got plantuml to build with an explicit call to gradlew -stop 😅

Nice gains, too:

  • 22m 28s with conda-build
  • 14m 39s with rattler-build

@wolfv
Copy link
Member

wolfv commented Feb 18, 2025

I believe conda-build has some retry/backoff/rename strategy for this kind of failure mode.

We should probably look into something like this. We also had to implement some similar facilities on unix because Go produces a cache that doesn't belong to the user and then isn't easily removable.

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

2 participants