Skip to content

Conversation

@naricc
Copy link
Contributor

@naricc naricc commented Sep 17, 2020

TotalBytesAllocated was sometimes not monotonically increasing on Mono. The reason was that when a thread was detached, we were not counting bytes allocated in its thread local allocation buffer. So, under the right circumstances the bytes would be counted while the thread is attached, but then get lost when the thread detached.

Fixes: #2280

@naricc naricc force-pushed the naricc/total-bytes-allocated-fix branch from 40363c0 to c70305e Compare September 17, 2020 16:39
@SamMonoRT
Copy link
Member

The original failure wasn't deterministic. Utilizing CI to reproduce may not be best use of resources. Can we somehow run locally multiple times to catch any failures ?

@naricc
Copy link
Contributor Author

naricc commented Sep 17, 2020

@SamMonoRT I have been running it locally, with no luck reproing it so far (I scripted it to run 5000 times on MacOS). I figured I should run it through CI a few times before re-enabling it, since it checks many more platforms than I can practically check.

However, I am also working on iOS local runs.

@naricc
Copy link
Contributor Author

naricc commented Sep 17, 2020

@SamMonoRT

If we really want to save resources I could make a PR that runs only this test, on a bunch of platforms.

@lambdageek

This comment has been minimized.

@naricc naricc force-pushed the naricc/total-bytes-allocated-fix branch from 5d44f94 to 1d5239f Compare September 23, 2020 21:21
@naricc naricc force-pushed the naricc/total-bytes-allocated-fix branch from 290bed8 to 9d10a8e Compare September 23, 2020 21:23
@naricc naricc changed the title [Draft] [Test] Reenable TotalBytesAllocated test on Mono [Mono] [GC] Fix TotalBytesAllocated and reenable test Sep 23, 2020
@dotnet dotnet deleted a comment from Dotnet-GitSync-Bot Sep 23, 2020
@naricc naricc marked this pull request as ready for review September 23, 2020 21:28
@ghost
Copy link

ghost commented Sep 23, 2020

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

@naricc naricc merged commit 02e711e into dotnet:master Sep 24, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
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.

GCExtendedTests.GetTotalAllocatedBytes failed on Mono on Ubuntu in CI

5 participants