Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime crashing under WSL2 on Volterra #106081

Closed
AndyAyersMS opened this issue Aug 7, 2024 · 7 comments
Closed

Runtime crashing under WSL2 on Volterra #106081

AndyAyersMS opened this issue Aug 7, 2024 · 7 comments
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@AndyAyersMS
Copy link
Member

AndyAyersMS commented Aug 7, 2024

I have Ubuntu 24.04 installed on my arm64 volterra under WSL2. I was trying to reproduce #105670.

I'm seeing crashes with both runfo-downloaded and locally built runtimes, eg from runfo bits

/home/andya/bugs/r105670/./correlation-payload/dotnet exec --runtimeconfig LibraryImportGenerator.Unit.Tests.runtimeconfig.json --depsfile LibraryImportGenerator.Unit.Tests.deps.json xunit.console.dll LibraryImportGenerator.Unit.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
popd
===========================================================================================================
~/bugs/r105670/workitems/LibraryImportGenerator.Unit.Tests ~/bugs/r105670/workitems/LibraryImportGenerator.Unit.Tests
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at System.Text.RegularExpressions.Regex..ctor(System.String, System.Globalization.CultureInfo)
   at Xunit.DependencyContextAssemblyCache..cctor()
   at Xunit.DependencyContextAssemblyCache.GetFallbackRuntime(System.String)
   at Xunit.DependencyContextAssemblyCache.<.ctor>b__17_0()

Will update once I've done a bit more debugging.

Crash happens at this load, looks like a TLS access:

/_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs @ 28:
0000f3d16c7cc1f4 40d03bd5             mrs     x0, TPIDR_EL0
0000f3d16c7cc1f8 01639bd2             mov     x1, #0xdb18
0000f3d16c7cc1fc 211dadf2             movk    x1, #0x68e9, lsl #16
0000f3d16c7cc200 016861b8             ldr     w1, [x0, x1]
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 7, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Aug 7, 2024
@AndyAyersMS AndyAyersMS added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 7, 2024
@AndyAyersMS AndyAyersMS added this to the 9.0.0 milestone Aug 7, 2024
@AndyAyersMS AndyAyersMS removed the untriaged New issue has not been triaged by the area owner label Aug 7, 2024
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@AndyAyersMS
Copy link
Member Author

@dotnet/jit-contrib FYI... who aside from Kunal is most familiar with the TLS access sequences?

@AndyAyersMS
Copy link
Member Author

Possibly related to #106052 ?

@davidwrighton
Copy link
Member

@AndyAyersMS Yeah, that looks related. there's no way that the appropriate offset from the TPIDR_EL0 register is 0x68e9db18

@davidwrighton
Copy link
Member

@AndyAyersMS I've just merged #106052, could you check to see if this fixes the issue?

@AndyAyersMS
Copy link
Member Author

Yes, will do so.

@AndyAyersMS
Copy link
Member Author

Yep, it's fixed. Thanks!

Launching dotnet exec --runtimeconfig LibraryImportGenerator.Unit.Tests.runtimeconfig.json --depsfile LibraryImportGenerator.Unit.Tests.deps.json xunit.console.dll LibraryImportGenerator.Unit.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  -maxthreads 2 in /home/andya/repos/runtime0/artifacts/bin/LibraryImportGenerator.Unit.Tests/Release/net9.0
  Discovering: LibraryImportGenerator.Unit.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  LibraryImportGenerator.Unit.Tests (found 185 of 189 test cases)
  Starting:    LibraryImportGenerator.Unit.Tests (parallel test collections = on [2 threads], stop on fail = off)
    LibraryImportGenerator.UnitTests.Compiles.ValidateSnippetsWithMarshalType [SKIP]
      No current scenarios to test.
  Finished:    LibraryImportGenerator.Unit.Tests
=== TEST EXECUTION SUMMARY ===
   LibraryImportGenerator.Unit.Tests  Total: 700, Errors: 0, Failed: 0, Skipped: 1, Time: 80.714s

@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

No branches or pull requests

2 participants