Commit 6a815e8
Add retry for StackTraceTests.ToString_ShowILOffset AMSI hang (#125814)
The `ToString_ShowILOffset` test's `Assembly.Load(byte[])` case triggers
an AMSI (Antimalware Scan Interface) scan via Windows Defender RPC. On
some Helix CI machines, this RPC call hangs indefinitely on
`NtAlpcConnectPort`, causing the 60-second RemoteExecutor timeout.
This is an external Windows OS/Defender issue, not a .NET bug (diagnosed
in #122690 by @jkotas).
### Changes
- **Split** the `Assembly.Load(byte[])` case into its own test method
(`ToString_ShowILOffset_ByteArrayLoad`) so an AMSI hang no longer drags
down the other two stable cases (LoadFrom and AssemblyBuilder).
- **Added retry logic** with up to 3 attempts and a 30s timeout. Each
retry spawns a fresh child process via RemoteExecutor, giving the AMSI
RPC a new chance to succeed.
Fixes #125599
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 83f84b6 commit 6a815e8
File tree
1 file changed
+38
-18
lines changed- src/libraries/System.Diagnostics.StackTrace/tests
1 file changed
+38
-18
lines changedLines changed: 38 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
| 545 | + | |
562 | 546 | | |
563 | 547 | | |
564 | 548 | | |
| |||
583 | 567 | | |
584 | 568 | | |
585 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
586 | 606 | | |
587 | 607 | | |
588 | 608 | | |
| |||
0 commit comments