-
Notifications
You must be signed in to change notification settings - Fork 115
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
Ensure exception event source listener is running before applying startup hook #7342
Merged
schmittjoseph
merged 8 commits into
dotnet:main
from
schmittjoseph:wait-for-exception-listener
Sep 23, 2024
Merged
Ensure exception event source listener is running before applying startup hook #7342
schmittjoseph
merged 8 commits into
dotnet:main
from
schmittjoseph:wait-for-exception-listener
Sep 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
schmittjoseph
commented
Sep 19, 2024
wiktork
previously approved these changes
Sep 20, 2024
jander-msft
requested changes
Sep 23, 2024
schmittjoseph
commented
Sep 23, 2024
jander-msft
previously approved these changes
Sep 23, 2024
schmittjoseph
commented
Sep 23, 2024
jander-msft
approved these changes
Sep 23, 2024
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/dotnet-monitor/actions/runs/11001765218 |
@schmittjoseph backporting to release/8.0 failed, the patch most likely resulted in conflicts. Please backport manually using one of the below commands, followed by PowerShell (Invoke-WebRequest "https://github.com/dotnet/dotnet-monitor/commit/c8e57f5ab11d8ab7640d52f456db57e3294fdb85.patch").Content | git am --3way --ignore-whitespace --exclude="documentation/**.md" --keep-non-patch Bash curl -sSL "https://github.com/dotnet/dotnet-monitor/commit/c8e57f5ab11d8ab7640d52f456db57e3294fdb85.patch" | git am --3way --ignore-whitespace --exclude="documentation/**.md" --keep-non-patch
$ git am --3way --ignore-whitespace --exclude="documentation/**.md" --keep-non-patch changes.patch
Applying: Ensure exception event source listener is running before applying startup hook (#7342)
.git/rebase-apply/patch:21: trailing whitespace.
//
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M src/Tools/dotnet-monitor/Commands/CollectCommandHandler.cs
M src/Tools/dotnet-monitor/DiagnosticLifetimeBackgroundService.cs
M src/Tools/dotnet-monitor/Exceptions/ExceptionsService.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Tools/dotnet-monitor/Exceptions/ExceptionsService.cs
CONFLICT (content): Merge conflict in src/Tools/dotnet-monitor/Exceptions/ExceptionsService.cs
CONFLICT (modify/delete): src/Tools/dotnet-monitor/DiagnosticLifetimeBackgroundService.cs deleted in Ensure exception event source listener is running before applying startup hook (#7342) and modified in HEAD. Version HEAD of src/Tools/dotnet-monitor/DiagnosticLifetimeBackgroundService.cs left in tree.
Auto-merging src/Tools/dotnet-monitor/Commands/CollectCommandHandler.cs
CONFLICT (content): Merge conflict in src/Tools/dotnet-monitor/Commands/CollectCommandHandler.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Ensure exception event source listener is running before applying startup hook (#7342)
Error: The process '/usr/bin/git' failed with exit code 128 |
schmittjoseph
added a commit
to schmittjoseph/dotnet-monitor
that referenced
this pull request
Oct 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Ensure that the exception event source listener pipeline is running before applying the startup hook / resuming the process. This is to prevent an issue where some early exception data events could be missed if there are sent before the event source listener pipeline is ready. This can result in the name-cache being out-of-sync and thus the reported call stacks missing information such as mvids.
To fix this, we need to update
DiagnosticLifetimeBackgroundService
to support waiting on services to fully start before returning fromStartAsync
.Note
This doesn't address the issue when attaching to a non-suspended .NET process that has been explicitly configured to run our startup hook via the
DOTNET_STARTUP_HOOKS
environment variable. Solving for this specific case will require additional work and is outside of the scope of this PR.Release Notes Entry
Fixed an issue that could sometimes result in exceptions having incomplete stack information reported in exception history.