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

JVM crash with Java 7 + Agent 1.15.0 #1130

Closed
duclm2609 opened this issue Apr 9, 2020 · 4 comments
Closed

JVM crash with Java 7 + Agent 1.15.0 #1130

duclm2609 opened this issue Apr 9, 2020 · 4 comments

Comments

@duclm2609
Copy link

duclm2609 commented Apr 9, 2020

After starting application about 10 minutes, the JVM crash with no further log from both application and APM agent.
Here is the JVM log:
hs_error.log

My application is Spring MVC running on Jboss EAP. The crash appears in both Jboss EAP 6.2 and 6.4.

@SylvainJuge
Copy link
Member

Hi @duclm2609 ,

Thanks for this report,

This kind of JVM crash is the result of a JVM bug in native code that is triggered by the agent.
While agent triggers it, there is little we can do in our agent about it as it's outside of our control.

The fact that it fails after a few minutes means that it could be to JIT compiler activity that tries to further optimize parts of the code.

We already had similar issues in the past with early versions of Java 8 which were quite buggy before update 40.

It seems that you are using an extended version of Oracle JDK 7 (update 251), which is not publicly available, thus it will be hard for us to try to reproduce. Have you tried to reach Oracle support on this issue ?

@duclm2609
Copy link
Author

duclm2609 commented Apr 9, 2020

Thank you for your information. I also read the issue #458 and have some idea about the problem. If I don't misunderstand, the problem is already fixed since version 1.4.0. By the way, I've tried running with OpenJDK 1.8.0_241 and it's working fine.

Have you tried to reach Oracle support on this issue ?

No, I haven't. TBH, I don't think this will help much from usage perspective.
Again, thank you for your support.

@felixbarny
Copy link
Member

I don't really see how this may be related to what the agent is doing.

The JVM crashes with a segfault in a thread that's not related to the agent and the stack for that thread is empty:

Stack: [0x00007efcc3bf1000,0x00007efcc3cf2000],  sp=0x00007efcc3cf0120,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x0000000706574630

The only references I could find about the agent were these:

Compilation events (10 events):
Event: 261.298 Thread 0x00007efd606b5000 3457             co.elastic.apm.agent.matcher.WildcardMatcher::indexOfIgnoreCase (189 bytes)
...

Deoptimization events (10 events):
...
Event: 184.038 Thread 0x00007efcc8149000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x00007efd5d930a10 method=co.elastic.apm.agent.matcher.WildcardMatcher.anyMatch(Ljava/util/List;Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Lco/elastic/apm/agent/matcher/WildcardMatcher; @ 4

How often does the crash happen? Does it happen consistently after 10m and only if the agent is attached? Could you upload a few more crash reports to see if there's a common pattern?

@SylvainJuge
Copy link
Member

Closing as there wasn't any update in a while, feel free to re-open if issue still occurs with latest version of the agent (1.17.0 or later).

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

No branches or pull requests

3 participants