check hangs forever when parallel execution is on
See original GitHub issueHello. There is the following issue with parallel execution.
Suppose there are two files with unused imports:
test_parallel/test1.py
import sys
test_parallel/test2.py
import sys
When run a check executed in parallel (-j 0
by default), it detects the unused imports, but then it hangs forever. And it needs keyboard interrupt to exit:
$ autoflake test_parallel --check
test_parallel/test1.py: Unused imports/variables detected
test_parallel/test2.py: Unused imports/variables detected
^CProcess SpawnPoolWorker-10:
Process SpawnPoolWorker-9:
Process SpawnPoolWorker-8:
Process SpawnPoolWorker-6:
Process SpawnPoolWorker-5:
Process SpawnPoolWorker-4:
Process SpawnPoolWorker-2:
Process SpawnPoolWorker-1:
Traceback (most recent call last):
Once child process exits after errors found, the main process just sits there waiting for something to be returned from the child process. But child have already exited, so there is nothing to return resulting in a forever wait.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Parallel Execution, Appium hangs on first command (after ...
The problem Working fine on one device, but hangs forever on the first command with two or more. Example commands that hang for...
Read more >Parallel Test Execution hangs indefinitely for rspec
So my question is simple: Why is it hanging, how can I debug why its hanging, and how can I stop it from...
Read more >Solved: Yarn applications hang foreever if run in parallel
Now we get the problem that if we run multiple applications in parallel all stop and no one finished. it looks as if...
Read more >How to diagnose a hanging DataStage Parallel job on AIX or ...
Answer. Determine whether the parallel job is hung: If a job is hung, the DataStage Director shows that the job is running but...
Read more >[JENKINS-27969] parallel([:]) hangs forever
After that it is not possible to abort it, not even by restart. The workaround in JENKINS-25550 did the trick. Parallel should not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, the problem is that we’re calling sys.exit and that blocks the pool. #133 fixes it.
I can repro with the following steps:
Investigating it now, if I don’t succeed I’ll update with more info for others.