Uh oh!
There was an error while loading. Please reload this page.
[release/8.0-staging] Fix #91958: use mach_timebase_info to determine process time coefficient on macOS - #100122
Conversation
…efficient on macOS
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process |
adamsitnik
left a comment
There was a problem hiding this comment.
LGTM, thank you for backporting the fix @jeffhandley !
Uh oh!
There was an error while loading. Please reload this page.
Without this fix, it was possible for another thread to see an incorrect (zero) value of s_timeBase_numer because of a race condition.
jozkee
commented
Apr 29, 2024
@jeffhandley should this be marked as servicing consider now that #100122 (comment) got resolved? If so, do we need to email tactics? |
carlossanlop
commented
Apr 30, 2024
@jozkee I didn't find a Tactics email, so assuming this is ready (pending @jeffhandley 's or @adamsitnik 's confirmation), then yes, please send an email to Tactics and add the |
jeffhandley
commented
Apr 30, 2024
This was approved in email and needs an approval for merge. @jkotas -- you can ignore the re-review request as this can now be merged. |
Backport of #92185 to release/8.0-staging
Customer Impact
This has been reported by 2 customers. The first report was in September 2023 by @ForNeVeR in #91958, and they also provided the fix and tests. The issue was reported again by @huntharo in February with #98121. In that issue, @huntharo requested that this fix be backported to 8.0. As @huntharo stated:
Regression
While this isn't a product regression, it's behavior that became incorrect with Apple Silicon.
Testing
@ForNeVeR included a new test with their fix that is part of this backport. The test performs a native call and compares the API's results against the native results. As stated in the original PR:
Risk
Low. This is a targeted fix that only affects
PrivilegedProcessorTime,TotalProcessorTime, andUserProcessorTimeon macOS. While the fix had been in main since September, a race condition bug in the original fix was found during the review of this backport. That bug was fixed in main on March 25 and cherry-picked to this backport.The automatic backport of this fix failed due to a merge conflict in src/libraries/Common/src/Interop/OSX/Interop.Libraries.cs. That conflict arose because the preceding line to the change here was removed in 20a3350. Otherwise, the rest of the merge was clean.