concurrent_grant_revoke_never_corrupts_the_store is flaky
Relevant area(s)
Linux, Windows
Brief description of your issue
Test intermittently fails with the following stack but passes on rerun
thread 'telemetry::consent::tests::windows_tests::concurrent_grant_revoke_never_corrupts_the_store' (1488) panicked at core\wxc_common\src\telemetry\consent.rs:2448:21:
iteration 0, concurrent writer 6 failed: Err("failed to lock telemetry consent: The process cannot access the file because it is being used by another process. (os error 32)")
stack backtrace:
0: std::panicking::panic_handler
at /rustc/01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf/library\std\src\panicking.rs:689
1: core::panicking::panic_fmt
at /rustc/01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf/library\core\src\panicking.rs:80
2: wxc_common::telemetry::consent::tests::windows_tests::concurrent_grant_revoke_never_corrupts_the_store
at .\src\telemetry\consent.rs:2448
3: wxc_common::telemetry::consent::tests::windows_tests::concurrent_grant_revoke_never_corrupts_the_store::closure$0
at .\src\telemetry\consent.rs:2426
4: core::ops::function::FnOnce::call_once<wxc_common::telemetry::consent::tests::windows_tests::concurrent_grant_revoke_never_corrupts_the_store::closure_env$0,tuple$<> >
at /rustc/01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf\library\core\src\ops\function.rs:250
5: core::ops::function::FnOnce::call_once
at /rustc/01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf/library\core\src\ops\function.rs:250
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
Steps to reproduce
Run MXC consent tests
Expected behavior
Test passes consistently
Actual behavior
Test fails intermittently based on external conditions
Another occurrence on October 12, 2026: the Windows x64 Test step for documentation-only PR #1471 failed in core_modules::mxc_common::telemetry::consent::tests::windows_tests::concurrent_grant_revoke_never_corrupts_the_store.
At iteration 3, concurrent writer 15 returned failed to lock telemetry consent: The process cannot access the file because it is being used by another process. (os error 32). The Rust library run had 3,417 passed and one failed; the Windows arm64 job passed. The PR changes only five documentation files and does not touch this test.
Failed job: https://github.com/microsoft/mxc/actions/runs/38308370047/job/115007947622