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

8292385: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out #10136

Closed
wants to merge 1 commit into from

Conversation

dean-long
Copy link
Member

@dean-long dean-long commented Sep 2, 2022

The problem is caused by missing bailout logic in inline_string_char_access(). This PR adds the needed logic to match other intrinsics.

I tried to come up with a stand-alone test case, but was not successful.


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-8292385: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10136

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

Using diff file

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

@dean-long dean-long changed the title 8292385 assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out 8292385: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out Sep 2, 2022
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 2, 2022

👋 Welcome back dlong! 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 Sep 2, 2022
@openjdk
Copy link

openjdk bot commented Sep 2, 2022

@dean-long The following label will be automatically applied to this pull request:

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Sep 2, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 2, 2022

Webrevs

@DamonFool
Copy link
Member

Is it possible to create a jtreg test for this fix?
Thanks.

@dean-long
Copy link
Member Author

Is it possible to create a jtreg test for this fix? Thanks.

It is probably possible, but when I tried I couldn't get it to reproduce. It depends on profiling information, so I had to use the replay file to reproduce it.

@DamonFool
Copy link
Member

Is it possible to create a jtreg test for this fix? Thanks.

It is probably possible, but when I tried I couldn't get it to reproduce. It depends on profiling information, so I had to use the replay file to reproduce it.

So can you share us the replay file to verify the fix?

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

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

Looks good.

@openjdk
Copy link

openjdk bot commented Sep 2, 2022

@dean-long 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:

8292385: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out

Reviewed-by: thartmann, jiefu, kvn

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

  • da99e3e: 8289400: Improve com/sun/jdi/TestScaffold error reporting
  • 77e21c5: 8290529: C2: assert(BoolTest(btest).is_canonical()) failure
  • fcc0cf9: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable
  • 6fc58b8: 8293207: Add assert to JVM_ReferenceRefersTo to clarify its API
  • ce06a3b: 8293023: Change CardTable::is_in_young signature
  • 26cac08: 8293209: Parallel: Remove unused variables in PSParallelCompact::invoke
  • 46523b8: 8293219: Microsoft toolchain selection picks 32-bit tools over 64-bit
  • bc5ffc8: 8293100: RISC-V: Need to save and restore callee-saved FloatRegisters in StubGenerator::generate_call_stub
  • 98ce45f: 8292981: Unify and restructure integer printing format specifiers
  • 3ac91b0: 8293003: Review running time of Warn5 regression test
  • ... and 2 more: https://git.openjdk.org/jdk/compare/0fb9469d93bffd662848b63792406717f7b4ec0d...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.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 2, 2022
@dean-long
Copy link
Member Author

Is it possible to create a jtreg test for this fix? Thanks.

It is probably possible, but when I tried I couldn't get it to reproduce. It depends on profiling information, so I had to use the replay file to reproduce it.

So can you share us the replay file to verify the fix?

You can find replay_pid37690.log in the attachment for the bug. I started with that and reduced it using JDK-8293287. I will attach that replay file to the bug as well.

@dean-long
Copy link
Member Author

Thanks Tobias.

@DamonFool
Copy link
Member

You can find replay_pid37690.log in the attachment for the bug. I started with that and reduced it using JDK-8293287. I will attach that replay file to the bug as well.

May I ask how can I reproduce this bug with replay_pid37690.log?

I tried this on Linux/x86_64

/root/df/jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/java \
   -cp /root/df/jdk/JTwork/classes/jdk/javadoc/lib/ \
   -XX:+ReplayCompiles -XX:ReplayDataFile=/root/df/jdk/replay_pid37690.log

But it fails with the following error

