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

Add suppressed failures in Callback failed #11435

Merged
merged 7 commits into from
Feb 29, 2024

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Feb 22, 2024

For better recording of issues like #11431
If an exception is thrown during failure handling, then record the original failure as a suppressed Throwable on the thrown exception

If an exception is thrown during failure handling, then record the original failure as a suppressed Throwable on the thrown exception
@gregw gregw requested review from sbordet and lorban February 22, 2024 08:54
@gregw gregw requested a review from lorban February 22, 2024 13:53
lorban
lorban previously approved these changes Feb 22, 2024
Copy link
Contributor

@lorban lorban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for the problem at hand.

@gregw
Copy link
Contributor Author

gregw commented Feb 27, 2024

@lorban @sbordet Can I get a re-review. There was a cut/paste error in some changes to Callback that needed fixing.

lorban
lorban previously approved these changes Feb 28, 2024
@joakime
Copy link
Contributor

joakime commented Feb 28, 2024

I worry that all of these suppressed exceptions might reveal internals that we don't want to.
Eg: paths, hosts, ports, ips, etc.

}
finally
catch (Throwable t)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use same style as line 295.

cb2.failed(x);
}

Callback.failed(cb2, x);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this back inside a finally.

@@ -533,7 +572,7 @@ public void succeeded()
@Override
public void failed(Throwable x)
{
callback.failed(x);
Callback.failed(callback, x);
super.failed(x);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to have super.failed() inside a finally, so it gets called in all cases.

@sbordet sbordet self-requested a review February 29, 2024 16:46
@sbordet sbordet merged commit 4155e7b into jetty-12.0.x Feb 29, 2024
8 checks passed
@sbordet sbordet deleted the fix/jetty-12.0.x/11431/addSuppressedExceptions branch February 29, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Jetty 12.0.6: NPE in error handling leading to 100% cpu usage by Jetty threads
4 participants