Openj9: OpenJ9 jvm on MacOS Big Sur beta 3 - SIGINT fails to abort process.

Created on 29 Jul 2020  Â·  11Comments  Â·  Source: eclipse/openj9

Java -version output

jonesn:egeria/ (egeria-release-2.1) $ java -version [21:12:48]
openjdk version "14.0.2" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.2+12)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.21.0, JRE 14 Mac OS X amd64-64-Bit Compressed References 20200715_143 (JIT enabled, AOT enabled)
OpenJ9 - 34cf4c075
OMR - 113e54219
JCL - 1d231bd6a2 based on jdk-14.0.2+12)

Summary of problem

When using the openJ9 jvm on a MacOS environment, and launching a SpringBoot application, CTRL-C fails to abort application - which continues running

I cannot be sure the cause is Big Sur, but I did upgrade from Big Sur beta 2 to Big Sur beta 3 in the last week, so it's possible.

The same issue occurs with current versions of 1.8,11,14 as provided via adoptopenjdk's 'homebrew' feed. (I can provide more version info if needed)

Linux running openj9 at the current level is fine, as is MacOS running a regular openjdk build from adoptopenjdk

Not yet yested other apps, nor yet ran the debugger.

Opening after reporting at https://adoptopenjdk.slack.com/archives/C09NLQQAV/p1596033825049700 - opening issue now as I gather it was discussed on the status call. (cc: @sxa )

Diagnostic files

n/a at this point

I can look at other test code tomorrow

blocker bug vm userRaised

All 11 comments

Is not related to MacOS version (or even not MacOS at all), seems to be related to 0.21 version. Maybe https://github.com/eclipse/openj9/pull/9903 (When I was checking threaddump, I saw that DestroyJavaVM thread is blocked)

To reproduce (reproduced on MacOS 10.14.6 with docker):

docker run -it --rm adoptopenjdk/openjdk11-openj9:jdk-11.0.8_10_openj9-0.21.0 sh
apt-get -qq update
apt-get -qq install -y git maven
cd /tmp
# I'm cloning 2.1 because on 2.3 spring-boot-samples had been removed
git clone -b 2.1.x https://github.com/spring-projects/spring-boot.git
cd spring-boot/spring-boot-samples/spring-boot-sample-tomcat
mvn clean package -DskipTests
java -jar target/spring-boot-sample-tomcat-2.1.17.BUILD-SNAPSHOT.jar
# On other term with docker exec -it <container_id>
# -15 is SIGTERM, you could try with -2 for SIGINT but it should be the same result (only tested with -15)
kill -15 <pid>
# Stuck... only kill -9 <pid> will unblock

It stucks, do the same thing with adoptopenjdk/openjdk11-openj9:jdk-11.0.7_10_openj9-0.20.0 no issue

Though I've not yet seen an issue with

➜  charts git:(egeria-release-2.1) java -version
openjdk version "14.0.2" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.2+12)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.21.0, JRE 14 Linux amd64-64-Bit Compressed References 20200715_149 (JIT enabled, AOT enabled)
OpenJ9   - 34cf4c075
OMR      - 113e54219
JCL      - 1d231bd6a2 based on jdk-14.0.2+12)

this is on Ubuntu and running the locally built spring boot sample app you refer to above.

Perhaps some other dependency (in the docker image for example) is relevant.

I then tried on windows 10 & found the same SIGINT issue

In this case I got the log messages from the spring sample app:

2020-07-30 16:15:51.022  INFO 8308 --- [           main] sample.tomcat.SampleTomcatApplication    : Started SampleTomcatApplication in 5.396 seconds (JVM running for 6.847)
2020-07-30 16:16:14.935  INFO 8308 --- [       Thread-5] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
2020-07-30 16:16:14.951  INFO 8308 --- [       Thread-5] sample.tomcat.SampleTomcatApplication    : ServletContext destroyed

but then the process hung

There I am running

$ java -version
openjdk version "14.0.2" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.2+12)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.21.0, JRE 14 Windows 10 amd64-64-Bit Compressed References 20200715_148 (JIT enabled, AOT enabled)
OpenJ9   - 34cf4c075
OMR      - 113e54219
JCL      - 1d231bd6a2 based on jdk-14.0.2+12)

@gacholio

@pshipton Please find someone else for this.

I'll have the fix for the suspected error out shortly. I'll update here when it's made it into a nightly build.

https://github.com/AdoptOpenJDK/openjdk-support/issues/154 looks similar. Would be grateful if anyone more experienced than me could check.

The fix has been merged, so the next nightly build should contain it. The other issue does indeed sound like the same problem, so it is likely also fixed.

Is this fixed by https://github.com/eclipse/openj9/pull/10273 or something else?

@DanHeidinga Correct.

I'm going to close this as the fix has been merged and will be in the next release

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AdamBrousseau picture AdamBrousseau  Â·  6Comments

dsouzai picture dsouzai  Â·  5Comments

Jeeppler picture Jeeppler  Â·  5Comments

BillOgden picture BillOgden  Â·  6Comments

JasonFengJ9 picture JasonFengJ9  Â·  5Comments