JDK-6801625 : CDS: HeapDump tests crash with internal error in compactingPermGenGen.cpp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs15,hs16,7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic,x86
  • Submitted: 2009-02-05
  • Updated: 2011-03-09
  • Resolved: 2011-03-07
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
6u18Fixed 7Fixed hs16Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
eapDump tests crashes with Internal Error:
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (compactingPermGenGen.cpp:361), pid=13121, tid=3
#  Error: ShouldNotReachHere()
#


starting from hs15b01 in case class data sharing is used.
Changed Synopsis from "HeapDump ... in case CDS is used" to
"CDS: HeapDump ...."
Changed Synopsis from ".. tests crashes .." to " ... tests crash ..."

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hsx16/master/rev/4385d4e7497b
13-11-2009

PUBLIC COMMENTS The same assert might be hit with -XX:+UnlockDiagnosticVMOptions -XX:+Verify{Before,After}GC. The workaround of -Xshare:off documented in the "Workaround" field would work around the issue(s), but end up turning off class data sharing.
10-11-2009

WORK AROUND -Xshare:off
10-11-2009

EVALUATION http://hg.openjdk.java.net/hsx/hsx16/baseline/rev/4385d4e7497b
05-11-2009

SUGGESTED FIX http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/26f1542097f1
04-11-2009

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/26f1542097f1
04-11-2009

EVALUATION Filed 6897789 for cleaning up CDS/perm structuring.
03-11-2009

EVALUATION This CR will be minimally fixed to attend to the regression, and a separate one filed to rationalize the structure of CDS to prevent the recurrence of similar errors in the future.
03-11-2009

EVALUATION Regression in behaviour happened as a result of a latent bug that pre-existed hs15b01, but was uncovered as a result of the changes in 6689653. See comments section for more detail.
03-11-2009

EVALUATION Started failing starting with hs15b01. No clue as yet which specific change in hs15b01 caused this to start failing. Still investigating.
02-11-2009

SUGGESTED FIX diff -r 29adffcb6a61 src/share/vm/memory/compactingPermGenGen.cpp --- a/src/share/vm/memory/compactingPermGenGen.cpp Fri Oct 30 13:31:11 2009 -0400 +++ b/src/share/vm/memory/compactingPermGenGen.cpp Mon Nov 02 10:22:28 2009 -0800 @@ -352,15 +352,13 @@ void CompactingPermGenGen::post_compact( } +// Do not use in time-critical operations due to the possibility of paging. void CompactingPermGenGen::space_iterate(SpaceClosure* blk, bool usedOnly) { OneContigSpaceCardGeneration::space_iterate(blk, usedOnly); if (spec()->enable_shared_spaces()) { -#ifdef PRODUCT // Making the rw_space walkable will page in the entire space, and - // is to be avoided. However, this is required for Verify options. - ShouldNotReachHere(); -#endif - + // is to be avoided. However, this is required for Verify and + // heap dump operations. blk->do_space(ro_space()); blk->do_space(rw_space()); }
02-11-2009

EVALUATION As in suggested fix section. Need some archeology to see why this started showing up now, but looks like it would be a day-one bug because of the "ShouldNotReachHere()". Will update re history.
02-11-2009

EVALUATION See comments and suggested fix section.
20-10-2009

SUGGESTED FIX Delete lines 358-362 below, or if you don't like that, replace ShouldNotReachHere() with return; I personally think that performance-sensitive code should either deliberately skip over the shared space if it wants to, rather than use this whimsical method of preventing the use of a legitimate interface for other purposes:- 355 void CompactingPermGenGen::space_iterate(SpaceClosure* blk, bool usedOnly) { 356 OneContigSpaceCardGeneration::space_iterate(blk, usedOnly); 357 if (spec()->enable_shared_spaces()) { 358 #ifdef PRODUCT 359 // Making the rw_space walkable will page in the entire space, and 360 // is to be avoided. However, this is required for Verify options. 361 ShouldNotReachHere(); 362 #endif 363 364 blk->do_space(ro_space()); 365 blk->do_space(rw_space()); 366 } 367 } 368
20-10-2009