Skip to content

3.x: Fix deadlock health check if invoking the ThreadMXBean fails (#9910)#9911

Merged
barchetta merged 5 commits intohelidon-io:helidon-3.xfrom
Captain1653:3.x-9910-deadlock-health-mbean
Mar 28, 2025
Merged

3.x: Fix deadlock health check if invoking the ThreadMXBean fails (#9910)#9911
barchetta merged 5 commits intohelidon-io:helidon-3.xfrom
Captain1653:3.x-9910-deadlock-health-mbean

Conversation

@Captain1653
Copy link
Contributor

@Captain1653 Captain1653 commented Mar 16, 2025

Description

Fixes #9910

The similar logic was done for 4.x. Is it better to be consistent between 3.x and 4.x ?

Unfortunately, we can't return the status ERROR, because for 3.x exists only statuses UP and DOWN. But we can throw HealthCheckException. I hope, that it's appropriate. Return UP when app can't get ThreadMXBean is too optimistic.

P.S. DiskSpaceHealthCheck in 3.x does the similar thing:

try {
      this.fileStore = Files.getFileStore(builder.path);
 } catch (IOException e) {
      throw new HealthCheckException("Failed to obtain file store for path " + builder.path.toAbsolutePath(), e);
 }

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 16, 2025
Copy link
Member

@tjquinno tjquinno left a comment

Choose a reason for hiding this comment

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

Please see the requested change.

@Captain1653 Captain1653 requested a review from tjquinno March 17, 2025 19:52
Copy link
Member

@tjquinno tjquinno left a comment

Choose a reason for hiding this comment

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

One change requested.

@Captain1653 Captain1653 requested a review from tjquinno March 17, 2025 20:09
@Captain1653
Copy link
Contributor Author

@tjquinno Can it be merged? Please :)

@barchetta barchetta merged commit fc22299 into helidon-io:helidon-3.x Mar 28, 2025
12 checks passed
@Captain1653 Captain1653 deleted the 3.x-9910-deadlock-health-mbean branch March 28, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants