Fix OleTxTests.Recovery CI timeout by bounding remote process wall-clock time#125813
Open
Fix OleTxTests.Recovery CI timeout by bounding remote process wall-clock time#125813
Conversation
…all-clock time Co-authored-by: danmoseley <6385855+danmoseley@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix recovery timeout error in OleTx tests
Fix OleTxTests.Recovery CI timeout by bounding remote process and test wall-clock time
Mar 20, 2026
Contributor
|
Tagging subscribers to this area: @SamMonoRT, @dotnet/efteam |
…out on async methods) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
danmoseley
approved these changes
Mar 20, 2026
This was referenced Mar 20, 2026
Open
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
OleTxTests.Recoveryrepeatedly times out the CI work item (the entireSystem.Transactions.Local.Testswork item is killed). The CI error gives no detail beyond the timeout — no stack traces or indication of where the hang occurs.The most likely scenario is that MSDTC is unresponsive on certain CI machines, causing the child process spawned by
RemoteExecutor.Invoketo hang (either stuck in MSDTC COM interop, or sitting in its intentionalThread.Sleepwaiting for a commit callback that never arrives). SinceRemoteInvokeOptions.TimeOutdefaults toTimeout.Infinite,RemoteInvokeHandle.Dispose()blocks indefinitely waiting for the child to exit, and the test never completes.It's also possible the main test thread hangs in
tx.Commit()or one of theWaitOne(Timeout)calls. This change would not help in that case — only the child process is bounded. If the timeout continues to repro after this change, the main thread is the more likely culprit and would need its own timeout or the test should be skipped on affected CI legs.Change:
TimeOut = 120_000toRemoteInvokeOptionssoRemoteInvokeHandle.Dispose()will force-kill the child process after 2 minutes (with a diagnostic dump at the halfway point) instead of blocking indefinitely. This bounds the test's wall-clock time and should prevent it from consuming the entire work item timeout budget.Changes
src/libraries/System.Transactions.Local/tests/OleTxTests.csTesting
This change targets a flaky/hanging test; no new test logic is added. The fix will be validated by the reduction in CI work item timeouts on Windows runs. The test requires MSDTC and cannot be run locally in most environments (the
ConditionalFactskips it when MSDTC is unavailable).