-
-
Notifications
You must be signed in to change notification settings - Fork 565
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
Tempdir conflict with --appimage-extract-and-run
on parallel runs
#1215
Comments
For CI purposes, where the build host is reset anyway after every build, you should |
That does indeed seem to do the trick, thanks a lot for the quick and insightful hint @TheAssassin! |
The NO_CLEANUP is definitely a good workaround for CI environments. Should running the same extracted appimage in parallel be supported regardless? |
I guess it should at least be discussed. This kind of use case requires quite some complexity in the runtime (we'd have to try to make all running runtimes communicate with each other and coordinate the cleanup in some way). |
What do you think of my suggestion to include the PID in the dirname? Downside is more disk space used and more extraction time (since no existing files will be skipped). Upside is no problems with parallelism. A compromise would be to enable this behavior via another env var, but then that's not much better than NO_CLEANUP 🤷 |
You may have guessed it from the name, |
Why don't we use something random (like we do for the mountpoint)? |
I got this problem too. For the case of two users, if user 1 is killed while running and some not fully uncompressed files remain, user 2 will no longer be able to run this command because it has no permission to recover. I think there should be a UID/username added to the directory name, even with NO_CLEANUP it shouldn't share the same cache with different users. |
Again: no. See #1215 (comment) |
It still failed with multi-user usage with NO_CLEANUP=1 File exists and file size matches, skipping
File exists and file size matches, skipping
File exists and file size matches, skipping
File exists and file size matches, skipping
File exists and file size matches, skipping
File exists and file size matches, skipping
File exists and file size matches, skipping
File exists and file size matches, skipping
File exists and file size matches, skipping
File exists and file size matches, skipping
fopen error: Permission denied
Failed to extract AppImage |
When an appimage is run with
--appimage-extract-and-run
, the path is calculated as$TMPDIR/appimage_extracted_$MD5DIGEST
. This usually works, but it seems there are problems when the same appimage is run in parallel. Likely there is a race condition where one appimage is still running while the other one is removing its files already.It seems this happened to me in this CI run: https://github.com/lalten/rules_appimage/actions/runs/3085571024/jobs/4989010345 where I added a testing matrix. I think that caused the same appimage to be run in parallel and led to really weird errors.
I wonder if it makes sense to include the date or maybe even just the pid of the process into the tempdir name as well.
Relevant places in the runtime code:
AppImageKit/src/runtime.c
Line 587 in 90704a0
AppImageKit/src/runtime.c
Lines 690 to 696 in 90704a0
The text was updated successfully, but these errors were encountered: