Fix invalid lock sequence: move LOCK_TIMERS_READ out of rendering path#64
Merged
MegaV0lt merged 1 commit intoMegaV0lt:masterfrom Mar 5, 2026
Merged
Fix invalid lock sequence: move LOCK_TIMERS_READ out of rendering path#64MegaV0lt merged 1 commit intoMegaV0lt:masterfrom
MegaV0lt merged 1 commit intoMegaV0lt:masterfrom
Conversation
TopBarUpdate() is called from Flush(), which VDR's cEITScanner::Process()
invokes while already holding the Channels read lock. RecCountCache.UpdateIfNeeded()
acquired LOCK_TIMERS_READ inside that call chain, producing the sequence:
Channels(R) held → Timers(R) acquired
VDR requires Timers to be locked *before* Channels (lower ordinal first),
so this is an invalid lock sequence reported at runtime.
Move the UpdateIfNeeded() call to cPluginFlat::Housekeeping(), which VDR
calls periodically from the main loop with no global state locks held.
The render path now only reads the atomic s_NumRecordings — zero locking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TopBarUpdate() is called from Flush(), which VDR's cEITScanner::Process() invokes while already holding the Channels read lock. RecCountCache.UpdateIfNeeded() acquired LOCK_TIMERS_READ inside that call chain, producing the sequence:
VDR requires Timers to be locked before Channels (lower ordinal first), so this is an invalid lock sequence reported at runtime.
Move the UpdateIfNeeded() call to cPluginFlat::Housekeeping(), which VDR calls periodically from the main loop with no global state locks held. The render path now only reads the atomic s_NumRecordings — zero locking.