jvm full gc can't unload classes even permgen is full

532 views Asked by At

Our production server went OOM because permgen is full. Using jmap -permstat to check the permgen area, we found there were many classes loaded by com.sun.xml.ws.client.WSSServiceDelegatingLoader. The loaded classes are com.sun.proxy.$ProxyXXX, where XXX is an int sequence. enter image description here

the stacktrace for these classloading is as follow: enter image description here

eventually, the JVM went OOM, full gc can't reclaim any permgen memory. What is strange is that if I click System GC in VisualVM, the classes are unloaded and the usage of permgen goes down. enter image description here

Our JDK version is 1.7.0.80, we have added CMSClassUnloadingEnabled.

-XX:+ExplicitGCInvokesConcurrent

-XX:+UseConcMarkSweepGC

-XX:CMSInitiatingOccupancyFraction=60

-XX:+UseParNewGC

-XX:+CMSParalledlRemarkEnabled

-XX:+UseCMSCompactAtFullCollection

-XX:+CMSFullGCsBeforeCompaction=0

-XX:+CMSCLassUnloadingEnabled

-XX:MaxTenuringThreshold=18

-XX:+UseCMSInitialtingOccupancyOnly

-XX:SurvivorRatio=4

-XX:ParallecGCThreads=16

Our code has been running for a long time. The most recent operation is a WebLogic patch. This really confused me. Could someone give me some help with this issue, many thanks!

1

There are 1 answers

0
devwebcl On

This is a known bug https://github.com/javaee/metro-jax-ws/issues/1161

Every time a JAX-WS client is created, for instance, using library JAX-WS RI 2.2 which is bundled in Weblogic Server 12.1.3

com.sun.xml.ws.client.WSServiceDelegate$DelegatingLoader#1

Client proxy classes are being loaded into classloader:

([Loaded com.sun.proxy.$Proxy979 from com.sun.xml.ws.client.WSServiceDelegate$DelegatingLoader] )

Solution/Workaround: Replace JAX-WS client where this bug is solved.