Skip to content
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

Fix potential deadlock when starting the encryption thread #8403

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

MochalovAlexey
Copy link
Contributor

@MochalovAlexey MochalovAlexey commented Jan 20, 2025

fixes #8402
add a check to verify thread matching between the encryption thread and the thread where we release the attachment. If they match, use a dummy mutex instead of the actual dbb_thread_mutex to avoid a deadlock

…nd the thread where we release the attachment. If they match, use a dummy mutex instead of the actual dbb_thread_mutex to avoid a deadlock
@MochalovAlexey MochalovAlexey changed the title Fix potential deadlock when starting the encryption thread (fixes #8402) Fix potential deadlock when starting the encryption thread Jan 20, 2025
@AlexPeshkoff AlexPeshkoff self-assigned this Jan 20, 2025
src/jrd/jrd.cpp Show resolved Hide resolved
@AlexPeshkoff AlexPeshkoff merged commit 7aac4d7 into FirebirdSQL:master Jan 23, 2025
24 checks passed
@MochalovAlexey MochalovAlexey deleted the crypt_thread_deadlock branch January 24, 2025 06:21
dyemanov pushed a commit that referenced this pull request Jan 27, 2025
* add a check to verify thread matching between the encryption thread and the thread where we release the attachment. If they match, use a dummy mutex instead of the actual dbb_thread_mutex to avoid a deadlock

* fix Windows build by introducing a method to retrieve thread id from crypto thread handle

* rename the crypt process thread id variable to its actual purpose as handle

---------

Co-authored-by: aleksey.mochalov <aleksey.mochalov@red-soft.ru>
dyemanov pushed a commit that referenced this pull request Jan 27, 2025
* add a check to verify thread matching between the encryption thread and the thread where we release the attachment. If they match, use a dummy mutex instead of the actual dbb_thread_mutex to avoid a deadlock

* fix Windows build by introducing a method to retrieve thread id from crypto thread handle

* rename the crypt process thread id variable to its actual purpose as handle

---------

Co-authored-by: aleksey.mochalov <aleksey.mochalov@red-soft.ru>
MochalovAlexey pushed a commit to MochalovAlexey/firebird that referenced this pull request Jan 27, 2025
…QL#8403) B3_0_Release backport

add a check to verify thread matching between the encryption thread and the thread where we release the attachment. If they match, use a dummy mutex instead of the actual dbb_thread_mutex to avoid a deadlock
dyemanov pushed a commit that referenced this pull request Jan 28, 2025
…_0_Release backport (#8412)

add a check to verify thread matching between the encryption thread and the thread where we release the attachment. If they match, use a dummy mutex instead of the actual dbb_thread_mutex to avoid a deadlock

Co-authored-by: aleksey.mochalov <aleksey.mochalov@red-soft.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential deadlock when starting the encryption thread
5 participants