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

[Bug]: A fatal error has been detected by the Java Runtime Environment SIGSEGV (0xb) #721

Closed
jebbench opened this issue Jan 13, 2023 · 25 comments
Assignees
Labels
bug Something isn't working jbs:backported-to-17 We backported to OpenJDK 17 jbs:patch-delivered We delivered a patch at OpenJDK jbs:reported Someone from our org has reported it to OpenJDK

Comments

@jebbench
Copy link

jebbench commented Jan 13, 2023

Please add the exact image (with tag) that you are using

eclipse-temurin:jdk-17

Please add the version of Docker you are running

Google Kubernetes Engine

What happened?

JVM crashed (crash log below) when under light load.

Unfortunately it was running on a container which was restarted after the crash so I can't access the error report files.

We've seen the crash occur twice, both times when the application was under light load.

The image was built using JIB (https://github.com/GoogleContainerTools/jib). We've now seen this occur in a container that was not built using JIB.

Heap usage was around 1gb of 2gb allocated.

Relevant log output

[error occurred during error reporting (), id 0xb, SIGSEGV (0xb) at pc=0x00007f3ea639d898]
#
# https://github.com/adoptium/adoptium-support/issues
# If you would like to submit a bug report, please visit:
#
# //replay_pid1.log
# Compiler replay data is saved as:
#
# //hs_err_pid1.log
# An error report file with more information is saved as:
#
# JFR recording file will be written. Location: //hs_err_pid1.jfr
#
# Core dump will be written. Default location: /core.%e.1.%t
#
# C 0x0000000000000000
# Problematic frame:
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (17.0.5+8, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# JRE version: OpenJDK Runtime Environment Temurin-17.0.5+8 (17.0.5+8) (build 17.0.5+8)
#
# SIGSEGV (0xb) at pc=0x0000000000000000, pid=1, tid=19
#
# A fatal error has been detected by the Java Runtime Environment:
#
@jebbench jebbench added the bug Something isn't working label Jan 13, 2023
@jebbench jebbench changed the title [Bug]: [Bug]: A fatal error has been detected by the Java Runtime Environment SIGSEGV (0xb) Jan 13, 2023
@karianna
Copy link
Contributor

@jebbench We'll need the crash log to investigate. On the off chance this is fixed in 17.0.6 then you can wait a couple of weeks for that release.

@jebbench
Copy link
Author

@karianna this is still occuring using 17.0.6.

I will see if there's a way to retrieve the crash logs.

@jebbench
Copy link
Author

@karianna I've been able to get the crash log:
hs_err_pid1.log

Let me know if there's anything else we can do or provide to help.

@karianna
Copy link
Contributor

karianna commented Feb 11, 2023

Ah fun this is a Kotlin sourced crash, what version of Kotlin are you running?

@jebbench
Copy link
Author

Afraid so, the application was built using Kotlin 1.7.21.

@karianna
Copy link
Contributor

Afraid so, the application was built using Kotlin 1.7.21.

Any chance you're able to move to 1.8.10?

@jebbench
Copy link
Author

Yes - we should be able to migrate to 1.8.10, but it could be a few weeks before I can get another crash log unless we get lucky and see one in our test environment (unless the upgrade fixes it 🤞).

I'll start migrating our projects.

@jebbench
Copy link
Author

Crash report using Kotlin 1.8.10.
hs_err_pid1.log

@karianna
Copy link
Contributor

Interesting, also was reported #659

@karianna
Copy link
Contributor

@jebbench Apologies for the run around but https://youtrack.jetbrains.com/issues/kt is the place you'll want to report this as Kotlin is emitting something that the C2 compiler doesn't like.

@karianna karianna added the help wanted Extra attention is needed label Feb 26, 2023
@jebbench
Copy link
Author

@karianna karianna removed the help wanted Extra attention is needed label Feb 26, 2023
@karianna
Copy link
Contributor

Thanks, closing here (but if the Kotlin folks bounce it back we can look at opening up at OpenJDK proper itself).

@ilmirus
Copy link

ilmirus commented Feb 28, 2023

@karianna

Hi, Kotlin Team here. Yes, it looks very much as a OpenJDK bug. The thing with coroutines is that we generate code, which is not possible to write in Java - we have non-canonical loops or jumps to catch blocks, which are likely to not be covered by tests. There was even an anekdot, that Graal could not compile coroutines code and run the whole module in interpreter mode. Additionally, if there was a bug in generated bytecode, it would lead to VerifyError. Also, there is an issue reported with same JDK version and same symptoms - SIGSEGV in C2 on coroutines code and is very sporadic https://youtrack.jetbrains.com/issue/KT-54693/SIGSEGV-0xb-at-pc0x0000000000000000-C2-CompilerThread0.

@karianna karianna reopened this Feb 28, 2023
@karianna
Copy link
Contributor

Thanks @ilmirus - I'll get this reported upstream!

@karianna karianna self-assigned this Feb 28, 2023
@karianna
Copy link
Contributor

https://bugs.openjdk.org/browse/JDK-8303279

@karianna karianna transferred this issue from adoptium/containers Feb 28, 2023
@karianna karianna added the jbs:reported Someone from our org has reported it to OpenJDK label Feb 28, 2023
@jebbench
Copy link
Author

This is still an issue in OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (but has apparently been resolved in OpenJDK 19 - I've not been able to verify though).

@karianna
Copy link
Contributor

@jebbench Would be good to understand the fix in 19 - is there a bug report or mail thread to reference?

@jebbench
Copy link
Author

@karianna the thread I had been reading was this one: grpc/grpc-kotlin#370 (comment)

@karianna
Copy link
Contributor

@simonis
Copy link

simonis commented Jul 13, 2023

Fixed by openjdk/jdk#14600 in JDK 22.

Still needs to be downported to 17 & 21.

@karianna karianna added jbs:patch-delivered We delivered a patch at OpenJDK jbs:needs-backport-to-11 We need to backport to OpenJDK 11 jbs:needs-backport-to-17 Fixed in latest JDK, but needs a backport to OpenJDK 17u labels Jul 17, 2023
@gdams
Copy link
Member

gdams commented Jul 21, 2023

Fixed by openjdk/jdk#14600 in JDK 22.

Still needs to be downported to 17 & 21.

the 17 backport PR is here: openjdk/jdk17u-dev#1580

@simonis
Copy link

simonis commented Jul 21, 2023

Notice that this doesn't doesn't affect 11 because it was introduced by https://bugs.openjdk.org/browse/JDK-8238691 which only went int 15.

@gdams gdams removed the jbs:needs-backport-to-11 We need to backport to OpenJDK 11 label Jul 21, 2023
@gdams
Copy link
Member

gdams commented Jul 21, 2023

Notice that this doesn't doesn't affect 11 because it was introduced by https://bugs.openjdk.org/browse/JDK-8238691 which only went int 15.

I was just thinking the same thing, I'll remove the label

@karianna karianna added jbs:backported-to-17 We backported to OpenJDK 17 and removed jbs:needs-backport-to-17 Fixed in latest JDK, but needs a backport to OpenJDK 17u labels Jul 21, 2023
@karianna
Copy link
Contributor

Do we close or does it need a 21 backport?

@gdams
Copy link
Member

gdams commented Jul 22, 2023

It went into 21 here: openjdk/jdk21#119

@gdams gdams closed this as completed Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jbs:backported-to-17 We backported to OpenJDK 17 jbs:patch-delivered We delivered a patch at OpenJDK jbs:reported Someone from our org has reported it to OpenJDK
Projects
None yet
Development

No branches or pull requests

5 participants