Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8288129: Shenandoah: Skynet test crashed with iu + aggressive #10089

Closed
wants to merge 1 commit into from

Conversation

ashu-mehra
Copy link
Contributor

@ashu-mehra ashu-mehra commented Aug 30, 2022

Another attempt to fix the crash when running Loom with Shenandoah in iu+aggressive mode.

Explanation for the problem can be seen in #9982 (comment) but instead of adding barriers for the oops in stack chunk header in do_barriers(), this fix uses Access API (oopDesc::obj_field_put_access) with IS_DEST_UNINITIALIZED decorator as suggested in #9982 (comment). The Access API invokes appropriate barriers based on the GC policy and the decorator. For SATB barriers it is a no-op. For IU mode it invokes the iu write barrier.
The Access API is same as in ZGC [1], [2]

[1] https://github.com/openjdk/zgc/blob/f0b25d9339104a80f903d889a7939dd623c76867/src/hotspot/share/oops/oop.inline.hpp#L215
[2] https://github.com/openjdk/zgc/blob/f0b25d9339104a80f903d889a7939dd623c76867/src/hotspot/share/classfile/javaClasses.inline.hpp#L286

Test with fastdebug build:

  • hotspot_loom
  • jdk_loom
  • hotspot_loom in Shenandoah IU mode
  • jdk_loom in Shenandoah IU mode
  • hotspot_loom in Shenandoah IU + aggressive
  • jdk_loom in Shenandoah IU + aggressive

Signed-off-by: Ashutosh Mehra asmehra@redhat.com


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-8288129: Shenandoah: Skynet test crashed with iu + aggressive

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10089

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

Using diff file

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

Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
@bridgekeeper
Copy link

bridgekeeper bot commented Aug 30, 2022

👋 Welcome back ashu-mehra! 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 openjdk bot added the rfr Pull request is ready for review label Aug 30, 2022
@openjdk
Copy link

openjdk bot commented Aug 30, 2022

@ashu-mehra The following labels will be automatically applied to this pull request:

  • hotspot
  • 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 hotspot-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Aug 30, 2022
@ashu-mehra
Copy link
Contributor Author

ashu-mehra commented Aug 30, 2022

I got couple of intermittent failures in jdk_loom with Shenandoah IU+aggressive mode, but I reproduced the same intermittent failure without the changes as well, so probably a latent bug.

Tests that failed are:

  • java/lang/management/ThreadMXBean/LockedSynchronizers.java
  • java/lang/management/ThreadMXBean/MyOwnSynchronizer.java

Frequency of failure is around 1/10.

Reason for the failure is the following assertion:

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/shenandoahBarrierSet.inline.hpp:246
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/asmehra/data/ashu-mehra/jdk/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp:246), pid=1427500, tid=1427517
#  Error: Shenandoah assert_not_in_cset failed; Object should not be in collection set

Referenced from:
  interior location: 0x00007fc020003280
  outside of Java heap
  0x00007fc020003280 points into unknown readable memory: 0x0000000000000000 | 00 00 00 00 00 00 00 00

Object:
  0x00000000d01b6840 - klass 0x0000000800215ed8 java.util.concurrent.locks.ReentrantLock$NonfairSync
    not allocated after mark start
    not after update watermark
        marked strong
    not marked weak
        in collection set
  mark: mark(is_neutral no_hash age=0)
  region: |    6|CS |BTE     d0180000,     d01bff00,     d01c0000|TAMS     d01bff00|UWM     d01bff00|U   255K|T   255K|G     0B|S     0B|L 49040B|CP   0

Forwardee:
  (the object itself)

I don't see any open bug for this.

@ashu-mehra
Copy link
Contributor Author

ashu-mehra commented Aug 30, 2022

@fisk @rkennke if these changes look good, I will close the previous PR.

@mlbridge
Copy link

mlbridge bot commented Aug 30, 2022

Webrevs

@DanHeidinga
Copy link
Contributor

@ashu-mehra I opened https://bugs.openjdk.org/browse/JDK-8293252 for the ThreadMXBean crashes mentioned in #10089 (comment)

@ashu-mehra
Copy link
Contributor Author

@fisk can you please review the changes

Copy link
Contributor

@fisk fisk left a comment

Choose a reason for hiding this comment

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

