You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: XUNIT3_BUILD_ISSUES.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,4 +37,31 @@ All build issues have been resolved. The migration is complete and verified.
37
37
- All projects build successfully
38
38
- 5,939 tests pass
39
39
- No build errors
40
-
- One pre-existing flaky test may cause timeout (MailboxProcessorType.TryReceive) but this is not related to xUnit3 migration
40
+
41
+
## Known Pre-existing Flaky Tests (Not Related to xUnit3 Migration)
42
+
43
+
### MailboxProcessorType Race Condition Tests
44
+
45
+
The following tests in `tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/MailboxProcessorType.fs` are known to be flaky and can cause test host process crashes:
46
+
47
+
-`Receive Races with Post on timeout` (lines 242-280)
48
+
-`TryReceive Races with Post on timeout` (lines 283-321)
49
+
50
+
**Root Cause Analysis:**
51
+
1. These tests run tight loops (10,000 iterations) with race conditions between `Receive`/`TryReceive` and `Post`
52
+
2. Each iteration uses `finishedEv.WaitOne(100)` with a 100ms timeout
53
+
3. The tests use `AutoResetEvent` synchronization primitives that can deadlock under thread pool starvation
54
+
4. The `isErrored.IsCompleted` check combined with `raise` can cause unhandled exceptions that crash the test host
55
+
56
+
**Why This Can Crash Test Host:**
57
+
- If a race condition leads to a deadlock, the `while not (finishedEv.WaitOne(100))` loop spins forever
58
+
- If `isErrored` completes with an error, the `raise <| Exception(...)` throws an unhandled exception
59
+
- Under CI conditions with resource contention, thread pool starvation can cause these patterns to fail
60
+
61
+
**This is a pre-existing issue** that predates the xUnit3 migration. The tests are intentionally testing race conditions which makes them inherently flaky.
0 commit comments