Useadaptivesizepolicy causes a memory pool not found exception.

Source: Internet
Author: User

The memory pool not found exception is an mbean exception. Therefore, mbean must be used for this exception.

It is suspected that the JVM has not been initialized, mbean in the agent has started to get the status, or before the JVM is about to crash, mbean cannot get the correct status, but none of these situations are found.

Later, the Taobao-JDK team analyzed the cause in useadaptivesizepolicy.

Possible cause:
When using CMSAlgorithmIf useadaptivesizepolicy is enabled, the size of Eden, from, and to will be re-calculated after each minor GC operation. The calculation process is based on the statistics of the GC process, after calculation, the Eden + from + to will not exceed xmx, And the from and to are generally not equal (the from and to are equal during initialization ). The main problem is that after calculation, if the Eden becomes larger, the max_eden_size in the contiguousspacepool is not updated or the value at the beginning. This causes the JVM to call Java through call_special. lang. management. the memoryusage constructor generates an exception because Eden committed is larger than max_size of Eden, leading to the return of Java. lang. management. the memoryusage object fails, leading to display exceptions.

Sun's JDK has not modified this bug so far.

Solution: You can set-XX:-useadaptivesizepolicy to workaround first.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.