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

UUPMediaConverter doesn't cleanup after itself after SIGINT #182

Open
kwvg opened this issue Oct 2, 2023 · 0 comments
Open

UUPMediaConverter doesn't cleanup after itself after SIGINT #182

kwvg opened this issue Oct 2, 2023 · 0 comments

Comments

@kwvg
Copy link

kwvg commented Oct 2, 2023

Description

UUPMediaConverter stores its in-progress files in %Temp% by default (configurable with temp-path). If the program is run and then sent a SIGINT signal (say, by using Ctrl+C), the application immediately exits without cleaning after itself. This results in multi-gigabyte directories that fill up temp-path.

If this is repeated enough times (twice in my case), temp-path will exhaust the partition's space, preventing the program from proceeding any further.

Possible solutions

SIGINT gives the program a chance to shut down the program gracefully, so perhaps in a shutdown sequence, the temporary files are deleted unless a flag is set that retains them (say, --retain-temp-files). This will not account for SIGKILL terminations, as by nature, they don't give the process a chance to do anything.

So, additionally, perhaps the directory in temp-path can be ear-tagged with a GUID generated at runtime and a retention flag. If the flag is present, leave the examined directory alone, create a new directory and proceed. If the flag is absent, the GUID wouldn't match and the directory can be deleted.

Steps to reproduce

  • Open Command Prompt as Administrator and navigate to working directory
  • Download any UUP
  • Generate an image for any UUP, press Ctrl+C anytime midway
  • Repeat the last step and see the drive space reduce

Additional Notes

  • System Information

    • Operating System: Windows 10 22H2 19045.3448
    • Shell: Command Prompt
      • Administrative Privileges: Yes
    • Virtualized: Yes
      • Host: Linux
      • Platform: VirtualBox 7.0.10 r158379
        • Guest Additions: Yes
        • Extension Pack: Yes
  • Program Information

    • Version: 3.1.8.0
    • Architecture: AMD64 (x64)
  • Consider defining the minimum amount of space needed to store temporary files and adding an init-check that bails out if it doesn't meet that minimum. Doesn't have to be exact, just a gigabyte or two above the average expected size.

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

1 participant