Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Potential for SLURMCluster log directory creation failing

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

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

評価

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

調査の方向性

issue でリンクされているコンストラクターの位置にある log_directory の処理付近から dask_jobqueue/core.py の調査を始め、説明されている SLURMCluster の並行構築と比較してください。別の workflow が先にパスを作成した場合に、ディレクトリ作成がどのように動作するかを確認してください。並行する workflow が同じ既存のログディレクトリを使用しても FileExistsError が発生しなければ完了です。

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

説明

bug

Describe the issue:

I am using dask_jobqueue.SLURMCluster in my workflows. I am running ~15 workflows at a time. I am getting unlucky and it seems like two separate workflows are both trying to create the output log directory. One would fail:

  File "/datasets/work/jones-storage/work/miniconda/miniforge3/envs/flint_main/lib/python3.12/site-packages/dask_jobqueue/core.py", line 661, in __init__
    self._dummy_job  # trigger property to ensure that the job is valid
    ^^^^^^^^^^^^^^^
  File "/datasets/work/jones-storage/work/miniconda/miniforge3/envs/flint_main/lib/python3.12/site-packages/dask_jobqueue/core.py", line 690, in _dummy_job
    return self.job_cls(
           ^^^^^^^^^^^^^
  File "/datasets/work/jones-storage/work/miniconda/miniforge3/envs/flint_main/lib/python3.12/site-packages/dask_jobqueue/slurm.py", line 37, in __init__
    super().__init__(
  File "/datasets/work/jones-storage/work/miniconda/miniforge3/envs/flint_main/lib/python3.12/site-packages/dask_jobqueue/core.py", line 375, in __init__
    os.makedirs(self.log_directory)
  File "<frozen os>", line 225, in makedirs
FileExistsError: [Errno 17] File exists: 'flint_logs'

Minimal Complete Verifiable Example:

Given the 'race condition' involved I am not able to give a concise single example. I am guessing that it is a case that the two workflows are both getting past:

https://github.com/dask/dask-jobqueue/blob/d562e6c8c0560f8ab84d12edb70726f536fd551f/dask_jobqueue/core.py#L379

and subsequently only one is successfully able to make the directory.

Would it make sense to use Pathlib.Path here? Something like

if self.log_directory:
    log_path = Path(self.log_directory)
    log_path.mkdir(exists_ok=True, parent=True)

Anything else we need to know?:

Environment:

  • Dask version:
  • Python version: Python 3.12.8
  • Operating System: SLES 15.5
  • Install method (conda, pip, source): pip
  • dask_jobqueue: 0.9.0
主要言語
Python
スター
256
フォーク
149
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

dask/dask-jobqueue のほかの issue

dask/dask-jobqueue の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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