Skip to content

fix(Util): shutdown logging channels to prevent AsyncChannel deadlock on exit#5230

Merged
matejk merged 1 commit intomainfrom
5228-async-channel-deadlock
Feb 28, 2026
Merged

fix(Util): shutdown logging channels to prevent AsyncChannel deadlock on exit#5230
matejk merged 1 commit intomainfrom
5228-async-channel-deadlock

Conversation

@matejk
Copy link
Contributor

@matejk matejk commented Feb 27, 2026

Summary

  • Fixes deadlock when app exit if AsyncChannel is used in the logging system #5228 - deadlock when app exits if AsyncChannel is used in the logging system
  • LoggingSubsystem::uninitialize() was empty, so AsyncChannel's background thread was still running when static destruction began, causing deadlock on destroyed mutexes
  • Added Logger::shutdown() and LoggingRegistry::defaultRegistry().clear() calls to uninitialize() to ensure all channels are properly closed before static destruction
  • Added unit test testAsyncChannelShutdown to verify the fix

Test plan

@matejk matejk merged commit 1b23a88 into main Feb 28, 2026
102 checks passed
@matejk matejk deleted the 5228-async-channel-deadlock branch February 28, 2026 06:47
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.

deadlock when app exit if AsyncChannel is used in the logging system

1 participant