What are the meanings of “sealing perm gen”?

I am studying a JVM crash on one of our production systems, what do the following memory values ​​represent in the hs_err_pid file fragment below?

Heap par new generation total 1258624K, used 955445K [0x00000005c0000000, 0x00000006155b0000, 0x000000066aaa0000) eden space 1118784K, 73% used [0x00000005c0000000, 0x00000005f1e52598, 0x0000000604490000) from space 139840K, 98% used [0x000000060cd20000, 0x00000006153db100, 0x00000006155b0000) to space 139840K, 0% used [0x0000000604490000, 0x0000000604490000, 0x000000060cd20000) tenured generation total 2796224K, used 1745107K [0x000000066aaa0000, 0x0000000715550000, 0x00000007c0000000) the space 2796224K, 62% used [0x000000066aaa0000, 0x00000006d52d4d90, 0x00000006c2e0c400, 0x0000000715550000) compacting perm gen total 482944K, used 482943K [0x00000007c0000000, 0x00000007dd7a0000, 0x0000000800000000) the space 482944K, 99% used [0x00000007c0000000, 0x00000007dd79fff0, 0x00000007dd7a0000, 0x00000007dd7a0000) No shared spaces configured. 

My concern is with the use of “condensed perm gen”: does this mean the percentage used for the maximum allocated heap perm gen, or the percentage used for the maximum heap, or something else? The percentage provided is the division used / total, is this the general allocated perm gen? Since our -XX:MaxPermSize set to 1GB ...

Are there any useful resources (other than Oracle whitepaper that doesn't mention hs_err files) to interpret the data dumped when the JVM crashes

+4
source share
2 answers

I never found a link that accurately described the meanings of perm perm compaction, but our own research showed that the reported values ​​were:

currently using PermGen / currently dedicated PermGen

In the example in my question, this meant that 482944K of memory was already allocated for PermGen, and 482943K - at the GC point (99%). Our maximum PermGen size was set to 1048576K (1 GB), so during the collection process there were many reserved resources for redistributing using.

For those who face similar problems, we finally solved our problem. In our case, it turned out to be a third-party library that used the class sun.misc.Unsafe , which is the notorious "unsafe" if used improperly.

In this case, a piece of logic for cloning objects passed a specific ClassLoader to some sun.misc.Unsafe operations to copy objects. On some computers, the copied objects were regularly created in a damaged state. When the JVM tries to collect the garbage, it will eventually clean up one of these bad objects and crash. This always caused the error described in my question.

+5
source

But just because you set MaxPermSize to 1 GB does not mean that HotSpot will read it. I don't think I've ever received more than 512 MB. Your JVM 482MB is pretty close to that figure.

In any case, 512 MB is a lot for PermGen, since it is used only for storing class metadata, it will not grow in size unless the classes are loaded through ClassLoader. So the question is: do you really need more than 512 MB in order to contain roughly the size of the bytecodes of all the necessary classes in memory?

It is very possible that your system does have memory leaks in PermGen .

0
source

All Articles