Jvm intermittent crash analysis, jvm intermittent crash

Source: Internet
Author: User

Jvm intermittent crash analysis, jvm intermittent crash
Http://www.cnblogs.com/LBSer/p/4417148.html1 Problem Description

A service has two machines, and the alarm load is high every few days. At the beginning, the monitoring system found that the gc Time Jitter was very high, so it was thought that fullgc caused choppy and did not pay attention to it, then, log on to the online machine and check the log. It is found that the jvm crashes, causing service restart and gc time jitter. Taking one day as an example, the Service crashed by jvm at seven o'clock A.M. and ten o'clock A.M., respectively. If a crash occurs simultaneously, the service will be suspended online, and the consequences will be unimaginable.

2. Problem Analysis

The crash log shows that the jvm crash occurs when the root path is marked to be cleared.

Search for this bug and find it a known bug of jvm.

Par_MarkFromRootsClosure: scan_oops_in_oop (HeapWord *)

 

Someone encountered the same problem (http://hllvm.group.iteye.com/group/topic/43404) as we found through stress testing that when "ParallelCMSThreads> ParallelGCThreads" will cause this crash, and when "ParallelCMSThreads <= ParallelGCThreads" the problem will not recur. While the "ParallelCMSThreads> ParallelGCThreads" problem is also in the jvm bug list (https://bugs.openjdk.java.net/browse/JDK-6668573), this bug someone gives the solution is to set ParallelCMSThreads to <= ParallelGCThreads.

3. Solution

View the jvm parameter configuration of junglepoi-service, and find that ParallelCMSThreads is set to 4, but ParallelGCThreads is not set. By defaultParallelGCThreads = (ncpus <= 8 )? Ncpus: 3 + (ncpus * 5)/8)Ncpus indicates the number of cores of the machine. Since the machine where junglepoi-service is located is configured with 2-Core 4 GB, ParallelGCThreads = 2 by default. In this case, ParallelCMSThreads> ParallelGCThreads.

Solution: 1) set ParallelCMSThreads to 2 or 1; 2) or do not set ParallelCMSThreads. By defaultParallelCMSThreads = (ParallelGCThreads + 3)/4If you do not set the default ParallelCMSThreads = (2 + 3)/4 = 1.

We set ParallelCMSThreads to 2, and did not reproduce the jvm crash exception in the past two days. We will continue to observe it later.

4 inspiration

You cannot simply copy the jvm parameter configurations of other projects. You need to combine the configurations with the Project features, machine environment, and other information.

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.