XUnitLogChecker: Ensure missing stack frames are resolved on Windows using dotnet-sos#98397
XUnitLogChecker: Ensure missing stack frames are resolved on Windows using dotnet-sos#98397carlossanlop merged 8 commits intodotnet:mainfrom carlossanlop:ResolveFramesXULC
Conversation
|
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsFixes #94721
|
|
@carlossanlop can you locate the log from the configuration that was missing stack trace information before and confirm this fixes it? |
|
I am not entirely confident the fix worked. Maybe the environment variable has the wrong name or value, @hoyosjs? Here are three examples:
ExpandNotable warnings/errors: Full output: ExpandNotable error: Full output:
ExpandNotable warnings/errors: Full output: |
|
I just noticed that |
Add full path of dotnet executable for dotnet-sos. Put the commands in an itemgroup, then expand it in the HelixPreCommands property.
|
There's two issues:
|
Which registry key is it? |
src/libraries/sendtohelixhelp.proj
Outdated
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetOS)' == 'windows'"> | ||
| <SosPreCommand Include="set _NT_SYMBOL_PATH=%HELIX_CORRELATION_PAYLOAD%;%HELIX_CORRELATION_PAYLOAD%\PDB;%HELIX_CORRELATION_PAYLOAD%\shared\$(MicrosoftNetCoreAppFrameworkName)\$(ProductVersion)" /> |
There was a problem hiding this comment.
you can't use semicolons in cases like this. may need to be a property and add it at the end. Also, escape setting _NT_SYMBOL_PATH with %22
There was a problem hiding this comment.
may need to be a property and add it at the end
I don't understand that suggestion. Would you mind elaborating? Why wouldn't ; work as an env var value separator?
escape setting _NT_SYMBOL_PATH with %22
Not sure I follow. Did you actually mean escaping the % character I used for %HELIX_CORRELATION_PAYLOAD%? If that's the case, I am looking at other examples in the same file, and when an env var is set in an ItemGroup Include attribute, there's no need for escaping (I have no idea why). Escaping seems to only be required when setting an env var value in the xml value of a property (raw text).
There was a problem hiding this comment.
Ok I see. The semicolon is not going to concatenate the values of the _NT_SYMBOL_PATH env var. Instead, they are getting printed in separate lines. I'm trying an alternative approach.
There was a problem hiding this comment.
Pushed a commit that ensures the env var values separated by ; get printed in the same line, and I avoided using an item group for that. I tested it locally and it worked. Can you please take another look, @hoyosjs?
| <PropertyGroup Condition="'$(TargetOS)' == 'windows'"> | ||
| <NtSymbolPathEnvVar>set _NT_SYMBOL_PATH=%25HELIX_CORRELATION_PAYLOAD%25%3B%25HELIX_CORRELATION_PAYLOAD%25\PDB%3B%25HELIX_CORRELATION_PAYLOAD%25\shared\$(MicrosoftNetCoreAppFrameworkName)\$(ProductVersion)</NtSymbolPathEnvVar> | ||
| <ExecuteDotNetSos>%25HELIX_CORRELATION_PAYLOAD%25\dotnet %25HELIX_CORRELATION_PAYLOAD%25\sos\tools\net$(DotnetSosTargetFrameworkVersion)\any\dotnet-sos.dll install --architecture $(TargetArchitecture)</ExecuteDotNetSos> | ||
| <HelixPreCommands>$(HelixPreCommands);$(NtSymbolPathEnvVar);$(ExecuteDotNetSos)</HelixPreCommands> |
There was a problem hiding this comment.
If it works, LGTM. Otherwise use %3B to escape the ;
There was a problem hiding this comment.
@hoyosjs In line 255? No, in that specific case I do want to use the real behavior of ; so that each property value gets printed in a separate line.
In line 253 I did use %3B, as it was necessary to ensure the different values were all in the same line when setting the env var.
I also made sure to escape all the % to %25 in 253 and 254.
|
Confirmed it works @hoyosjs @ericstj! I can now revert the crash commit. I can see most of the dump file frame symbols are getting resolved (I can finally see the ones that are prefixed with Here's how the env var setting and the sos execution look like: These are the log examples:
|
This reverts commit 1d649ae.
Fixes #94721
TODO: Revert the temporary crash commit before merging.