Fix possible deadlock in neuron update loop in multithreaded code (fixes #718) #734
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a potential deadlock when a neuron throws an exception during multithreaded simulation (#718).
Since it is difficult to test for deadlocks in unittests, there is no automated test. This manual test is inspired by @maharjun's deadlock module. To test, add the following to the beginning of
iaf_psc_alpha::update()
:and run the following SLI script from a file
NEST should hang if you use current master; with the correction given here, NEST should terminate with an error message.
@maharjun Would you test and review this fix?