Skip to content

[HttpStress] Re-enable ASAN for msquic#113669

Merged
antonfirsov merged 3 commits intodotnet:mainfrom
antonfirsov:httpstress-asan-test-1
Mar 25, 2025
Merged

[HttpStress] Re-enable ASAN for msquic#113669
antonfirsov merged 3 commits intodotnet:mainfrom
antonfirsov:httpstress-asan-test-1

Conversation

@antonfirsov
Copy link
Copy Markdown
Contributor

Experiments to address #111854

Copilot AI review requested due to automatic review settings March 18, 2025 20:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • src/libraries/System.Net.Http/tests/StressTests/HttpStress/Dockerfile: Language not supported

@antonfirsov antonfirsov marked this pull request as draft March 18, 2025 20:09
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@antonfirsov
Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries stress-http

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@antonfirsov antonfirsov changed the title [HttpStress] Re-enable ASAN for msquic [WIP] [HttpStress] Re-enable ASAN for msquic Mar 18, 2025
# configure adress sanitizer
# ENV ASAN_OPTIONS='detect_leaks=0'
# ENV LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/12/libasan.so
ENV ASAN_OPTIONS='detect_leaks=0'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should grab all of the options we return from __asan_default_options in the minipal. That has the complete list of the options required to use ASAN with CoreCLR.

Copy link
Copy Markdown
Contributor Author

@antonfirsov antonfirsov Mar 18, 2025

Choose a reason for hiding this comment

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

We are only building msquic in this Dockerfile. CoreCLR is built without ASAN for HttpStress.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, but the ASAN_OPTIONs along with the LD_PRELOAD influence the whole process, so the options incompatible with CoreCLR should be disabled.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 63123d1. Hope it is how it should be, I don't have a deep understanding on these flags.

@antonfirsov
Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries stress-http

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@antonfirsov
Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries stress-http

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@antonfirsov antonfirsov marked this pull request as ready for review March 19, 2025 18:23
@antonfirsov antonfirsov changed the title [WIP] [HttpStress] Re-enable ASAN for msquic [HttpStress] Re-enable ASAN for msquic Mar 19, 2025
@antonfirsov antonfirsov requested a review from rzikm March 19, 2025 18:23
# ENV LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/12/libasan.so
# Make sure ASAN_OPTIONS are compatible with CoreCLR: https://github.com/dotnet/runtime/blob/300485de6f5bf52c28192da930e1aa79cfef46df/src/native/minipal/sansupport.c#L18
ENV ASAN_OPTIONS='symbolize=1 use_sigaltstack=0 detect_leaks=0 handle_segv=0 allocator_may_return_null=1'
ENV LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/13/libasan.so
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rzikm the key was to bump the gcc version in this path

@antonfirsov
Copy link
Copy Markdown
Contributor Author

/ba-g CI failures are unrelated (different pipelines)

@antonfirsov antonfirsov merged commit 71cd23b into dotnet:main Mar 25, 2025
81 of 86 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants