Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6885041
Votes 0
Synopsis G1: inconsistent thread dump
Category hotspot:garbage_collector
Reported Against
Release Fixed hs17(b04), 7(b75) (Bug ID:2184794)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6893095
Submit Date 23-SEP-2009
Description
It looks as if a jstack generated thread dump when G1 is enabled is giving slightly inconsistent information. Here's an e-mail From Frederic Parain outlining the issues:

First issue: some threads are not dumped correctly,
so I cannot parse the output automatically. Here's an example
of the problem (this is the end of a Thread Dump output
generated with jstack):

"Reference Handler" daemon prio=3 tid=0x0920f400 nid=0xb in Object.wait() [0xfac7b000]
   java.lang.Thread.State: WAITING (on  customer  monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x774af250> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:502)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
    - locked <0x774af250> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=3 tid=0x09209800 nid=0xa runnable

"G1 concurrent mark GC Thread"
"G1 concurrent refinement GC Threads" prio=3 tid=0x08091000 nid=0x6 runnable prio=3 tid=0x0808fc00 nid=0x5 runnable
"G1 zero-fill GC Thread" prio=3 tid=0x0914c000 nid=0x9 runnable
"VM Periodic Task Thread" prio=3 tid=0x09232800 nid=0x12 waiting on condition


Usually, each thread is dumped with its name between double quotes,
followed on the same line with the fields: prio, tid and nid.
If you look at the output for the G1 threads, the output of
two threads ("G1 concurrent mark GC Thread" and
"G1 concurrent refinement GC Threads") are mixed, which causes
my Thread Dump parser to fail.

The second issue: during a Thread Dump generated by jstack, some
threads are dumped on the VM's output instead of the jstack output,
namely:

"Gang worker#0 (Parallel GC Threads)" prio=3 tid=0x0806d000 nid=0x3 runnable

"Gang worker#1 (Parallel GC Threads)" prio=3 tid=0x0806e400 nid=0x4 runnable

"Concurrent Mark GC Thread" prio=3 tid=0x09129000 nid=0x7 runnable
Posted Date : 2009-09-23 20:44:18.0
Work Around
N/A
Evaluation
The way we were doing the thread dump was inconsistent to what the other GCs do.
Posted Date : 2009-09-25 17:24:56.0

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/035d2e036a9b
Posted Date : 2009-10-05 21:50:45.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang