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

Invalid max_timestamp produced for EventPipe block header in .NET 6 previews #51468

Closed
valco1994 opened this issue Apr 18, 2021 · 1 comment · Fixed by #51469
Closed

Invalid max_timestamp produced for EventPipe block header in .NET 6 previews #51468

valco1994 opened this issue Apr 18, 2021 · 1 comment · Fixed by #51469

Comments

@valco1994
Copy link
Contributor

As far as I see, EventPipe source code was seriously refactored since .NET 5 release.

Unfortunately, this refactoring introduce the following bug. In ep-block.c there is a code updating min_timestamp and max_timestamp for EventPipe block header. This code should update min_timestamp if current event timestamp is less than min_timestamp and update max_timestamp if current timestamp is more than max_timestamp. But currently, max_timestamp is updated when current timestamp is less than it, which is impossible, because max_timestamp is initialized as INT64_MIN.

if (event_block_base->max_timestamp > instance_timestamp)

So, currently it's

if (event_block_base->min_timestamp > instance_timestamp)
	event_block_base->min_timestamp = instance_timestamp;
if (event_block_base->max_timestamp > instance_timestamp)
	event_block_base->max_timestamp = instance_timestamp;

but should be

if (event_block_base->min_timestamp > instance_timestamp)
	event_block_base->min_timestamp = instance_timestamp;
if (event_block_base->max_timestamp < instance_timestamp)
	event_block_base->max_timestamp = instance_timestamp;
@dotnet-issue-labeler dotnet-issue-labeler bot added area-Tracing-coreclr untriaged New issue has not been triaged by the area owner labels Apr 18, 2021
valco1994 added a commit to valco1994/runtime that referenced this issue Apr 18, 2021
@tommcdon
Copy link
Member

@josalem

@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label Apr 19, 2021
@tommcdon tommcdon added this to the 6.0.0 milestone Apr 19, 2021
@josalem josalem linked a pull request Apr 19, 2021 that will close this issue
sywhang pushed a commit that referenced this issue Apr 19, 2021
Co-authored-by: Valentin Grigorev <valentin.grigorev@jetbrains.com>
@ghost ghost locked as resolved and limited conversation to collaborators May 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants