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

jvmStats does not handle java.lang.InternalError #29624

Closed
GorillaCoder opened this issue Apr 19, 2018 · 3 comments
Closed

jvmStats does not handle java.lang.InternalError #29624

GorillaCoder opened this issue Apr 19, 2018 · 3 comments
Assignees
Labels
:Data Management/Stats Statistics tracking and retrieval APIs v6.3.0 v7.0.0-beta1

Comments

@GorillaCoder
Copy link

jvmStats catches Exception. It should be catching Exception|java.lang.InternalError. As is noted in the comment in the code, MemoryPoolMXBean throws InternalError, and InternalError is not derived from Exception:

            } catch (Exception ex) {
                /* ignore some JVMs might barf here with:
                 * java.lang.InternalError: Memory Pool not found
                 * we just omit the pool in that case!*/
            }
@jasontedor
Copy link
Member

Are you seeing this in practice? I think this is only a stale comment from when we use to catch throwable in the entire codebase. We have removed that, we do not catch fatal errors that we can not recover from. The Javadocs for MemoryPoolMXBean do not document an InternalError.

Relates #19231

@jasontedor jasontedor self-assigned this Apr 19, 2018
@jasontedor jasontedor added review :Data Management/Stats Statistics tracking and retrieval APIs v7.0.0 v6.3.0 labels Apr 19, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@masseyke
Copy link
Member

masseyke commented May 2, 2023

Relates to #95710. We've seen that InternalError at least twice in our CI system (out of probably tens of thousands of runs). So I've put in a catch for the InternalError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs v6.3.0 v7.0.0-beta1
Projects
None yet
Development

No branches or pull requests

5 participants