Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Aug 30, 2021

Backport of #58164 to release/6.0

/cc @lambdageek @lateralusX

Customer Impact

On Mono, in cases where the total size of reserved EventPipe buffer manager buffers exceed 2GB, there will be EventPipe data corruption on 64-bit platforms.

CoreCLR is not affected.

Testing

CI

Risk

Low. The event pipe reserved buffers should not approach that size in normal operation (each individual buffer is capped at 1mb. So we would need concurrent event pipe events on >2048 threads) . A workaround is to decrease the amount of logging, or the concurrency of the system.

ep_rt_atomic_compare_exchange_size_t was always truncated to gint32 on
Mono 64-bit platforms. This commit use 32 or 64-bit cas version
depending on SIZEOF_SIZE_T. NOTE, CoreCLR used a template function for
this and already picks 32 or 64 bit version depending on size of size_t.

ep_rt_atomic_compare_exchange_size_t is currently used to reflect size
of EventPipe buffer manager buffers and will most likely never need
more than 2GB of data, but better to fix it and inline with CoreCLR shim
implementation.
@github-actions github-actions bot requested a review from marek-safar as a code owner August 30, 2021 15:52
@ghost
Copy link

ghost commented Aug 30, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@Anipik Anipik merged commit 5ed210c into release/6.0 Aug 31, 2021
@akoeplinger akoeplinger deleted the backport/pr-58164-to-release/6.0 branch September 9, 2021 11:25
@ghost ghost locked as resolved and limited conversation to collaborators Oct 9, 2021
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.

5 participants