Skip to content

Fix potential deadlock in GetByListener function#489

Open
roosenj wants to merge 1 commit intomochi-mqtt:mainfrom
roosenj:bug/recursive-read-deadlock
Open

Fix potential deadlock in GetByListener function#489
roosenj wants to merge 1 commit intomochi-mqtt:mainfrom
roosenj:bug/recursive-read-deadlock

Conversation

@roosenj
Copy link
Copy Markdown

@roosenj roosenj commented Jan 5, 2026

The deadlock occured when a write lock was requested between the two recursive read locks. The second read lock request blocked, preventing the first read lock from releasing and allowing the write lock, thus creating a deadlock.

This fixes issue #488

The deadlock occured when a write lock was requested between the two
recursive read locks. The second read lock request blocked, preventing
the first read lock from releasing and allowing the write lock, thus
creating a deadlock.
werbenhu
werbenhu previously approved these changes Apr 11, 2026
Copy link
Copy Markdown
Member

@werbenhu werbenhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is indeed an issue. Thanks, @roosenj

IshanDaga
IshanDaga previously approved these changes Apr 11, 2026
@roosenj roosenj dismissed stale reviews from IshanDaga and werbenhu via 57237dd April 13, 2026 07:38
@roosenj roosenj force-pushed the bug/recursive-read-deadlock branch from 4e7a939 to 57237dd Compare April 13, 2026 07:38
@roosenj
Copy link
Copy Markdown
Author

roosenj commented Apr 13, 2026

seems I pushed our gitlab CI configuration by accident, so I've removed it

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.

6 participants