-
Notifications
You must be signed in to change notification settings - Fork 824
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
Temp files are not removed in dylib engine #2501
Comments
Thanks for reporting the issue. I confirm the bug. I've written a fix in #2518. |
2518: fix(engine-dylib) Remove temporary file used to creating an artifact r=syrusakbary a=Hywan # Description When creating an artifact, a first temporary file is created and kept to prevent the file from being removed by the system. This patch removes that temporary file manually whatever the linker fails or not. Fixes #2501. # Review - [x] Add a short description of the change to the CHANGELOG.md file Co-authored-by: Ivan Enderlin <[email protected]>
I think this is still a problem, the #2518 fixes the object file cleanup, but wasmer/lib/engine-dylib/src/artifact.rs Line 513 in 5dadb3f
|
Good catch @vavrusa! |
There's a related issue here (and below) wasmer/lib/engine-dylib/src/artifact.rs Line 264 in 5dadb3f
wasmer/lib/engine-dylib/src/artifact.rs Line 278 in 5dadb3f
|
…asmerio#2501 Signed-off-by: Benjamin Coenen <[email protected]>
…asmerio#2501 Signed-off-by: Benjamin Coenen <[email protected]>
2547: fix(engine-dylib): do not keep temp file and delete it automatically r=syrusakbary a=bnjjj close #2501 # Description This PR plan to fix the issue #2501 I know the implementation using Drop trait is not the best way to implement it. Maybe I need more knowledge about engine lifecycle or adding a trait method to clean any artifacts we create when using an engine. Feel free to give me more details about how I could implement this in a better way. Co-authored-by: Benjamin Coenen <[email protected]>
Describe the bug
dylib creates tempfile to be able to "dlopen" later, but those files are not removed later. This could be an issue for a long running program which constantly (re)loads wasm files, occupying lots of unnecessary disk spaces.
Steps to reproduce
Use dylib engine to load a wasm file, then check /tmp for temp files.
Expected behavior
Temp file is deleted when not being used.
Actual behavior
Temp file persists even program restarts.
Additional context
The text was updated successfully, but these errors were encountered: