JDK-7134655 : Crash in reference processing when doing single-threaded remarking
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs23
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-01-27
  • Updated: 2012-03-22
  • Resolved: 2012-02-21
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 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Description
If we run the remarking phase in the VM thread we'll crash if the reference processor is setup to use multi-threaded discovery.

We crash because as_Worker_thread() returns NULL in get_discovered_list():
  if (_discovery_is_mt) {
    // During a multi-threaded discovery phase,
    // each thread saves to its "own" list.
    Thread* thr = Thread::current();
    id = thr->as_Worker_thread()->id();
  } else {
    // single-threaded discovery, we save in round-robin
    // fashion to each of the lists.
    if (_processing_is_mt) {
      id = next_id();
    }
  }

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/be649fefcdc2
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/be649fefcdc2
28-01-2012

EVALUATION Temporarily disabled multi-threaded reference discovery when entering a single-threaded remark phase.
27-01-2012