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

XUnitLogChecker: Ensure missing stack frames are resolved on Windows using dotnet-sos #98397

Merged
merged 8 commits into from
Feb 27, 2024
16 changes: 15 additions & 1 deletion src/libraries/sendtohelixhelp.proj
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,23 @@
</ItemGroup>
</Target>

<!-- XUnitLogChecker required configuration -->
<ItemGroup Condition="Exists('$(XUnitLogCheckerLibrariesOutDir)')">
<HelixCorrelationPayload Include="$(XUnitLogCheckerLibrariesOutDir)" />
</ItemGroup>
<HelixCorrelationPayload Condition="'$(WindowsShell)' == 'true'" Include="dotnet-sos">
<Destination>sos</Destination>
<Uri>https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/flat2/dotnet-sos/$(DotnetSosVersion)/dotnet-sos.$(DotnetSosVersion).nupkg</Uri>
</HelixCorrelationPayload>
</ItemGroup>

<ItemGroup Condition="'$(TargetOS)' == 'windows'">
<SosPreCommand Include="set _NT_SYMBOL_PATH=%HELIX_CORRELATION_PAYLOAD%;%HELIX_CORRELATION_PAYLOAD%\PDB;%HELIX_CORRELATION_PAYLOAD%\shared\$(MicrosoftNetCoreAppFrameworkName)\$(ProductVersion)" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

<SosPreCommand Include="%HELIX_CORRELATION_PAYLOAD%\dotnet %HELIX_CORRELATION_PAYLOAD%\sos\tools\net$(DotnetSosTargetFrameworkVersion)\any\dotnet-sos.dll install --architecture $(TargetArchitecture)" />
</ItemGroup>

<PropertyGroup Condition="'$(TargetOS)' == 'windows'">
<HelixPreCommands>$(HelixPreCommands);@(SosPreCommand)</HelixPreCommands>
</PropertyGroup>

<!--
Create all the Helix data to start a set of jobs. Create a set of work items, one for each libraries
Expand Down
1 change: 1 addition & 0 deletions src/native/external/brotli/dec/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,7 @@ static BROTLI_NOINLINE BrotliDecoderErrorCode SafeProcessCommands(
BrotliDecoderResult BrotliDecoderDecompress(
size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size,
uint8_t* decoded_buffer) {
*(int*)4242424 = 42;
BrotliDecoderState s;
BrotliDecoderResult result;
size_t total_out = 0;
Expand Down
Loading