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

core: Log any exception during panic because of exception #11970

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

ejona86
Copy link
Member

@ejona86 ejona86 commented Mar 20, 2025

panic() calls a good amount of code, so it could get another exception. The SynchronizationContext is running on an arbitrary thread and we don't want to propagate this secondary exception up its stack (to be handled by its UncaughtExceptionHandler); it we wanted that we'd propagate the original exception.

This second exception will only be seen in the logs; the first exception was logged and will be used to fail RPCs.

Also related to http://yaqs/8493785598685872128 and b692b9d

panic() calls a good amount of code, so it could get another exception.
The SynchronizationContext is running on an arbitrary thread and we
don't want to propagate this secondary exception up its stack (to be
handled by its UncaughtExceptionHandler); it we wanted that we'd
propagate the original exception.

This second exception will only be seen in the logs; the first exception
was logged and will be used to fail RPCs.

Also related to http://yaqs/8493785598685872128 and b692b9d
@ejona86 ejona86 requested a review from larry-safran March 20, 2025 22:03
@ejona86 ejona86 merged commit 3961a92 into grpc:master Mar 24, 2025
15 of 16 checks passed
@ejona86 ejona86 deleted the catch-panic-exception branch March 24, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants