Skip to content

Conversation

@earthling-amzn
Copy link
Contributor

@earthling-amzn earthling-amzn commented Apr 25, 2025

Add a test case for -XX:+UseCompactObjectHeaders, increase pressure on old generation. I ran the test (which includes a compact object headers case now) fifty times without failure.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8355372: GenShen: Test gc/shenandoah/generational/TestOldGrowthTriggers.java fails with UseCompactObjectHeaders enabled (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24888/head:pull/24888
$ git checkout pull/24888

Update a local copy of the PR:
$ git checkout pull/24888
$ git pull https://git.openjdk.org/jdk.git pull/24888/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24888

View PR using the GUI difftool:
$ git pr show -t 24888

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24888.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 25, 2025

👋 Welcome back wkemper! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Apr 25, 2025

@earthling-amzn This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8355372: GenShen: Test gc/shenandoah/generational/TestOldGrowthTriggers.java fails with UseCompactObjectHeaders enabled

Reviewed-by: ysr, kdnilsen

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 83 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 25, 2025
@openjdk
Copy link

openjdk bot commented Apr 25, 2025

@earthling-amzn The following labels will be automatically applied to this pull request:

  • hotspot-gc
  • shenandoah

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added hotspot-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Apr 25, 2025
@mlbridge
Copy link

mlbridge bot commented Apr 25, 2025

Webrevs

Copy link
Member

@ysramakrishna ysramakrishna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine but left some thoughts, although you probably don't want to change anything if this setting is working to induce the behavior you want to test.

A whitebox test may be better in the future rather than having to tweak test settings to induce the right behavior to trigger old growth.

Comment on lines 61 to 68
case 0:
// 50% chance of creating garbage
array[replaceIndex] = array[replaceIndex].max(array[deriveIndex]);
break;
case 1:
// 50% chance of creating garbage
array[replaceIndex] = array[replaceIndex].min(array[deriveIndex]);
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you have left this in place & reduced the heap size of the UseCompactHeaders test to half the current setting to induce the trigger?

for (int i = 0; i < ArraySize; i++) {
int replaceIndex = r.nextInt(ArraySize);
int deriveIndex = r.nextInt(ArraySize);
switch (i & 0x3) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...otherwise could you just do (i & 0x1) here and change cases 2 & 3 to cases 0 & 1?

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 25, 2025
@MBaesken
Copy link
Member

Hi @earthling-amzn I added your PR to our build/test queue, let's see if the issues we observed go away on all platforms!

Copy link
Contributor

@kdnilsen kdnilsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me.

@earthling-amzn
Copy link
Contributor Author

@MBaesken - thank you! Please let us know how it goes.

@ysramakrishna - I wanted to increase pressure specifically on the old generation. I'm not sure reducing the heap size alone would do that. As you point out, the cases in the switch statement do look a bit silly now. I'll make the change you suggested.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Apr 28, 2025
@MBaesken
Copy link
Member

thank you! Please let us know how it goes.

Unfortunately, not so good .
On darwin x86_64 fastdebug,

gc/shenandoah/generational/TestOldGrowthTriggers.java

triggers now this crash/assert


#  Internal Error (/priv/jenkins/client-home/workspace/openjdk-jdk-dev-macos_x86_64-dbg/jdk/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp:607), pid=58469, tid=18179
#  assert(_degen_point == ShenandoahGC::_degenerated_unset) failed: Should not be set yet: Outside of Cycle

Stack: [0x000070000fc5b000,0x000070000fd5b000],  sp=0x000070000fd5aae0,  free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x1576749]  VMError::report(outputStream*, bool)+0x1ef9  (shenandoahGenerationalControlThread.cpp:607)
V  [libjvm.dylib+0x157a65b]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x60b
V  [libjvm.dylib+0x72bd08]  report_vm_error(char const*, int, char const*, char const*, ...)+0xd8
V  [libjvm.dylib+0x121e75a]  ShenandoahGenerationalControlThread::check_cancellation_or_degen(ShenandoahGC::ShenandoahDegenPoint)+0x14a
V  [libjvm.dylib+0x121e455]  ShenandoahGenerationalControlThread::service_concurrent_cycle(ShenandoahGeneration*, GCCause::Cause, bool)+0x165
V  [libjvm.dylib+0x121cd72]  ShenandoahGenerationalControlThread::run_gc_cycle(ShenandoahGenerationalControlThread::ShenandoahGCRequest const&)+0x1a2
V  [libjvm.dylib+0x121c8b2]  ShenandoahGenerationalControlThread::run_service()+0x142
V  [libjvm.dylib+0x6a798b]  ConcurrentGCThread::run()+0x1b
V  [libjvm.dylib+0x14bfa5c]  Thread::call_run()+0xbc
V  [libjvm.dylib+0x1060ff7]  thread_native_entry(Thread*)+0x137
C  [libsystem_pthread.dylib+0x618b]  _pthread_start+0x63
C  [libsystem_pthread.dylib+0x1ae3]  thread_start+0xf

@MBaesken
Copy link
Member

Unfortunately, not so good .
On darwin x86_64 fastdebug,

gc/shenandoah/generational/TestOldGrowthTriggers.java

triggers now this crash/assert

Seems we have for this already
https://bugs.openjdk.org/browse/JDK-8355789
JDK-8355789: GenShen: assert(_degen_point == ShenandoahGC::_degenerated_unset) failed: Should not be set yet: Outside of Cycle

@earthling-amzn
Copy link
Contributor Author

@MBaesken - we have a PR for that assert under review: #24940

Copy link
Member

@ysramakrishna ysramakrishna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 29, 2025
@earthling-amzn
Copy link
Contributor Author

@MBaesken , have you had a chance to retest after PR#24940 was integrated?

@earthling-amzn
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented May 1, 2025

Going to push as commit 9e26b9f.
Since your change was applied there have been 123 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 1, 2025
@openjdk openjdk bot closed this May 1, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 1, 2025
@openjdk
Copy link

openjdk bot commented May 1, 2025

@earthling-amzn Pushed as commit 9e26b9f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@MBaesken
Copy link
Member

MBaesken commented May 2, 2025

have you had a chance to retest after PR#24940 was integrated?

Did not see the issue again after this (of course this is no 'proof' that they will never come back), so I would say looks good !

@earthling-amzn earthling-amzn deleted the old-growth-triggers-test branch October 7, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

4 participants