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

how to start with CRaC when enable jvm gc files. #4

Open
suixingbugai opened this issue Aug 8, 2023 · 9 comments
Open

how to start with CRaC when enable jvm gc files. #4

suixingbugai opened this issue Aug 8, 2023 · 9 comments

Comments

@suixingbugai
Copy link

suixingbugai commented Aug 8, 2023

image
when enable gc files output,this error happens. how to start with CRaC when enable gc files.

@suixingbugai suixingbugai changed the title how to close jvm gc files how to start with CRaC when enable jvm gc files. Aug 8, 2023
@AntonKozlov
Copy link
Member

Hi, JVM or JDK owned files should be coordinated with CRaC, so this should be considered as a bug. So thanks for the report!

So far, as the workaround, please try -XX:CRaCIgnoredFileDescriptors=/app/gc.log (although I have not tested this)

@suixingbugai
Copy link
Author

@AntonKozlov when use -XX:+UseZGC,execute jcmd command throw exception like this picture.
image

@rvansa
Copy link
Member

rvansa commented Aug 9, 2023

@suixingbugai This is a known issue; C/R is not handled in ZGC yet.

@suixingbugai
Copy link
Author

@suixingbugai This is a known issue; C/R is not handled in ZGC yet.

When we will handle this C/R issue in ZGC ?

@rvansa
Copy link
Member

rvansa commented Aug 18, 2023

While I personally consider ZGC to be a great GC, mainly for bigger heaps, it has not been prioritized yet (I guess that applications that need to start fast, e.g. quickly scaling microservices, usually use smaller heaps where G1 works well). But please let's not divert the discussion; this issue is about JVM not closing its logs on checkpoint. Feel free to create another issue for ZGC, especially if you're willing to work on that.

@suixingbugai
Copy link
Author

While my team is using G1 in production stage without CRaC, it really works well now . But we are considering repleace G1 with ZGC for small stw times ,start with CRaC to start fast,it seems to be difficlut. Can you give me some suggestions?

@rvansa
Copy link
Member

rvansa commented Aug 18, 2023

Suggestions for what, exactly? ZGC uses memory in an anonymous file. CRIU itself should be able to deal with that; you'd need to add an exception for this in VM_Crac::check_fds(). It's possible that more tweaks will be needed, though; e.g. it would be nice to zero any memory that's not used to minimize the size of checkpoint image.

@jankratochvil
Copy link

openjdk/crac#113 = CRaC: Fix fds opened for logging

@jankratochvil
Copy link

ZGC itself is still incompatible with CRaC but at least it now prints a better error message: https://github.com/openjdk/crac/pull/90/files
The opened log files should be fixed by: https://github.com/openjdk/crac/pull/113/files
Therefore could we close this issue?

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

4 participants