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

Prevent nblogger from dying on errors during format. #7741

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

sdedic
Copy link
Member

@sdedic sdedic commented Sep 9, 2024

During bug hunting in NBLS, I run into a very funny situation where the logging of NBLS suddenly stopped. It eventually resumed after a looooong time, but only sometimes.

I debugged into it and found out that some Google commons class was missing which was not used at runtime at all - except to print out JSON-RPC message from NBLS. If that happened, the message formatting failed with an Error (rather than Exception that is handled in `java.util.logging.Formatter.formatMessage. This led to death of the log publishing thread. The thread eventually resumed when the buffer was full - but dies again on another 'unformattable' message.

This PR adds additional wrapper that catches everything except ThreadDeath and prevents the logging thread from dying.

@sdedic sdedic added the Platform [ci] enable platform tests (platform/*) label Sep 9, 2024
@sdedic sdedic added this to the NB24 milestone Sep 9, 2024
@sdedic sdedic self-assigned this Sep 9, 2024
Copy link
Contributor

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

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

Looks sensible to me.

@sdedic sdedic merged commit 7bdf651 into apache:master Sep 12, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform [ci] enable platform tests (platform/*)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants