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

[BUG] Installing Plots.jl still leaves files behind #5020

Closed
giordano opened this issue Nov 9, 2024 · 5 comments · Fixed by #5023
Closed

[BUG] Installing Plots.jl still leaves files behind #5020

giordano opened this issue Nov 9, 2024 · 5 comments · Fixed by #5023
Labels

Comments

@giordano
Copy link
Contributor

giordano commented Nov 9, 2024

Details

Why this is still an issue in v1.40.8 which was released 7 months after #4870 was merged?

Originally posted by @giordano in #4869 (comment)

Backends

Irrelevant

Versions

Plots.jl version: v1.40.8
Backend version (]st -m <backend(s)>): irrelevant
Output of versioninfo(): irrelevant

@giordano giordano added the bug label Nov 9, 2024
@t-bltg
Copy link
Member

t-bltg commented Nov 12, 2024

Could you precise which files are left behind in which context ?

The way you're using tempname(), by not using the name as is but appending an extension, causes the cleanup of the file to never happen, and so repeatedly precompiling the package causes lots of files to pile up, especially on shared systems which are reboot infrequently.

We are using tempname() here together with mktempdir with the default cleanup = true option set:
scratch_dir = mktempdir() ... fn = joinpath(scratch_dir, tempname()), so AFAIK, scratch_dir is deleted upon exit, hence no files are left behind ?

@t-bltg
Copy link
Member

t-bltg commented Nov 12, 2024

I see, we probably miss tempname(scratch_dir) instead.

This was referenced Nov 12, 2024
@giordano
Copy link
Contributor Author

Could you precise which files are left behind in which context ?

When I install Plots.jl and it has to be precompiled, two files with temporary base names and extension png are still left in /tmp, which is the issue described in #4869: attaching an extension to tempname() makes it so the file is never cleaned up automatically by Julia. To reproduce it: precompile Plots.jl and observe that there are leftovers in tempdir.

This issue is particularly annoying on shared systems which are rebooted infrequently and so the temporary files only keep accumulating.

@t-bltg t-bltg linked a pull request Nov 12, 2024 that will close this issue
@t-bltg
Copy link
Member

t-bltg commented Nov 12, 2024

Fixed by #5023, also tested locally by inspecting /tmp.

The claimed fix implemented in #4870 was wrong.

Please try the new version 1.40.9 and report ?

@t-bltg t-bltg closed this as completed Nov 12, 2024
@giordano
Copy link
Contributor Author

I confirm this seems to be fixed now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants