JDK-6987703 : iCMS: Intermittent hang with gc/gctests/CallGC/CallGC01 and +ExplicitGCInvokesConcurrent
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-09-27
  • Updated: 2013-09-12
  • Resolved: 2011-04-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7Fixed hs21Fixed
Description
The nightly test:

gc/gctests/CallGC/CallGC01

is failing intermittently by hanging and timing out.

Links to the failure are:

http://sqeweb.sfbay.sun.com/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2010-09-22/GC_Baseline-Xinc/vm/linux-i586/client/mixed/linux-i586_vm_client_mixed_vm.gc.testlist/analysis.html

and:

http://sqeweb.sfbay.sun.com/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2010-09-22/GC_Baseline-Xinc/vm/linux-i586/client/mixed/linux-i586_vm_client_mixed_vm.gc.testlist/ResultDir/CallGC01/

Machine: tq-win2k-dev
VM Arch: linux-i586 (Client VM).

The test seems to be hanging in one run out of 3 - so it's fairly reproducible.

The flags used to run the test include +ExplicitGCInvokesConcurrent. With this flag, calls to System.gc() perform a young collection and initiate a concurrent cycle. The thread that is making the call to System.gc() waits until the concurrent cycle completes. Looking at the stack traces of the various threads it looks like the issue might be associated with this flag.

I'm attaching the rerun.sh script just in case the links above end up being archived.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/a181f3a124dd
25-03-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/a181f3a124dd
21-03-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/a181f3a124dd
15-03-2011

WORK AROUND Don't use -XX:+CMSIncrementalMode and -XX:+ExplicitGCInvokesConcurrent together, or avoid calling System.gc() concurrently from two different mutator threads.
12-03-2011

EVALUATION When using iCMS+ExplicitGCInvokesConcurrent, while a system.gc() request is pending, we "disable_icms" -- in other words, we temporarily discontinue incrementality, so that a CMS collection can proceed to completion even if there is no allocation to act as a trigger for iCMS initiation. In this case, the enable_icms() and disable_icms() interfaces which had been used to affect this incrementality enabling and disabling are not adequate for this use because multiple concurrent invocations can destructively interfere, leaving a thread starnded with its system.gc() request stuck in limbo. The fix would be to make the enable/disable interfaces counting interfaces so they do not lose any control events because of inteference.
12-03-2011