Files
ntfy/log
binwiederhier 3437cf6169 Fix a deadlock when canceling subscribers with debug logging, and a log override race
Canceling a subscriber logs the topic's context, which takes the topic lock. The cancels held that lock while they logged: CancelSubscribersExceptUser held the write lock (deadlock at once), the per-user cancels a read lock (deadlock as soon as a canceled stream's Unsubscribe waited for the write lock). The context is only evaluated with debug logging or log-level-overrides on. In the lab this froze the access cache reload loop after its first re-check. The cancels now collect the matching subscribers under the lock and cancel them after releasing it.

globalLevelWithOverride iterated the overrides map without the log lock while SetLevelOverride changes it in place; it now holds the read lock while iterating.
2026-10-23 22:38:59 +00:00
..
2023-05-17 10:39:15 -04:00
2025-05-21 18:49:19 -04:00
2023-02-25 20:23:22 -05:00