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

8264940: java/lang/invoke/6998541/Test6998541.java failed "guarantee(ik->is_initialized()) failed: java/lang/Byte$ByteCache must be initialized" #3411

Closed
wants to merge 5 commits into from

Conversation

Wanghuang-Huawei
Copy link

@Wanghuang-Huawei Wanghuang-Huawei commented Apr 9, 2021

  • The main reason is that in this situation the BoxCache is not initialized before uncommon_trap.
  • java.lang.Byte$ByteCache is loaded without initializing here
  • I think that all *Cache classes should be loaded in this situation.

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8264940: java/lang/invoke/6998541/Test6998541.java failed "guarantee(ik->is_initialized()) failed: java/lang/Byte$ByteCache must be initialized"

Reviewers

Contributors

  • Wu Yan <wuyan34@huawei.com>

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3411/head:pull/3411
$ git checkout pull/3411

Update a local copy of the PR:
$ git checkout pull/3411
$ git pull https://git.openjdk.java.net/jdk pull/3411/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3411

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3411.diff

…ik->is_initialized()) failed: java/lang/Byte$ByteCache must be initialized"
@bridgekeeper
Copy link

bridgekeeper bot commented Apr 9, 2021

👋 Welcome back whuang! 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.

@Wanghuang-Huawei
Copy link
Author

/contributor add Wu Yan wuyan34@huawei.com

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

openjdk bot commented Apr 9, 2021

@Wanghuang-Huawei
Contributor Wu Yan <wuyan34@huawei.com> successfully added.

@openjdk
Copy link

openjdk bot commented Apr 9, 2021

@Wanghuang-Huawei The following label will be automatically applied to this pull request:

  • hotspot

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

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Apr 9, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 9, 2021

Webrevs

@dholmes-ora
Copy link
Member

To evaluate what is the right fix for this problem I need to understand how JDK-8261137 caused the problem. Can you explain that please? When was this class normally initialized?

Simply initializing the class at the point where you thought it already should have been initialized may not be the right solution, and as Coleen has pointed out you have to deal with any exceptions that may occur during that initialization.

Thanks,
David

@vnkozlov
Copy link
Contributor

vnkozlov commented Apr 9, 2021

The issue happens because the test was run with -Xcomp flag. The method was not executed in Interpreter and class was not initialized before the method is JIT compiled.
I agree with @dholmes-ora that we should not fix it in Deoptimizer. I think we should restrict "Optimization of Box nodes in uncommon_trap" 8261137 only to cases when class is initialized.

@dcubed-ojdk
Copy link
Member

@vnkozlov and @Wanghuang-Huawei,
This failure appears to be happening twice in every Tier6 job set.
Is there an estimate on when a fix for this issue will be ready?

@dcubed-ojdk
Copy link
Member

@vnkozlov and @Wanghuang-Huawei,
This failure has now reached Tier8 and we have 8 failures (so far).
I haven't seen a response to my query on Friday. Please ProblemList
this test if the fix is not going to be integrated soon.

@Wanghuang-Huawei
Copy link
Author

@vnkozlov and @Wanghuang-Huawei,
This failure has now reached Tier8 and we have 8 failures (so far).
I haven't seen a response to my query on Friday. Please ProblemList
this test if the fix is not going to be integrated soon.

I am very sorry about that.I have fixed this issue in a new way and test it on my x86 and aarch64 machine. I think I will push a new commit tomorrow.

@Wanghuang-Huawei
Copy link
Author

@dholmes-ora @vnkozlov @dcubed-ojdk @coleenp I fixed the bug according to @vnkozlov's suggestion.
I added method is_box_cache_valid to judge if a box cache class is ready.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

This approach looks much better to me, but I'll leave it to @vnkozlov to confirm the details.

Thanks,
David

@openjdk
Copy link

openjdk bot commented Apr 12, 2021

@Wanghuang-Huawei 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:

8264940: java/lang/invoke/6998541/Test6998541.java failed "guarantee(ik->is_initialized()) failed: java/lang/Byte$ByteCache must be initialized"

Co-authored-by: Wu Yan <wuyan34@huawei.com>
Reviewed-by: dholmes, kvn, dcubed

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

  • 943503e: 8265035: Remove unneeded exception check from refill_ic_stubs()
  • fced0f0: 8265113: ProblemList gtest/GTestWrapper.java:os.release_multi_mappings on macosx-aarch64
  • 2aae29c: 8265111: ProblemList java/util/concurrent/locks/Lock/TimedAcquireLeak.java on macosx-aarch64
  • a84d886: 8265112: ProblemList some java/foreign tests on macosx-aarch64
  • 87e39cb: 8265110: ProblemList compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java on macosx-aarch64
  • 784f1c1: 8264200: java/nio/channels/DatagramChannel/SRTest.java fails intermittently
  • a4f644e: 8265064: Move clearing and setting of members into helpers in ReservedSpace
  • 7006070: 8265061: Simplify MethodHandleNatives::canBeCalledVirtual
  • 1935655: 8264957: Cleanup unused array Type::dual_type
  • 954b9a1: 8264795: IGV: Upgrade NetBeans platform
  • ... and 59 more: https://git.openjdk.java.net/jdk/compare/ec599da68cac6349e7f28b508d8038c18a4e7347...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 (@coleenp, @dholmes-ora, @vnkozlov, @dcubed-ojdk) 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 Apr 12, 2021
Copy link
Member

@dholmes-ora dholmes-ora 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 - just a missing include.

Thanks,
David

src/hotspot/share/ci/ciInstanceKlass.cpp Show resolved Hide resolved
Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good.

@Wanghuang-Huawei
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Apr 13, 2021
@openjdk
Copy link

openjdk bot commented Apr 13, 2021

@Wanghuang-Huawei
Your change (at version 6cbb39f) is now ready to be sponsored by a Committer.

@dcubed-ojdk
Copy link
Member

I've reviewed and I'm testing the fix right now. If it passes, then I'll sponsor.

@dcubed-ojdk
Copy link
Member

dcubed-ojdk commented Apr 13, 2021

I reproduced the failure on my MBP13 with 'fastdebug' and 'slow debug' bits
with these options:

VM_OPTIONS=-Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:+DeoptimizeALot

and then retested with the fix in place with 'fastdebug' bits and the failure
no longer reproduced.

/sponsor

@openjdk openjdk bot closed this Apr 13, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 13, 2021
@openjdk
Copy link

openjdk bot commented Apr 13, 2021

@dcubed-ojdk @Wanghuang-Huawei Since your change was applied there have been 69 commits pushed to the master branch:

  • 943503e: 8265035: Remove unneeded exception check from refill_ic_stubs()
  • fced0f0: 8265113: ProblemList gtest/GTestWrapper.java:os.release_multi_mappings on macosx-aarch64
  • 2aae29c: 8265111: ProblemList java/util/concurrent/locks/Lock/TimedAcquireLeak.java on macosx-aarch64
  • a84d886: 8265112: ProblemList some java/foreign tests on macosx-aarch64
  • 87e39cb: 8265110: ProblemList compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java on macosx-aarch64
  • 784f1c1: 8264200: java/nio/channels/DatagramChannel/SRTest.java fails intermittently
  • a4f644e: 8265064: Move clearing and setting of members into helpers in ReservedSpace
  • 7006070: 8265061: Simplify MethodHandleNatives::canBeCalledVirtual
  • 1935655: 8264957: Cleanup unused array Type::dual_type
  • 954b9a1: 8264795: IGV: Upgrade NetBeans platform
  • ... and 59 more: https://git.openjdk.java.net/jdk/compare/ec599da68cac6349e7f28b508d8038c18a4e7347...master

Your commit was automatically rebased without conflicts.

Pushed as commit c797511.

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

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
5 participants