[MRG] Fix a race condition during joblib's dask backend termination - #1078
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1078 +/- ##
==========================================
- Coverage 94.38% 93.67% -0.71%
==========================================
Files 47 47
Lines 6908 6910 +2
==========================================
- Hits 6520 6473 -47
- Misses 388 437 +49
Continue to review full report at Codecov.
|
|
That fixes it for me as well. However there is a CI failure with: As for the solution itself, |
|
(just checking this failure is not random) |
|
So it is random. Let me push another commit. |
ogrisel
left a comment
There was a problem hiding this comment.
The test_multithreaded_parallel_termination_resource_tracker_silent failure seems to often happen on this branch. It means that the loky backend probably has a race condition that we did not know about.
Anyway the fix for the dask problem in this branch is not acceptable. It should be addressed in the dask backend itself, not in the Parallel class.
Yes, that is worth investigating, although not the highest in the priority list for me (I'd like to work on fixing memory caching in jupyter notebook + adding the dask benchmarks first) |
|
This also needs a changelog entry (@ogrisel feel free to write up something) |
@ogrisel this PR should fix #959 (comment). Feel free to checkout this PR and try it out on your machine using #959's repro.
This PR only highlights the problem (
terminatewill destroy_collectwhile_collecthas not had the time to exit yet.I'm not against using a strong synchronization primitive, but we would need to be careful about it.