JDK-8194914 : Compilation fails with "node not on backedge" in OuterStripMinedLoopNode::adjust_strip_mined_loop
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86_64
  • Submitted: 2018-01-11
  • Updated: 2018-04-05
  • Resolved: 2018-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 11
10 b40Fixed 11Fixed
Related Reports
Relates :  
Description
With JDK-8186027, attached test case asserts with debug build:

$ java -XX:-TieredCompilation ArrayAccess

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/loopnode.cpp:1335
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/njian/Work/jdk/master/gerrit/src/hotspot/share/opto/loopnode.cpp:1335), pid=20593, tid=20664
#  assert(n->in(0) == cle_tail) failed: node not on backedge?
#
# JRE version: OpenJDK Runtime Environment (10.0) (fastdebug build 10-internal+0-adhoc.njian.gerrit)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 10-internal+0-adhoc.njian.gerrit, mixed mode, compressed oops, g1 gc, linux-amd64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/njian/Work/jdk/test/benchmarks/microbench/hs_err_pid20593.log
#
# Compiler replay data is saved as:
# /home/njian/Work/jdk/test/benchmarks/microbench/replay_pid20593.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 20664
Dumping core ...
Aborted

Comments
Updated ILW = Assert is too strong (does not affect product), easy to reproduce, disable loop strip mining -XX:LoopStripMiningIter=0 = MHM = P3
12-01-2018

[~roland], this is another issue with LoopStripMining. Let me know if you don't have time to work on it, I can help.
11-01-2018

Here's the graph: 120 ConI === 0 [[ 597 179 ]] #int:2 593 ConvI2L === _ 29 [[ 597 ]] #long:0..maxint:www 25 LoadP === 5 7 21 [[ 49 60 44 ]] @rawptr:BotPTR, idx=Raw; #java/lang/Object * (does not depend only on test) Oop:java/lang/Object * !jvms: ArrayAccess::accessArrayVariables @ bci:2 48 IfTrue === 46 [[ 243 49 ]] #1 !jvms: ArrayAccess::accessArrayVariables @ bci:2 243 If === 48 242 [[ 244 245 ]] P=0,100000, C=-1,000000 !orig=[55] !jvms: ArrayAccess::accessArrayVariables @ bci:2 179 LShiftL === _ 178 120 [[ 181 ]] !orig=[157] !jvms: ArrayAccess::accessArrayVariables @ bci:16 387 LoadI === 264 388 226 [[ 386 ]] @int[int:>=0]:exact+any *, idx=6; #int !orig=206 !jvms: ArrayAccess::accessArrayVariables @ bci:22 389 AddI === _ 390 72 [[ 388 ]] !orig=161,[403] !jvms: ArrayAccess::accessArrayVariables @ bci:15 441 StoreI === 574 444 226 442 [[ 388 390 ]] @int[int:>=0]:exact+any *, idx=6; Memory: @int[int:>=0]:NotNull:exact+any *, idx=6; !orig=228 !jvms: ArrayAccess::accessArrayVariables @ bci:25 110 IfTrue === 303 [[ 574 228 182 ]] #1 !orig=[129],[144],[167] !jvms: ArrayAccess::accessArrayVariables @ bci:5 307 OuterStripMinedLoop === 307 375 306 [[ 307 574 ]] 241 ConI === 0 [[ 305 ]] #int:0 309 SafePoint === 304 1 270 1 1 391 58 29 300 [[ 305 ]] SafePoint !orig=283,230 !jvms: ArrayAccess::accessArrayVariables @ bci:29 188 CmpU === _ 185 140 [[ 189 ]] !orig=[247] !jvms: ArrayAccess::accessArrayVariables @ bci:22 256 RangeCheck === 244 142 [[ 257 258 ]] P=0,999999, C=-1,000000 597 LShiftL === _ 593 120 [[ 600 ]] 49 CastPP === 48 25 [[ 50 50 58 ]] #java/lang/Object:NotNull * Oop:java/lang/Object:NotNull * !jvms: ArrayAccess::accessArrayVariables @ bci:2 244 IfFalse === 243 [[ 58 256 ]] #0 !orig=[56] !jvms: ArrayAccess::accessArrayVariables @ bci:2 72 ConI === 0 [[ 389 382 207 161 380 272 275 353 311 314 319 386 342 345 348 442 445 448 451 477 480 483 486 489 492 495 498 524 527 530 533 536 539 542 545 548 551 554 557 560 563 566 569 604 ]] #int:1 160 LoadI === 257 385 180 [[ 161 ]] @int[int:>=0]:exact+any *, idx=6; #int !jvms: ArrayAccess::accessArrayVariables @ bci:13 19 ConL === 0 [[ 21 180 ]] #long:16 181 AddP === _ 58 58 179 [[ 180 ]] !orig=[159] !jvms: ArrayAccess::accessArrayVariables @ bci:16 386 AddI === _ 387 72 [[ 385 ]] !orig=207 !jvms: ArrayAccess::accessArrayVariables @ bci:24 388 StoreI === 574 441 180 389 [[ 385 387 ]] @int[int:>=0]:exact+any *, idx=6; Memory: @int[int:>=0]:NotNull:exact+any *, idx=6; !orig=182 !jvms: ArrayAccess::accessArrayVariables @ bci:16 574 CountedLoop === 574 307 110 [[ 529 532 535 538 541 544 547 550 553 556 559 562 565 568 574 523 577 578 485 488 491 494 497 385 476 479 447 450 303 441 444 388 482 526 ]] inner stride: 16 main of N574 strip mined !orig=[503],[456],[395],[308],[287],[269] !jvms: ArrayAccess::accessArrayVariables @ bci:29 305 OuterStripMinedLoopEnd === 309 241 [[ 306 332 ]] P=1,000000, C=11264,000000 189 Bool === _ 188 [[ 263 ]] [lt] !orig=[248] !jvms: ArrayAccess::accessArrayVariables @ bci:22 257 IfTrue === 256 [[ 263 570 160 276 315 349 390 446 452 481 487 493 499 528 534 540 546 552 558 564 ]] #1 138 ConL === 0 [[ 139 226 ]] #long:12 600 AddP === _ 58 58 597 [[ 226 ]] 58 CheckCastPP === 244 49 [[ 431 181 115 431 139 181 226 600 600 180 309 139 ]] #int[int:>=0]:NotNull:exact * !orig=[432],[42] !jvms: ArrayAccess::accessArrayVariables @ bci:2 161 AddI === _ 160 72 [[ 182 364 602 ]] !orig=[403] !jvms: ArrayAccess::accessArrayVariables @ bci:15 180 AddP === _ 58 181 19 [[ 182 274 313 340 347 378 388 444 450 479 485 491 497 526 532 538 544 550 556 562 568 570 564 558 552 546 540 534 528 499 493 487 481 452 446 390 349 315 276 160 602 ]] !orig=[158] !jvms: ArrayAccess::accessArrayVariables @ bci:16 385 StoreI === 574 388 226 386 [[ 182 160 270 367 602 ]] @int[int:>=0]:exact+any *, idx=6; Memory: @int[int:>=0]:NotNull:exact+any *, idx=6; !orig=228 !jvms: ArrayAccess::accessArrayVariables @ bci:25 306 IfTrue === 305 [[ 307 601 602 ]] #1 263 RangeCheck === 257 189 [[ 264 265 ]] P=0,999999, C=-1,000000 226 AddP === _ 58 600 138 [[ 228 206 271 273 310 312 339 341 344 346 377 379 385 387 441 443 447 449 476 478 482 484 488 490 494 496 523 525 529 531 535 537 541 543 547 549 553 555 559 561 565 567 601 603 ]] !orig=[204] !jvms: ArrayAccess::accessArrayVariables @ bci:25 602 StoreI === 306 385 180 161 [[ 601 603 ]] @int[int:>=0]:exact+any *, idx=6; Memory: @int[int:>=0]:NotNull:exact+any *, idx=6; !orig=182 !jvms: ArrayAccess::accessArrayVariables @ bci:16 264 IfTrue === 263 [[ 281 561 206 567 273 312 341 346 379 387 443 449 478 484 490 496 525 531 537 543 549 555 603 ]] #1 !orig=[85],[98] !jvms: ArrayAccess::accessArrayVariables @ bci:2 603 LoadI === 264 602 226 [[]] @int[int:>=0]:exact+any *, idx=6; #int !orig=206 !jvms: ArrayAccess::accessArrayVariables @ bci:22 n = 603 LoadI cle_tail = 110 IfTrue Could be related to JDK-8193597.
11-01-2018

I can reproduce with latest sources and it seems to be a problem with LoopStripMining (JDK-8186027). ILW = Assert during compilation (regression that potentially affects product), easy to reproduce, disable loop strip mining -XX:LoopStripMiningIter=0 = HHM = P1
11-01-2018