Skip to content

remove potential deadlock spot#181

Closed
netijoe wants to merge 10 commits intoJasperFx:masterfrom
netijoe:remove_deadlocking_spot
Closed

remove potential deadlock spot#181
netijoe wants to merge 10 commits intoJasperFx:masterfrom
netijoe:remove_deadlocking_spot

Conversation

@netijoe
Copy link
Copy Markdown
Contributor

@netijoe netijoe commented Apr 18, 2025

I stumbled upon neverending wait in this place during integration test run for my project.

@jeremydmiller jeremydmiller changed the base branch from master to 7.0 April 25, 2025 17:27
@jeremydmiller jeremydmiller changed the base branch from 7.0 to master June 9, 2025 21:47
@netijoe
Copy link
Copy Markdown
Contributor Author

netijoe commented Jun 23, 2025

Should I do sth about this conflict or leave it to you @jeremydmiller ?

@jeremydmiller
Copy link
Copy Markdown
Member

Closing — the deadlock fix has been cherry-picked into a fresh branch against current master. Thank you @netijoe for identifying this issue! The fix is in PR #(pending).

jeremydmiller added a commit that referenced this pull request Apr 9, 2026
Move the double-check of _hasInitialized and _partitions.Clear() inside
the try block after acquiring the semaphore. Previously, if two threads
entered WaitAsync simultaneously, the second could bypass the semaphore
guard and proceed without the lock held.

Based on the fix identified in #181 by @netijoe.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jeremydmiller added a commit that referenced this pull request Apr 9, 2026
Move the double-check of _hasInitialized and _partitions.Clear() inside
the try block after acquiring the semaphore. Previously, if two threads
entered WaitAsync simultaneously, the second could bypass the semaphore
guard and proceed without the lock held.

Based on the fix identified in #181 by @netijoe.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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