jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8308660: C2 compilation hits 'node must be dead' assert

Open rwestrel opened this issue 11 months ago • 9 comments

In IfNode::fold_compares_helper(), adjusted_val is:

(SubI (AddI top constant) 0)

which is then transformed to the top node. The code, next, tries to destroy the adjusted_val node i.e. the top node. That results in the assert failure. Given We're trying to fold 2 ifs in a dying part of the graph, the fix is straightforward: test adjusted_val for top and bail out from the transformation if that's the case.


Progress

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

Issue

  • JDK-8308660: C2 compilation hits 'node must be dead' assert (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18305

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

Using diff file

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

Webrev

Link to Webrev Comment

rwestrel avatar Mar 14 '24 14:03 rwestrel

:wave: Welcome back roland! 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.

bridgekeeper[bot] avatar Mar 14 '24 14:03 bridgekeeper[bot]

@rwestrel 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:

8308660: C2 compilation hits 'node must be dead' assert

Reviewed-by: chagedorn, 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 165 new commits pushed to the master branch:

  • 85fc47c81af81a595dc88e61454d8ba2d860f301: 8327180: Failed: java/io/ObjectStreamClass/ObjectStreamClassCaching.java#G1
  • 569b05addf69698fc93026b4dca69bc6ca0920b6: 8327818: Implement Kerberos debug with sun.security.util.Debug
  • dec68d7e36a9436468594416272c44a2afbece8d: 8328234: Remove unused nativeUtils files
  • 7734466c4627c51b2c24b4b4dbf6db4184607aa3: 8325871: Move StringTable and SymbolTable rehashing calls
  • 9e98118f289e98ca9f3be2a274e0ddf8822aaa7c: 8328177: Move LDFLAGS_JDK[LIB/EXE] to JdkNativeCompilation.gmk
  • f3af91815a662b195938b26962a8670a4a692220: 8327945: Inline HasScavengableOops
  • fb390d202c8bbbbb87ba48fd01387feb35a1b768: 8327839: Crash with unboxing and widening primitive conversion in switch
  • 86f17447362483162a5983c270e0b530d8d99354: 8328248: Convert javax/swing/JSlider/6587742/bug6587742.java applet test to main
  • 7baec6622254fc21e315b974a213605a7605daac: 8328168: Epsilon: Premature OOM when allocating object larger than uncommitted heap size
  • c342188fd978dd94e7788fb0fb0345fd8c0eaa9a: 8328074: Add jcheck whitespace checking for assembly files
  • ... and 155 more: https://git.openjdk.org/jdk/compare/784f11c35d7f8646c7354c756ac8801a3d685874...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[bot] avatar Mar 14 '24 14:03 openjdk[bot]

@rwestrel 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[bot] avatar Mar 14 '24 14:03 openjdk[bot]

Webrevs

mlbridge[bot] avatar Mar 14 '24 14:03 mlbridge[bot]

Otherwise, looks good!

Thanks for reviewing this.

rwestrel avatar Mar 14 '24 15:03 rwestrel

Thanks for the reviews @chhagedorn @vnkozlov

rwestrel avatar Mar 15 '24 15:03 rwestrel

/integrate

rwestrel avatar Mar 15 '24 15:03 rwestrel

Going to push as commit 91baac9b9de91b16e602dcf1d9f41e20bec38ffc. Since your change was applied there have been 146 commits pushed to the master branch:

  • 71f9c4e7fd5818be6e79dead3caa02d738456ad6: 8320534: fatal error for the NMTBenchmark test run for the mainline build
  • bfba4894e14c9547735a6b4ae73ed423af09f0d4: 8328157: Move C[XX]FLAGS_JDK[LIB/EXE] to JdkNativeCompilation.gmk
  • 42aec8c5e72837400818d931855bade8acad8e9d: 8328146: Set LIBCXX automatically
  • 90ab52e598f74ed872fe404130d57f6596430727: 8328166: Epsilon: 'EpsilonHeap::allocate_work' misuses the parameter 'size' as size in bytes
  • bf990c8b32f1ce050450d94f4f8706e5a01aa3ec: 8328269: NonFocusablePopupMenuTest.java should be marked as headful
  • 80b98c86b82eb9ffd5aee67a92daa31c8b649cc6: 8320503: Print warning if VM reaches MallocLimit during error reporting
  • dde519dc2180742c119ac07221c2a149b9f06c18: 8328066: WhiteBoxResizeTest failure on linux-x86: Could not reserve enough space for 2097152KB object heap
  • 80ccc989a892e4d9f4e2c9395a100cfabbdcda64: 8328075: Shenandoah: Avoid forwarding when objects don't move in full-GC
  • 5249cc0a79f05b71f4c31bb6b02775976eef77aa: 8328087: Automate javax/swing/JTable/TAB/TAB.java applet test
  • c05f8c72239ed3f16ff0d13f4dba795731f9559f: 8316388: Opensource five Swing component related regression tests
  • ... and 136 more: https://git.openjdk.org/jdk/compare/784f11c35d7f8646c7354c756ac8801a3d685874...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Mar 15 '24 15:03 openjdk[bot]

@rwestrel An unexpected error occurred during integration. No push attempt will be made. The error has been logged and will be investigated. It is possible that this error is caused by a transient issue; feel free to retry the operation.

openjdk[bot] avatar Mar 15 '24 15:03 openjdk[bot]

/integrate

rwestrel avatar Mar 19 '24 07:03 rwestrel

Going to push as commit 053ff76e14046f796f6e10a9cb2ede1f1ae22ed6. Since your change was applied there have been 176 commits pushed to the master branch:

  • e1b0af29e47b46879defce1fc44c30d4d50d0c31: 8323972: C2 compilation fails with assert(!x->as_Loop()->is_loop_nest_inner_loop()) failed: loop was transformed
  • c0fc9563a707cb01db4baf3aebede5f6b3ea08d1: 8328275: CodeCache::print_internals should not be called in PRODUCT code
  • 4ef591f71f62ee6ea8a603ed7a3e568b348b2c16: 8326964: Remove Eclipse Shared Workspaces
  • ac5b6cb2d42bdb8fb1a110ad33411b50cff4ea61: 8327757: Convert javax/swing/JSlider/6524424/bug6524424.java applet to main
  • 652fb3aa48fdfe09e827c2a06f76b3a69c711b74: 8328154: Convert sun/java2d/loops/CopyAreaSpeed.java applet test to main
  • 9059727df135dc90311bd476124f090b5766092b: 8327182: Move serverAlias into the loop
  • 2dd5fba3bd37c577b8442b67a67dbcb22b9a530e: 8319889: Vector API tests trigger VM crashes with -XX:+StressIncrementalInlining
  • 3f2e849c54c2a9c55e3b5c9f5a6d3478b83144e3: 8280392: java/awt/Focus/NonFocusableWindowTest/NonfocusableOwnerTest.java failed with "RuntimeException: Test failed."
  • c901da48e30d53cb8e4e3c1f0584c5f2d3d095f1: 8327098: GTest needs larger combination limit
  • 9e32db266e4c3cc9be273fa6b77112832a43ba4a: 8328309: Remove malformed masked shift instruction selection patterns
  • ... and 166 more: https://git.openjdk.org/jdk/compare/784f11c35d7f8646c7354c756ac8801a3d685874...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Mar 19 '24 07:03 openjdk[bot]

@rwestrel Pushed as commit 053ff76e14046f796f6e10a9cb2ede1f1ae22ed6.

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

openjdk[bot] avatar Mar 19 '24 07:03 openjdk[bot]