JDK-6561906 : Assert in DisoveredListIterator::load_ptrs() too strong in certain execution contexts
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-05-24
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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 6 JDK 7 Other
6u10Fixed 7Fixed hs11Fixed
Related Reports
Relates :  
Description
The method can be called in various contexts, both stop-world during
refs processing or discovery, or concurrent with mutators
during ref list precleaning interleaving with concurrent discovery.
Depending upon the context, the referent hanging off of the ref
being loaded may or may not be null, and when it's not null,
may or may not have an expected mark word.

In particular, if called from CMS during concurrent precleaning
of ref lists, we need:-

     assert(_referent->is_oop_or_null(UseConcMarkSweepGC), "bad referent");

rather than

     assert(_referent->is_oop(), "bad referent");

as currently the case. It is possible, but probably overkill, and
perhaps with an associated performance penalty, to pass an appropriate
parameter from the calling context that is used to do the
appropriate form of weaker or stronger assertion checking.
Another sighting:-

(from ###@###.###)

One more gc/4950157.
> 
> The test says it passed but VM crashed in GC with
> assert(_referent->is_oop(),"bad referent").
> VM start to crash from b12.
> 
> Thanks,
> Vladimir
> 
> jaberwocky% 
> /net/vmsqe.sfbay/export/backup/UNIFIED-DTF/harness/jct-tools3.2.2_02/solaris/bin/jtreg 
> -verbose:all -testjdk:$JAVA_HOME/fastdebug gc/4950157
> --------------------------------------------------
> TEST: gc/4950157/BubbleUpRef.java
> JDK under test: (/tmp/kvn/6563987/jdk7_b13/fastdebug)
> java version "1.7.0-ea-fastdebug"
> Java(TM) SE Runtime Environment (build 1.7.0-ea-fastdebug-b13)
> Java HotSpot(TM) Tiered VM (build 1.7.0-ea-fastdebug-b13-fastdebug, 
> mixed mode)
> 
> ACTION: compile -- Passed. Compilation successful
> REASON: User specified action: run compile BubbleUpRef.java
> TIME:   10.063 seconds
> messages:
> command: compile /tmp/kvn/6563987/tests/gc/4950157/BubbleUpRef.java
> reason: User specified action: run compile BubbleUpRef.java
> elapsed time (seconds): 10.063
> STDOUT:
> STDERR:
> Note: /tmp/kvn/6563987/tests/gc/4950157/BubbleUpRef.java uses 
> unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 
> ACTION: shell -- Passed. Execution successful
> REASON: User specified action: run shell Test4950157.sh
> TIME:   3.892 seconds
> messages:
> command: shell Test4950157.sh []
> reason: User specified action: run shell Test4950157.sh
> elapsed time (seconds): 3.892
> STDOUT:
> # /tmp/kvn/6563987/tests/JTwork/scratch/hs_err_pid18630.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp
> #
> VM option '-CMSYield'
> VM option '+UseConcMarkSweepGC'
> VM option 'CMSInitiatingOccupancyFraction=0'
> Current thread is 6
> Dumping core ...
> STDERR:
> java full version "1.7.0-ea-fastdebug-b13"
> Abort
> 
> TEST RESULT: Passed. Execution successful
> --------------------------------------------------
> Test results: passed: 1
> Report written to JTreport/report.html
> Results written to /tmp/kvn/6563987/tests/JTwork
> 
> 
> jaberwocky% head /tmp/kvn/6563987/tests/JTwork/scratch/hs_err_pid18630.log
> #
> # An unexpected error has been detected by Java Runtime Environment:
> #
> #  Internal Error 
> (/BUILD_AREA/jdk7.0/hotspot/src/share/vm/memory/referenceProcessor.cpp:488), 
> pid=18630, tid=6
> #  Error: assert(_referent->is_oop(),"bad referent")
> #
> # Java VM: Java HotSpot(TM) Tiered VM 
> (1.7.0-ea-fastdebug-b13-fastdebug mixed mode solaris-sparc)
> # If you would like to submit a bug report, please visit:
> #   http://java.sun.com/webapps/bugreport/crash.jsp
> #
> 
> 
> 
>

Comments
WORK AROUND Turn off the assert, do not use fastdebug builds, or disable reference list precleaning via -XX:-CMSPrecleanRefLists{1,2} (*2 is already off by default).
24-05-2007

EVALUATION See description field.
24-05-2007

SUGGESTED FIX See description field.
24-05-2007