Stop-The-World Class Unloading (several sceonds)
Hi there,
we have a strange Problem with one of our webapps (which was not observed in other webapps / tomcat installations)
We are running a webapp in a Tomcat-Servlet container (Java 1.8.0_302 OpenJDK 1.8.0_302-8u302-b08-1~deb9u1-b08, Apache Tomcat/8.5.54 Debian)
From time to time we have really long gc/remark stop-the-world pauses (as you can see form the shared report). In this case 14 seconds.
We are using the G1GC and did already enable -XX:+TraceClassUnloading for troubleshooting purposes. But we still do not have a clue why this is happening. The classes being unloaded are mostly related to reflection and Lambdas (here is an short representative excerpt):
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedConstructorAccessor7 0x00000001001e6428]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedConstructorAccessor6 0x00000001001a4028]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedConstructorAccessor5 0x00000001001a3428]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedConstructorAccessor4 0x00000001001a2428]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedConstructorAccessor3 0x00000001001a1828]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedConstructorAccessor2 0x000000010015ec28]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor5 0x000000010015e028]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor4 0x000000010015dc28]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor3 0x000000010015d828]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor2 0x000000010015d428]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1 0x000000010015d028]
catalina.out.2.gz:[Unloading class sun.reflect.GeneratedConstructorAccessor1 0x00000001000e9028]
catalina.out.2.gz:[Unloading class java.lang.invoke.LambdaForm$BMH/1109371569 0x00000001000cd028]
catalina.out.2.gz:[Unloading class java.lang.invoke.LambdaForm$BMH/670700378 0x00000001000ccc28]
catalina.out.2.gz:[Unloading class java.lang.invoke.LambdaForm$BMH/812265671 0x00000001000cc428]
catalina.out.2.gz:[Unloading class java.lang.invoke.LambdaForm$BMH/1650967483 0x00000001000c2028]
catalina.out.2.gz:[Unloading class java.lang.invoke.LambdaForm$BMH/2128227771 0x00000001000ba028]
But in this specific webapp - were we experiencing this issue - we are not doing more reflective operations than in other webapps too (were we are not experiencing such issues)
While googleing the issue I stumpled over the VM argument -Xnoclassgc but I'm not sure if it's safe to activate such flag (or run into other problems such as OOM)
Do you have any idea or advice?
Is it safe - or at least not a too bad idea - to enable -Xnoclassgc?
Or can we enable another Parameter (/set another VM-option) to investigate this issue further?
Kind regards
Christian
Report URL - https://gceasy.io/my-gc-report.jsp?p=c2hhcmVkLzIwMjEvMTIvMjEvLS10b21jYXQtc2VydmVyLWdjMjAyMS0xMi0xNV8xNC0yNC0zNS5sb2cuZ3otLTktMjMtMTY=&channel=WEB
Edit your Comment