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

AdoptOpenJDK + OpenJ9 11 to 15 java process hanging on mac os catalina #10885

Closed
vitorpavanelli opened this issue Oct 14, 2020 · 21 comments
Closed

Comments

@vitorpavanelli
Copy link

Java -version output

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 - 34cf4c0
OMR - 113e54219
JCL - 1d231bd6a2 based on jdk-14.0.2+12)

Summary of problem

I am running a spring boot application and when doing control + C or stopping the application from within IntelliJ a java process keeps hanging and I need to kill it manually. I have tried version 11, 14 and 15 and the same happens.

I have attached screenshots for reference from the terminal.

If I run OpenJDK without OpenJ9 everything works fine.

Also, it could be something similar to this one #3468

Please, can someone take a look at it?

Thank you,
Vitor

Diagnostic files

Screen Shot 2020-10-14 at 14 08 30

Screen Shot 2020-10-14 at 14 10 21

@pshipton
Copy link
Member

@tajila @babsingh fyi

@vitorpavanelli vitorpavanelli changed the title AdoptOpenJDK 11 to 15 java process hanging on mac os catalina AdoptOpenJDK + OpenJ9 11 to 15 java process hanging on mac os catalina Oct 14, 2020
@babsingh
Copy link
Contributor

@vitorpavanelli Is the issue reproducible with any spring boot application? If not, can you provide your spring boot application for reproducing the issue?

@vitorpavanelli
Copy link
Author

hi @babsingh! yes, you can go ahead and create a simple example from spring initialiser. You will notice when trying doing ctrl + c the java process won't quit. It seems whatever is waiting for the kill signal is not receiving or something got stuck. I even had this issue when running within IntelliJ IDE where I had to click twice on the stop button to actually kill the application.

@babsingh
Copy link
Contributor

Thanks, @vitorpavanelli. We will look into this issue. fyi @dusanboskovic ^^^.

@dusanboskovic
Copy link
Contributor

I was able to replicate this issue on Mac and zOS

@dusanboskovic
Copy link
Contributor

dusanboskovic commented Oct 21, 2020

I was able to replicate the issue on Linux and zOS using a test springboot application. Narrowed down the problem between these 2 IBM Java builds
SR6_FP11 - built June 1st 2020
SR6_FP15 - built July 24th 2020
On the open side, matched the dates from these builds with the nightly builds within the same time frame: https://adoptopenjdk.net/nightly.html?variant=openjdk8&jvmVariant=openj9
Narrowed it down to these builds:

Works as expected (Nightly build June 15):

openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-202006151723-b06)
Eclipse OpenJ9 VM (build master-cec5b1c53, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200615_679 (JIT enabled, AOT enabled)
OpenJ9   - cec5b1c53
OMR      - 1db16ee21
JCL      - a6d49b5699 based on jdk8u262-b06)

Sometimes works (Nightly build June 16)

openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-202006161721-b06)
Eclipse OpenJ9 VM (build master-77c3af970, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200616_680 (JIT enabled, AOT enabled)
OpenJ9   - 77c3af970
OMR      - fa22a8385
JCL      - a6d49b5699 based on jdk8u262-b06)

Never works (nightly build June 18)

openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-202006171720-b07)
Eclipse OpenJ9 VM (build master-50ba90c72, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200617_681 (JIT enabled, AOT enabled)
OpenJ9   - 50ba90c72
OMR      - b884d8266
JCL      - 8d231b1446 based on jdk8u262-b07)

These are the git compare SHAs:
'https://github.com/eclipse/openj9/compare/cec5b1c53...50ba90c72'
'https://github.com/eclipse/openj9-omr/compare/1db16ee21...b884d8266' <-- probably nothing here
'https://github.com/ibmruntimes/openj9-openjdk-jdk8/compare/a6d49b5699...8d231b1446' <-- probably nothing here as well

Reverted @gacholio change: ac6141a
on the customer’s version that doesn’t work (SR6_FP15), and now the SIGTERM is properly handled
FYI: @babsingh @tajila @gacholio

