[Merge-on-Red] - Generate native/manage stack traces for runtime test crashes #77918
Closed
Description
Native crashes of tests should produce the native/manage stack trace that can be shown in Build Analysis
page for easier discoverability as well as linking to "known issues".
Goals
When runtime tests fail because of crash or assert, sometimes the developer has to open the console.log
of failed test cases to find out the cause. With Merge-on-Red
work, we want to provide better experience to the developer where they can see all the information in "Build Analysis" tab which includes the failure details as well as link to any known issues that is already filed in Github. To enable that, we need to have a way to produce textual report of managed/native stack trace that helix can send it back to AzDo.
Work Items
- Use
-crashreport
feature ofcreateDump.exe
for Linux/mac to generate the stack trace report injson
format. WIP: Produce crashreport.json and use llvm-symbolizer to create stack trace #77578- We discovered that
-crashreport
, which usesdladdr
does not resolve the native symbol names for non-exported methods. As such, we might have to try different approach.
- We discovered that
- See if we can copy
dotnet-sos
command to the helix and update CoreclrTestWrapperLib.cs to thelldb
command on the generated crash dump, whenever crash happens. The command would be something likelldb -c test.dmp ~/path/to/corerun -o "setclrpath ~/path/to/CORE_ROOT/" -o "bt all" -o "clrstack -all -f" -o "quit"
. - We might need to copy
cdb
in correlation payload or update helix/containers to include it. But once it is there, we could use!analyze
to produce the native and managed (with the help of sos) stacktraces. We decided to installcdb
(which comes with sos on windows helix machines). Install public version of windbg/cdb on windows helix machines arcade#11868