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

Temp data not cleaned up upon SIGINT #450

Closed
luhring opened this issue Jun 29, 2021 · 2 comments
Closed

Temp data not cleaned up upon SIGINT #450

luhring opened this issue Jun 29, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@luhring
Copy link
Contributor

luhring commented Jun 29, 2021

Throughout Syft's execution, it writes and reads temporary data on disk. When Syft receives the signal SIGINT, it should gracefully exit, which includes removing any temp data that it had written, but Syft doesn't do this.

@luhring luhring added the bug Something isn't working label Jun 29, 2021
@wagoodman
Copy link
Contributor

wagoodman commented Jun 29, 2021

PR #448 will address this problem at a bare minimum by using stereoscope.Cleanup once an interrupt is received --which cleans up the majority of the volume for temp files.

Ideally the workers should have a coordinated shutdown by passing context to indicate a cancellation intent and allowing the happy path to drive temp dir/file cleanup (and happy path cleanup should not use global state for tracking temp files).

I'm leaving these closed PRs here for reference, they may or may not be part of a solution to solve this later:

@wagoodman wagoodman added this to OSS Feb 7, 2024
@wagoodman
Copy link
Contributor

As of right now I'm not seeing evidence of syft leaving temp files on disk when SIGINT is received (something that is partially handled in anchore/clio and the other part in syft itself. We are passing context through many levels, but not all levels, to help coordinate shutdown.

@wagoodman wagoodman closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
@github-project-automation github-project-automation bot moved this to Done in OSS Jun 20, 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
Archived in project
Development

No branches or pull requests

2 participants