Sporadic Windows fatal error on Github Python CI (may be joblib related)

18 Views Asked by At

I'm getting sporadic fatal errors for my Github CI on windows-latest, python version v3.11. While pytest is running, I get this error:

Windows fatal exception: code 0x80000003

Link to example.

But, it doesn't always happen. I reran this failing job (no changes to the code in between) and it passed. Link to the failure point on a re-run.

I'm pretty sure this is due to improvements I made to parallelization with joblib. The tests that are running when the fatal error occur involve the code in this file in this PR.

Very roughly, the relevant code is:

from tqdm import tqdm
from joblib import Parallel, cpu_count, delayed
#...
n_jobs = cpu_count()
arg_list = [
   ## kwargs dicts
]

@delayed
def get_candidates(args_dict):
   # stuff
   return result

candidate_list = Parallel(n_jobs=n_jobs)(
  get_candidates(args_dict=arg) for arg in tqdm(arg_list)
)

In case it's relevant, this is the test that's running when the fatal exception occurs.

Any insight would be appreciated!

0

There are 0 best solutions below