Skip to content

FIX MultiProc deadlock #1756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 17, 2016
Merged

FIX MultiProc deadlock #1756

merged 2 commits into from
Dec 17, 2016

Conversation

ccraddock
Copy link
Collaborator

FIX MultiProc deadlock

Reduced the complexity of the MultiProc processing to reduce likelihood for deadlock by:

removing semaphores and replacing with event, this allows for a timeout in the wait that safeguards against deadlock
setting results directly from apply_async callback rather than two stage processing, where a signal is sent from the callback, that wakes the multiproc.run() thread, which then sets the results -- this is where i think the previous deadlock was happening
Found deadlock where events would be cleared before they were handled, creating scenarios where thread waits for a signal that will never come -- fixed by changing the location from before the wait to after

Added missing close thread pool

Re-enabled multiproc tests

-- rebased with master

@codecov-io
Copy link

Current coverage is 71.12% (diff: 97.14%)

Merging #1756 into master will increase coverage by 0.04%

@@             master      #1756   diff @@
==========================================
  Files          1028       1028          
  Lines         50649      50665    +16   
  Methods           0          0          
  Messages          0          0          
  Branches       7334       7335     +1   
==========================================
+ Hits          36004      36037    +33   
+ Misses        13518      13501    -17   
  Partials       1127       1127          

Powered by Codecov. Last update dbfa85a...e1d8ec9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants