JDK-2142632 : Allocation of huge array which would cause OutOfMemoryError causes JVM to hang with -Xincgc
  • Type: Backport
  • Backport of: JDK-6472335
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2006-10-03
  • Updated: 2012-01-31
  • Resolved: 2006-10-04
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 Other
6 b101Fixed hs10Fixed
Description
see parent CR. This subCR tracks the 6.0 avatar of the bug.

Comments
SUGGESTED FIX Event: putback-to Parent workspace: /net/jano.sfbay/export/disk05/hotspot/ws/1.6/rc/baseline (jano.sfbay:/export/disk05/hotspot/ws/1.6/rc/baseline) Child workspace: /net/prt-web.sfbay/prt-workspaces/20061003151202.ysr.mustang/workspace (prt-web:/net/prt-web.sfbay/prt-workspaces/20061003151202.ysr.mustang/workspace) User: ysr Comment: --------------------------------------------------------- Job ID: 20061003151202.ysr.mustang Original workspace: neeraja:/net/jano.sfbay/export/hotspot/users1/ysr/mustang Submitter: ysr Archived data: /net/prt-archiver.sfbay/data/archived_workspaces/1.6/rc/baseline/2006/20061003151202.ysr.mustang/ Webrev: http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/1.6/rc/baseline/2006/20061003151202.ysr.mustang/workspace/webrevs/webrev-2006.10.03/index.html webrev: http://analemma.sfbay/net/jano/export/disk05/hotspot/users/ysr/mustang Backport to 6.0b101 of the fixes from 7.0: ------------------------------------------ Prologue: Because 6476760 (a duplicate of 6472335) involves a JCK failure with -Xincgc, this bug is considred a showstopper for 6.0 necessitating this backport from 7.0 where this bug had recently been fixed. Below I reproduce the putback cooments for the 7.0 changes associated with this bug. (Note the second fix below corrects an issue identified by the first fix.) ------------------------------------------ Fixed 6472335: Allocation of huge array which would cause OutOfMemoryError causes JVM to hang with -Xincgc. Webrev: http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/gc_baseline/2006/20060922160805.ysr.bot/workspace/webrevs/webrev-2006.09.22/index.html A predicate computation in CMSGen::allocation_limit_reached() was overflowing. This day-one bug was unmasked because of the recent (b92) fix for CR 6415406. Reviewed by: Andrey Petrusenko Fix Verified: yes Verification Testing: test in bug report Other testing: PRT & refworload ? incgc ? concgc ------------------------------------------ Fixed 6475811: iCMS: assert(top < _icms_stop_limit,"Tautology") Webrev: http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/gc_baseline/2006/20060927123159.ysr.bot/workspace/webrevs/webrev-2006.09.27/index.html The assert, recently introduced w/the changes for 6472335, was a tad too strong and could have been merely weakened by changing the "<" to "<=". It, however, indicated a slight inefficiency in iCMS strobing in that an essentially empty strobe would apply for sufficiently low values of the duty-cycle. In these cases, we now just elide the unnecessary empty strobe entirely. (See some further commentary in the bug report.) Reviewed by: John Coomes, Andrey Petrusenko (, Igor Veresov) Fix Verified: yes Verification Testing: (the failing nightly tests) gc/gctests/Compact/compact017 gc/gctests/Compact/compact018 Other testing: (in progress) PRT & refworload w/incgc ------------------------------------------ Files: update: src/share/vm/memory/concurrentMarkSweepGeneration.cpp Examined files: 3875 Contents Summary: 1 update 3874 no action (unchanged)
04-10-2006

SUGGESTED FIX ------- concurrentMarkSweepGeneration.cpp ------- *** /tmp/sccs.apaWt0 Tue Oct 3 14:51:04 2006 --- concurrentMarkSweepGeneration.cpp Tue Oct 3 14:50:04 2006 *************** *** 1126,1132 **** _icms_stop_limit = tmp_stop; } } ! } else { _icms_start_limit = _icms_stop_limit = eden->end(); } --- 1126,1133 ---- _icms_stop_limit = tmp_stop; } } ! } ! if (duty_cycle == 0 || (_icms_start_limit == _icms_stop_limit)) { _icms_start_limit = _icms_stop_limit = eden->end(); } *************** *** 1169,1175 **** percent_of_space(space, _icms_stop_limit)); } ConcurrentMarkSweepThread::start_icms(); ! if (top + word_size < _icms_stop_limit) { return _icms_stop_limit; } --- 1170,1177 ---- percent_of_space(space, _icms_stop_limit)); } ConcurrentMarkSweepThread::start_icms(); ! assert(top < _icms_stop_limit, "Tautology"); ! if (word_size < pointer_delta(_icms_stop_limit, top)) { return _icms_stop_limit; } WEBREV AT: http://analemma.sfbay/net/jano.sfbay/export/hotspot/users1/ysr/mustang/webrev
03-10-2006

SUGGESTED FIX See parent CR. Webrev will be added here as soon as location of master workspace for fix putback is known.
03-10-2006

EVALUATION As requested by the core team, this fix is targeted to b101.
03-10-2006