Skip to content

Conversation

lateralusX
Copy link
Member

@lateralusX lateralusX commented Mar 18, 2022

Collect tracing 2 EventPipe command triggers an unaligned UTF16 string read that could cause a SIGBUS on platforms not supporting unaligned reads of UTF16 strings.

On CoreCLR this could even cause a unaligned int read due to optimizations used in UTF8Encoding::GetByteCount.

Customer Impact

Trying to use dotnet-trace command towards a CoreCLR runtime running on 32-bit ARM will trigger SIGBUS and runtime crash making it impossible to trace an application using dotnet-trace diagnostic tooling.

#66772

Testing

Manual validation for .net6. This change is currently in the main branch and has a test running in CI/PR validation. All tests are passing in main. Enabling these same tests in the .net6 branch is possible, but will require larger code changes (~5k LOC from #64358).

Risk

Low

Collect tracing 2 EventPipe command triggers an unaligned UTF16 string
read that could cause a SIGBUS on platforms not supporting unalinged
reads of UTF16 strings (so far only seen on 32-bit ARM Linux CI machine).

On CoreCLR this could even cause a unalinged int read due to
optimizations used in UTF8Encoding::GetByteCount.
@lateralusX
Copy link
Member Author

cc @steveisok @josalem @tommcdon

@akoeplinger akoeplinger added this to the 6.0.x milestone Mar 18, 2022
@steveisok steveisok added the Servicing-consider Issue for next servicing release review label Mar 18, 2022
@jeffschwMSFT jeffschwMSFT removed the Servicing-consider Issue for next servicing release review label Mar 22, 2022
@jeffschwMSFT jeffschwMSFT requested a review from noahfalk March 22, 2022 21:27
@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Mar 22, 2022
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

Approved. We will take for consideration in 6.0.x

@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Mar 24, 2022
@leecow leecow modified the milestones: 6.0.x, 6.0.5 Mar 24, 2022
@carlossanlop carlossanlop merged commit 3b018d6 into dotnet:release/6.0 Apr 13, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tracing-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dotnet-trace collect causes the target application to receive SIGBUS on armv7l
7 participants