Tempdir conflict with `--appimage-extract-and-run` on parallel runs

オープン
#1,215 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
c, linux

調査の方向性

src/runtime.c の587行目付近と690-696行目から始め、同じ AppImage が並列で実行された、リンク先の CI 実行を確認してください。展開された一時パスがどのように計算され、削除されるかを追跡し、可能であれば並列実行を再現してください。完了の条件は、並列の --appimage-extract-and-run 実行が、別の実行に必要なファイルを削除したり再利用したりしなくなることです。

索引モデルが issue の本文から書いたものです。

説明

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:
https://github.com/AppImage/AppImageKit/blob/90704a014727556591e396ae8095131d41374a7e/src/runtime.c#L587
https://github.com/AppImage/AppImageKit/blob/90704a014727556591e396ae8095131d41374a7e/src/runtime.c#L690-L696

主要言語
言語のデータがありません
スター
9.5k
フォーク
586
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AppImage/AppImageKit のほかの issue

AppImage/AppImageKit の issue をすべて見る

似ている issue

Operating Systems の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。