Repository navigation
ComInterfaceGenerator.Unit.Tests.WorkItemExecution failing with Internal CLR error on Win x86 #77087
Copy link
Copy link
Closed
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabUse this to report build issues in the .NET Helix tabarea-GC-coreclrblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'bugtenet-reliabilityReliability/stability related issue (stress, load problems, etc.)Reliability/stability related issue (stress, load problems, etc.)
Description
Discovering: ComInterfaceGenerator.Unit.Tests (method display = ClassAndMethod, method display options = None)
Discovered: ComInterfaceGenerator.Unit.Tests (found 10 test cases)
Starting: ComInterfaceGenerator.Unit.Tests (parallel test collections = on, max threads = 2)
Fatal error. Internal CLR error. (0x80131506)
Build Information
Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=53751
Build error leg or test failing: ComInterfaceGenerator.Unit.Tests.WorkItemExecution
Pull request: #77080
Log: https://dev.azure.com/dnceng-public/public/_build/results?buildId=53751&view=ms.vss-test-web.build-test-results-tab&runId=1099832&resultId=206563&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab
{
"ErrorMessage": "Fatal error. Internal CLR error. (0x80131506)",
"BuildRetry": false
}Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 3 | 30 | 32 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabUse this to report build issues in the .NET Helix tabarea-GC-coreclrblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'bugtenet-reliabilityReliability/stability related issue (stress, load problems, etc.)Reliability/stability related issue (stress, load problems, etc.)
Activity
jkotas commentedon Oct 15, 2022
Stacktrace of the crash:
jkotas commentedon Oct 15, 2022
The problem is that the C++ compiler optimizer decided to duplicate the memory load.
The code (after inlining) looks like this:
It got transformed to this:
The crash is caused
*pobeing changed on the foreground thread to a null pointer between the point the bounds check is executed and the rest of the method.Duplicating memory loads like this is allowed optimization in C++. The fix should be to sprinkle
VolatileLoadWithoutBarrierto all places where this sort of pattern occurs.jkotas commentedon Oct 15, 2022
Disassembly for reference:
Maoni0 commentedon Oct 28, 2022
thanks @jkotas. @cshung is making a fix for what Jan mentioned above. we'll be reviewing the code to see if there are other places we need to fix.