Repository navigation
fix(volume): cancel the pending volume lookup's timeout when the lookup finishes - #2087
Merged
l0gicgate merged 2 commits intoNov 8, 2026
Merged
Conversation
…up finishes The 2 s timeout task of a volume lookup stayed on the main context after the lookup finished or was cancelled, keeping its state and cancellable alive until it fired and found nothing to do. The lookup now keeps the task's handle and aborts it when it finishes or is cancelled with nobody waiting. The timer path detaches its own handle first so it does not abort itself. Closes lgse#2069
…s test The finished-lookup case repeated the setup of pending_lookup_finishes_promptly_without_reentering with an unbounded busy loop, so assert the released state there instead. The cancelled case waited a fixed 100 ms for the cancelled query callback to drop its state reference; poll until it does, bounded below the 2 s timeout, so a slow GIO worker pool cannot fail it.
Contributor
Review and cleanupMerged Review against the description and #2069. Every point of the suggested fix is implemented in
Fixes pushed
Tests removed
Validation
CI: all checks green on |
wmfeht
pushed a commit
to wmfeht/strata-feature-map
that referenced
this pull request
Nov 9, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RQ23ADLhhcsMQ5fRCT8Evz
wmfeht
pushed a commit
to wmfeht/strata-feature-map
that referenced
this pull request
Nov 9, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RQ23ADLhhcsMQ5fRCT8Evz
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.
Description
A volume lookup (
PendingVolumeLookup::start) spawned a 2 s timeout task that was never cancelled. After a lookup finished or was cancelled, the task stayed on the main context for about 2 s, keeping the lookup's state and cancellable alive until it fired and found nothing to do.The lookup now keeps the task's
JoinHandleand aborts it when the lookup finishes, and when it is cancelled with nothing waiting. A lookup that someone is waiting on keeps its timeout, since that is what ends it on a dead mount. The timeout path drops its own handle before callingfinish, so the task does not abort itself.SourceId::remove()is not used, because it only searches the default context.Visual evidence
N/A. Internal timer cleanup with no visible change.
How to test
./scripts/test-headless.py adapters::volume.PendingState::abort_timerinsrc/adapters/volume.rsonly drop the handle and run./scripts/test-headless.py lookup_regressionsagain.Expected result: All volume tests pass. With the abort disabled,
finished_lookup_leaves_no_timeout_task_holding_its_stateandcancelled_lookup_leaves_no_timeout_task_holding_its_statefail with a reference count of 2 instead of 1.Related issue
Closes #2069