Looks great!

@openjdk
Copy link

openjdk bot commented Sep 2, 2022

@ashu-mehra 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:

8288129: Shenandoah: Skynet test crashed with iu + aggressive

Reviewed-by: eosterlund, rkennke

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 320 new commits pushed to the master branch:

  • caae53f: 8289508: Improve test coverage for XPath Axes: ancestor, ancestor-or-self, preceding, and preceding-sibling
  • cb5771d: 8294006: Avoid hardcoding object file suffixes in make
  • 5002eaa: 8293828: JFR: jfr/event/oldobject/TestClassLoaderLeak.java still fails when GC cycles are not happening
  • e3358e7: 8294008: Grapheme implementation of setText() throws IndexOutOfBoundsException
  • df8ec09: 8294046: Newly added test test/jdk/javax/swing/JTabbedPane/TestNPEStateChgListener.java fails in macos
  • 09af637: 8294012: RISC-V: get/put_native_u8 missing the case when address&7 is 6
  • 584de68: 8294058: Early use of lambda introduced in JDK-8285263 cause startup regressions in 20-b02
  • bb422f5: 8293595: tstrings::any() is missing an overload
  • 0f28cb0: 8294014: Remove redundant UseCompiler conditions
  • 84ee1a2: 8293781: RISC-V: Clarify types of calls
  • ... and 310 more: https://git.openjdk.org/jdk/compare/d24b7b7026cf85f1aecf44f60819762872cfd5c1...master

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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@fisk, @rkennke) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 2, 2022
@ashu-mehra
Copy link
Contributor Author

@rkennke ping to get your review :-)

@fisk
Copy link
Contributor

fisk commented Sep 19, 2022

@rkennke ping!

Copy link
Contributor

@rkennke rkennke left a comment

Choose a reason for hiding this comment

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

Oh sorry, I've been deep in some other stuff. Thanks for reminding me.
The change looks good.
Does this mean we can now remove some of the GC specific paths in stack-chunk handling code?

@ashu-mehra
Copy link
Contributor Author

@rkennke @fisk thank you for reviewing the pr.

@ashu-mehra
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 20, 2022
@openjdk
Copy link

openjdk bot commented Sep 20, 2022

@ashu-mehra
Your change (at version 17768f0) is now ready to be sponsored by a Committer.

@ashu-mehra
Copy link
Contributor Author

Does this mean we can now remove some of the GC specific paths in stack-chunk handling code?

I guess you are referring to the checks for UseShenandoahGC in the continuations code. I am not sure we can get rid of it. I will need to dig deeper for that.

@adinn
Copy link
Contributor

adinn commented Sep 21, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 21, 2022

Going to push as commit 84d7ff6.
Since your change was applied there have been 337 commits pushed to the master branch:

  • 07afa3f: 8294110: compiler/uncommontrap/Decompile.java fails after JDK-8293798
  • 0746bcb: 8294083: RISC-V: Minimal build failed with --disable-precompiled-headers
  • 95ec2ea: 8293897: Synthetic final modifier is part of the AST for a try-with-resource resource
  • d14e96d: 8293493: Signal Handlers printout should show signal block state
  • da4fdfb: 8293659: Improve UnsatisfiedLinkError error message to include dlopen error details
  • cd1cdcd: 8293116: Incremental JDK build could be sped up
  • e9401e6: 8293364: IGV: Refactor Action in EditorTopComponent and fix minor bugs
  • 844a95b: 8292892: Javadoc index descriptions are not deterministic
  • 8d1dd6a: 8294076: Improve ant detection in idea.sh
  • 4e7cb15: 8293480: IGV: Update Bytecode and ControlFlow Component immediately when opening a new graph
  • ... and 327 more: https://git.openjdk.org/jdk/compare/d24b7b7026cf85f1aecf44f60819762872cfd5c1...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 21, 2022
@openjdk openjdk bot closed this Sep 21, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Sep 21, 2022
@openjdk
Copy link

openjdk bot commented Sep 21, 2022

@adinn @ashu-mehra Pushed as commit 84d7ff6.

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

@ashu-mehra ashu-mehra deleted the JDK-8288129_v2 branch February 7, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated shenandoah shenandoah-dev@openjdk.org
5 participants