Steps to reproduce

  1. Very simple, you can use my springboot jar and run with any Java version above the IBM Java level SR6_FP15 or the Eclipse OpenJ9 release after the 17th of June.
  2. Use the following command to execute the jar file: <path_to_java>/bin/java -jar spring-boot-0.0.1-SNAPSHOT.jar
  3. On another terminal of the same machine, run ps -ef | grep spring and send a kill -15 <PID> to the springboot process. It should hang on anything above the releases mentioned above, but it should exit properly on anything before the releases above
    spring-boot-0.0.1-SNAPSHOT.jar.zip

@babsingh
Copy link
Contributor

Summary: Reverting #9885 resolves the hang.

@gacholio
Copy link
Contributor

That code has already been reverted. Current builds should work.

@dusanboskovic
Copy link
Contributor

Ran the test scenario with a nightly build from the 20th of October and SIGTERM was properly handled. Seems like the fix will be officially released in one of the next versions of Eclipse OpenJ9

@babsingh
Copy link
Contributor

Changes in #9885 were reverted in #10328 (4 Aug 2020).

@gacholio
Copy link
Contributor

Two PRs fixed this - #10273 and #10328

@babsingh
Copy link
Contributor

JDK14 is no longer supported since it only had a 6 month support life cycle. The latest release of JDK15 replaces JDK14 and was released on 23 Sept 20. It should have the above fixes.

The latest release of macOS x64 JDK 15 can be downloaded from Adopt: https://adoptopenjdk.net/archive.html?variant=openjdk15&jvmVariant=openj9.

@vitorpavanelli Can you please close this issue after verifying that the latest release of JDK15 fixes the hang?

@vitorpavanelli
Copy link
Author

Hi @babsingh,

15 doesn't work. I actually installed it first and then tried older versions to make sure it wasn't an issue with 15. I understand 14 it isn't supported but if there will be no fixes for 11, 12, 13 and 14 then it should be removed from download page as well. At least 11 must be supported because it LTS.

Thank you for your hard work on this.

@gacholio
Copy link
Contributor

@vitorpavanelli Can you please try the latest nightly build? The fix has not yet made it into a public release.

@babsingh
Copy link
Contributor

babsingh commented Oct 21, 2020

Nightly builds: https://adoptopenjdk.net/nightly.html?variant=openjdk15&jvmVariant=openj9. Latest one was generated on 21 Oct 20.

At least 11 must be supported because it LTS.

LTS versions (8 & 11) will be supported along with JDK-latest. I didn't realize that the fix was not delivered to a release branch yet.

@babsingh
Copy link
Contributor

babsingh commented Oct 21, 2020

it should be removed from download page

The old unsupported JDKs (9, 12, 13 and 14) are not publicized at Adopt's home page: https://adoptopenjdk.net/index.html?variant=openjdk8&jvmVariant=openj9. Only LTS (8 & 11) and JDK-latest versions are publicized.

I don't think the old unsupported JDKs will be removed. They will be retained for future reference. But, they won't be publicized at Adopt.

@vitorpavanelli
Copy link
Author

it should be removed from download page

The old unsupported JDKs (9, 12, 13 and 14) are not publicized at Adopt's home page: https://adoptopenjdk.net/index.html?variant=openjdk8&jvmVariant=openj9. Only LTS (8 & 11) and JDK-latest versions are publicized.

I was able to access them in another manner, I don't recall where but anyway.

Your fix did work.

Thank you

@vitorpavanelli
Copy link
Author

when can I download the release version, please?

@gacholio
Copy link
Contributor

@pshipton When do you expect 0.23 to be available?

@pshipton
Copy link
Member

pshipton commented Oct 21, 2020

I hope it will be available on Friday if nothing goes wrong, otherwise early next week.

@pshipton
Copy link
Member

The 0.23 release occurred on Oct 23 with a jdk15 respin for Mac on Oct 26.

Release information available here https://github.com/eclipse/openj9/releases/tag/openj9-0.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants