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

Failed JVM Startup JDK17 (with Z GC) #273

Open
knocknarea opened this issue Oct 11, 2022 · 2 comments
Open

Failed JVM Startup JDK17 (with Z GC) #273

knocknarea opened this issue Oct 11, 2022 · 2 comments

Comments

@knocknarea
Copy link

knocknarea commented Oct 11, 2022

Hello @axelfontaine

I am seeing this when trying to start our application using upgrade to JDK17 and hopefully using the Z Garbage Collector

17:14:19.999 ERROR: i-*****26d8 => 2022-10-10 17:14:07.584 /launch.sh: line 30: can't create /jre/lib/management/jmxremote.access: nonexistent directory
17:14:19.999 i-*****26d8 => 2022-10-10 17:14:07.585 [0.004s][error][gc] **Failed to find an accessible tmpfs filesystem**
17:14:19.999 i-*****26d8 => 2022-10-10 17:14:07.585 [0.004s][error][gc] Use -XX:AllocateHeapAt to specify the path to a tmpfs filesystem
17:14:19.999 ERROR: i-*****26d8 => 2022-10-10 17:14:07.586 Error: Could not create the Java Virtual Machine.
17:14:19.999 ERROR: i-*****26d8 => 2022-10-10 17:14:07.586 Error: A fatal exception has occurred. Program will exit.

It looks like the AMI produced by cloudcaptain does not have any tmpfs configured for the ZGC to use.

According to this fix, JDK now automatically looks in: /dev/shm and /run/shm (in that order) for tmpfs

JVM Args are:

-XX:+UseZGC -XX:+UseDynamicNumberOfGCThreads 

JDK version is set as:

components.openjdk=17.0.0.4

So I suppose the question, is there a tmpfs created? and if so, what path is is created on so that I may configure -XX:AllocateHeapAt to point at it. Any help on this would be greatly appreciated as I am on the clock on this one.

@axelfontaine
Copy link
Member

@knocknarea The rootfs is actually a tmpfs. However I am not sure this will work. Let me think a bit more about this. (As a workaround you can of course switch back to another GC like G1)

@knocknarea
Copy link
Author

Thank you @axelfontaine for looking into it. I can keep going with the G1 for now, but ideally I'd like to leverage the latest and greatest

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

2 participants