-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/7.0] Starting metrics before runtime start leads to a crash #81308
[release/7.0] Starting metrics before runtime start leads to a crash #81308
Conversation
…ine (dotnet#76965) * Initial fix for null reference exception * Took away lazy and put back private constructor * Added parent property and made handler thread safe
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti Issue DetailsWhen you start a metrics session before the runtime is started, we will get a NullReferenceException in MetricsEventSource. This prevents metrics from being enabled before the process is started. The dotnet diagnostic tooling supports starting a session before the runtime is launched. Customer ImpactPartner teams cannot ship diagnostic tooling on 6.0 without this change. TestingManually verified that the fix works RiskLow.
|
There was a problem hiding this 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 7.0.x
@dramos020 This assembly is an OOB package. Can you please add the necessary changes as described here? https://github.com/dotnet/runtime/blob/release/7.0/docs/project/library-servicing.md |
@dramos020 I see this change and the 6.0 one were manually created. Was this merged to |
@carlossanlop I made the changes to the servicing version. Also, these changes were merged to main earlier with this pr #76965 |
I fixed the merge conflict. It was caused by the reset of the OOB packages in the branding PR. |
Since there was a failure found in the 6.0 backport that fixes this same issue, can you please confirm if the fix for that PR needs to go into this PR as well? |
Based on the reply in the 6.0 PR, the issue should not happen in this 7.0 branch (it's fixed here already). #81307 (comment) Approved by Tactics for 7.0.4. |
When you start a metrics session before the runtime is started, we will get a NullReferenceException in MetricsEventSource. This prevents metrics from being enabled before the process is started. The dotnet diagnostic tooling supports starting a session before the runtime is launched.
Customer Impact
Partner teams cannot ship diagnostic tooling on 6.0 without this change.
Testing
Manually verified that the fix works
Risk
Low.