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

mktempdir cleanup regression(?) in 1.8.3 #47730

Open
KristofferC opened this issue Nov 28, 2022 · 6 comments
Open

mktempdir cleanup regression(?) in 1.8.3 #47730

KristofferC opened this issue Nov 28, 2022 · 6 comments
Labels
regression Regression in behavior compared to a previous version system:windows Affects only Windows

Comments

@KristofferC
Copy link
Member

KristofferC commented Nov 28, 2022

The tests in Ferrite.jl started failing on Julia 1.8.3 on Windows with IOError: unlink("file"): resource busy or locked (EBUSY). An example CI run: https://github.com/Ferrite-FEM/Ferrite.jl/actions/runs/3569162068/jobs/5998825660#step:5:435

This used to pass on Julia 1.8.2. Maybe the libuv upgrade had something to do with it? It is possible that something bad is done in that CI but it is surprising that 1.8.3 made it fail.

@KristofferC KristofferC added system:windows Affects only Windows regression Regression in behavior compared to a previous version labels Nov 28, 2022
@barucden
Copy link
Contributor

Might be related to #39457?

@kagalenko-m-b
Copy link

kagalenko-m-b commented Aug 16, 2023

This also affects me on 1.9.2, no fix nor workaround everywhere I searched. Can't precompile necessary for work packages on Windows as a result.

@mkitti
Copy link
Contributor

mkitti commented Nov 25, 2023

See https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw

So perhaps changing the environment variable TMP or TEMP might help.

Also libuv xref:
https://docs.libuv.org/en/v1.x/misc.html#c.uv_os_tmpdir

@stevengj
Copy link
Member

stevengj commented Dec 3, 2023

Could this be related to #34700? i.e. the problem is not mktempdir, the problem is that rm(dir, recursive=true) has sporadic failures on Windows because of race conditions.

@kagalenko-m-b
Copy link

kagalenko-m-b commented Dec 3, 2023

Could this be related to #34700? i.e. the problem is not mktempdir, the problem is that rm(dir, recursive=true) has sporadic failures on Windows because of race conditions.

The error indeed is the failure to remove the temporary files created by the precompiling process. If the cause is some race condition, perhaps, I could add a sleep() in the downloaded sources somewhere that will slow down precompilation, but at least would allow me to work?

@mkitti
Copy link
Contributor

mkitti commented Dec 3, 2023

Did things work with some earlier Julia version? Does this problem still occur if you start julia via julia --pkgimages=no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version system:windows Affects only Windows
Projects
None yet
Development

No branches or pull requests

5 participants