Skip to content

Bug: ci-mstest-testhost-crash-in-folder-tree-service-tests #1004

Open

Description

@drmoisan
  • Work Mode: full-bug

Summary

The CI mstest-coverage job intermittently aborts with "Test host process crashed" while the UtilitiesCS.Test OutlookFolderTreeService concurrency, disposal and invalidation tests are running. No assertion fails; the test host process dies, so the run reports an unknown total and fails the job.

Environment

  • OS/version: GitHub Actions windows runner, Visual Studio 18 test platform (vstest.console.exe)
  • Python version: not applicable (C# .NET Framework 4.8 MSTest)
  • Command/flags used: scripts/vscode/Invoke-MSTestWithCoverage.ps1 via the CI mstest-coverage job
  • Data source or fixture: UtilitiesCS.Test OutlookFolderTreeServiceConcurrencyTests, OutlookFolderTreeServiceDisposalTests, OutlookFolderTreeServiceInvalidationTests

Steps to Reproduce

  1. Run the CI workflow on a pull request (observed on PR fix(quickfiler): EFC recursive subfolder selection, trash selection, and QFC nested indentation (#1002) #1003, run 39794073798, attempt 1, head e94c261).
  2. Observe the mstest-coverage job: 4622 tests pass, then "The active test run was aborted. Reason: Test host process crashed".
  3. Re-run the failed job on the same commit: attempt 2 passed all checks, so the crash is intermittent.

Expected Behavior

The MSTest run completes deterministically; no test leaves an unhandled exception on a background or dispatcher thread that can terminate the test host.

Actual Behavior

Intermittent test host crash. The last tests reported before the crash were GetSnapshotAsync_WorkerOriginatedColdBuild_UsesCapturedStaDispatcher, Dispose_DuringRefresh_LeavesDisposedWithoutPublicationOrNotification, FolderChanged_DuringInFlightBuild_SchedulesOneFollowUpRefresh, NotificationRefreshAndDispose_RunOnTheCapturedDispatcher and NotificationRefresh_RunsOnCapturedDispatcher.

Logs / Screenshots

  • Attached minimal logs or screenshot
  • Snippet: The active test run was aborted. Reason: Test host process crashed : Process path: ...\TestPlatform\Extensions\..\testhost.exe / Test Run Aborted. Total tests: Unknown Passed: 4622

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

Source

From: docs/features/potential/2026-10-22-ci-mstest-testhost-crash-in-folder-tree-service-tests.md

Activity

  1. drmoisan commented on Oct 22, 2026

    @drmoisan
    OwnerAuthor

    Suspected Cause / Notes

    Proposed Fix / Validation Ideas

    • Unit coverage areas: guard dispatcher and continuation callbacks in OutlookFolderTreeService against post-dispose execution; make the concurrency tests join or drain their dispatcher threads before returning
    • Integration scenario to retest: repeated CI runs of UtilitiesCS.Test in the CI shape, with blame crash collection enabled
    • Manual verification notes: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions