Skip to content

Backport of fix(shutdown): Prevent race condition when GlobalObject destruction routine unlocks global mutex#8687

Merged
dyemanov merged 1 commit intoFirebirdSQL:v5.0-releasefrom
TreeHunter9:v5.0-release-race-on-shutdown-global-objects
Aug 6, 2025
Merged

Backport of fix(shutdown): Prevent race condition when GlobalObject destruction routine unlocks global mutex#8687
dyemanov merged 1 commit intoFirebirdSQL:v5.0-releasefrom
TreeHunter9:v5.0-release-race-on-shutdown-global-objects

Conversation

@TreeHunter9
Copy link
Copy Markdown
Contributor

Unlocking global mutex in GlobalObject destruction routine made it possible for a new attachment to slip in, so it will be creating new GlobalObject and using it, while destroying routine still in action. This can lead to an undefined state of the global objects, such as shared memory, where one thread is actively using it while another thread is destroying it.

Backport of #8652.

…estruction routine unlocks global mutex

Unlocking global mutex in GlobalObject destruction routine made it possible for a new attachment to slip in, so it will be creating new GlobalObject and using it, while destroying routine still in action. This can lead to an undefined state of the global objects, such as shared memory, where one thread is actively using it while another thread is destroying it.
@dyemanov dyemanov merged commit f55f77e into FirebirdSQL:v5.0-release Aug 6, 2025
22 checks passed
@TreeHunter9 TreeHunter9 deleted the v5.0-release-race-on-shutdown-global-objects branch August 6, 2025 06:28
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.

2 participants