jvm crash,疑似GC的bug

在對一個應用做壓力的時候,不定時發生jvm crash,查看hs_error.log
內容摘要如下:

Current thread (0x0000000051f8f800): GCTaskThread [stack: 0x00000000413c2000,0x00000000414c3000] [id=15399]

Heap
PSYoungGen total 348288K, used 347520K [0x00002aaae0cb0000, 0x00002aaaf6200000, 0x00002aaaf6200000)
eden space 347072K, 100% used [0x00002aaae0cb0000,0x00002aaaf5fa0000,0x00002aaaf5fa0000)
from space 1216K, 36% used [0x00002aaaf5fa0000,0x00002aaaf6010000,0x00002aaaf60d0000)
to space 1152K, 50% used [0x00002aaaf60e0000,0x00002aaaf6170000,0x00002aaaf6200000)
PSOldGen total 699072K, used 324379K [0x00002aaab6200000, 0x00002aaae0cb0000, 0x00002aaae0cb0000)
object space 699072K, 46% used [0x00002aaab6200000,0x00002aaac9ec6f40,0x00002aaae0cb0000)
PSPermGen total 65536K, used 34650K [0x00002aaaae200000, 0x00002aaab2200000, 0x00002aaab6200000)
object space 65536K, 52% used [0x00002aaaae200000,0x00002aaab03d68d8,0x00002aaab2200000)


看樣子似乎是GC的時候crash掉了,heap的狀態是eden space 100% used,看樣子是在eden區轉移到survival區時,由於某些原因crash。

鑑於jvm啓動時使用的gc爲ParallelGC,於是試着換成串行GC和並行GC,壓了18個小時都沒有發生crash。
使用的環境是64位 liunx系統,java 1.6.0_18 64bit。
初步懷疑是ParallelGC在併發回收處理eden區內存對象的時候的bug導致,在64位機器和32位機器上都有這個問題。
不知道大家有沒有碰到過這個問題?


疑似jdk 6u18 的 bug
http://www.oracle.com/technetwork/java/javase/6u18-142093.html

#
Card-Marking Optimization Issue
#

A flaw in the implementation of a card-marking performance optimization in the JVM can cause heap corruption under some circumstances. This issue affects the CMS garbage collector prior to 6u18, and the CMS, G1 and Parallel Garbage Collectors in 6u18. The serial garbage collector is not affected. Applications most likely to be affected by this issue are those that allocate very large objects which would not normally fit in Eden, or those that make extensive use of JNI Critical Sections (JNI Get/Release*Critical).

This issue will be fixed in the next Java SE 6 update.

Meanwhile, as a workaround to the issue, users should disable this performance optimization by -XX:-ReduceInitialCardMarks.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章