Resolving klass java/lang/invoke/BoundMethodHandle$Species_L at 12
Resolving klass [Ljava/util/stream/Collector$Characteristics; at 18
Resolving klass java/util/AbstractSet at 2
Resolving klass java/util/EnumSet at 8
Resolving klass java/util/RegularEnumSet at 42
Resolving klass java/util/JumboEnumSet at 47
Resolving klass java/util/Collection at 62
Resolving klass java/util/Iterator at 77
Resolving klass java/lang/Enum at 82
Resolving klass java/lang/Object at 117
Resolving klass java/lang/Class at 131
Resolving klass jdk/internal/access/SharedSecrets at 138
Resolving klass jdk/internal/access/JavaLangAccess at 144
Resolving klass java/util/EnumSet at 2
Resolving klass java/util/RegularEnumSet at 8
Resolving klass java/lang/Enum at 16
Resolving klass java/util/RegularEnumSet$EnumSetIterator at 25
Resolving klass java/lang/Long at 31
Resolving klass java/lang/Object at 37
Resolving klass java/lang/Class at 47
Resolving klass java/lang/Object at 2
Resolving klass java/util/Collections$UnmodifiableCollection at 11
Resolving klass java/util/Collection at 17
Resolving klass java/util/Collections$UnmodifiableCollection$1 at 44
Resolving klass java/lang/String at 3
Resolving klass java/lang/Character at 72
Resolving klass java/util/Arrays at 241
Resolving klass java/lang/invoke/LambdaForm$BasicType at 21
Resolving klass java/lang/invoke/BoundMethodHandle$SpeciesData at 27
Resolving klass java/lang/invoke/MethodHandle at 37
Resolving klass java/net/URI at 14
Resolving klass java/lang/String at 30
Resolving klass java/nio/file/spi/FileSystemProvider at 40
Resolving klass java/nio/file/Path at 85
Resolving klass java/io/File at 110
Resolving klass java/nio/file/Path$1 at 125
Error while parsing line 321 at position 138: no invoke found at bci

Failed on no invoke found at bci

Am I missing something?
Thanks.

@DamonFool
Copy link
Member

I can reproduce it with -XX:+ReplayIgnoreInitErrors.
Did you also use that flag?

Copy link
Member

@DamonFool DamonFool left a comment

Choose a reason for hiding this comment

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

LGTM

@TobiHartmann
Copy link
Member

I can reproduce it with -XX:+ReplayIgnoreInitErrors.

I would recommend to always use that flag when trying replay compilation. There's almost always an issue with some (often unrelated) class dependencies not being resolvable.

@DamonFool
Copy link
Member

I would recommend to always use that flag when trying replay compilation. There's almost always an issue with some (often unrelated) class dependencies not being resolvable.

Okay, got it.
Thanks @TobiHartmann .

@mlbridge
Copy link

mlbridge bot commented Sep 2, 2022

Mailing list message from dean.long at oracle.com on hotspot-compiler-dev:

On 9/1/22 6:46 PM, Jie Fu wrote:

On Fri, 2 Sep 2022 01:27:57 GMT, Dean Long <dlong at openjdk.org> wrote:

The problem is caused by missing bailout logic in inline_string_char_access(). This PR adds the needed logic to match other intrinsics.

I tried to come up with a stand-alone test case, but was not successful.

Is it possible to create a jtreg test for this fix?

It is probably possible, but when I tried I couldn't get it to
reproduce. It depends on profiling information, so I had to use the
replay file to reproduce it.

dl

@dean-long
Copy link
Member Author

Thanks Vladimir. Thanks @DamonFool.

@dean-long
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 2, 2022

Going to push as commit 5757e21.
Since your change was applied there have been 17 commits pushed to the master branch:

  • 3993a1f: 8292067: Convert test/sun/management/jmxremote/bootstrap shell tests to java version
  • 83a3408: 8293315: Add back logging for Placeholders
  • b6477fd: 8293288: bootcycle build failure after JDK-8173605
  • 0c6094e: 8293188: x86_64: Introduce stubGenerator_x86_64.hpp
  • 2baeebb: 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe"
  • da99e3e: 8289400: Improve com/sun/jdi/TestScaffold error reporting
  • 77e21c5: 8290529: C2: assert(BoolTest(btest).is_canonical()) failure
  • fcc0cf9: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable
  • 6fc58b8: 8293207: Add assert to JVM_ReferenceRefersTo to clarify its API
  • ce06a3b: 8293023: Change CardTable::is_in_young signature
  • ... and 7 more: https://git.openjdk.org/jdk/compare/0fb9469d93bffd662848b63792406717f7b4ec0d...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 2, 2022

@dean-long Pushed as commit 5757e21.

💡 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-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
4 participants