Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8280126

C2: detect and remove dead irreducible loops

XMLWordPrintable

    • b09

      ADDITIONAL SYSTEM INFORMATION :
      OS version:
      Distributor ID: Ubuntu
      Description: Ubuntu 20.04.3 LTS
      Release: 20.04
      Codename: focal

      We used the following version:

      java version "11.0.12" 2021-07-20 LTS
      Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS-237)
      Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.12+8-LTS-237, mixed mode)

      java version "17.0.1" 2021-10-19 LTS
      Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
      Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

      openjdk version "11-internal" 2018-09-25
      OpenJDK Runtime Environment (fastdebug build 11-internal+0-adhoc.minghai.jdk11)
      OpenJDK 64-Bit Server VM (fastdebug build 11-internal+0-adhoc.minghai.jdk11, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      The attached fuzzer test trapped in dead loop with "-Xcomp"(run in compiled mode), but it passed with "-Xint"(run in interpreted mode) or without JVM parameters(run in mixed mode)

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      When we run the test in jdk17.0.1 and jdk11.0.12, both in compiled mode(with "-Xcomp"), it trapped in dead loop. But when run the test in jdk17.0.1 and jdk11.0.12, both in mixed mode or interpreted mode(with "-Xint), it passed successfully.

      Besides, when run in jdk11-internal, mixed mode or interpreted mode, it passed successfully.
      But when run in jdk11-internal, compiled mode, it crashes with the following messages:
      933 ConI === 0 [[ 4764 1447 409 1486 3173 4798 4803 4805 4756 304 6451 4769 4795 4796 410 4797 4793 6188 4763 412 5535 305 6053 5642 6055 6469 4770 5005 5006 4403 413 7005 6008 4403 5777 412 4403 411 411 6188 380 6007 5780 5009 5052 5640 303 6046 1405 5589 412 461 303 305 3729 5531 7151 4732 411 6188 305 410 1450 6140 413 3027 4403 4699 6188 411 413 6769 3119 6726 5385 496 5772 5036 339 5638 6019 304 6147 5384 303 6427 1322 304 1836 411 362 410 1399 305 4403 411 412 5390 411 5533 6188 6142 6532 6470 6064 411 6472 6645 411 6188 336 6188 6188 6035 6188 6188 4743 3730 6723 6019 4403 334 6452 4747 5536 3054 5538 5522 412 341 5530 305 5383 413 5470 304 6188 5512 303 6019 5523 304 4403 305 335 412 303 4403 6188 4403 304 303 304 4403 303 6720 6625 6724 381 412 305 304 412 412 304 412 412 303 413 305 305 6639 5525 5637 305 413 303 304 303 305 303 304 4403 6026 337 338 7022 342 340 3076 7033 ]] #int:1 !jvms: JSON::parseObject @ bci:477
       3054 AddI === _ 3054 933 [[ 6428 6026 7008 339 1415 342 335 335 336 336 6019 3054 334 334 340 3091 7033 341 5501 338 337 7022 ]] !orig=[7007],... !jvms: JSON::parseObject @ bci:821
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=/phaseX.cpp:885
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/minghai/jdk11/src/hotspot/share/opto/phaseX.cpp:885), pid=22769, tid=22780
      # assert(no_dead_loop) failed: dead loop detected
      #
      # JRE version: OpenJDK Runtime Environment (11.0) (fastdebug build 11-internal+0-adhoc.minghai.jdk11)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 11-internal+0-adhoc.minghai.jdk11, compiled mode, tiered, compressed oops, g1 gc, linux-amd64)
      # Core dump will be written. Default location: core.22769 (may not exist)
      #
      # An error report file with more information is saved as:
      # /mnt/c/Users/Minghai/hs_err_pid22769.log
      #
      # Compiler replay data is saved as:
      # /mnt/c/Users/Minghai/replay_pid22769.log
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      #
      Current thread is 22780
      Dumping core ...
      zsh: abort (core dumped) -Xcomp -cp org.junit.runner.JUnitCore

      the log files, hs_err_pid22769.log and replay_pid22769.log are also attached.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. extract the bug.zip
      2. in dictionary "bug", run command:
      java -cp ./bugFiles:./util:./junit.jar:./hamcrest.jar:./target/classes:./target/test-classes org.junit.runner.JUnitCore com.alibaba.fastjson.deserializer.issue1463.TestIssue1463

      you may add "-Xcomp" or "-Xint" to get different results.


      ---------- BEGIN SOURCE ----------
      to be attached in bug.zip
      ---------- END SOURCE ----------

        1. A.jasm
          1 kB
        2. D.jasm
          2 kB
        3. E.jasm
          1 kB
        4. E.jasm.crash.graph.png
          E.jasm.crash.graph.png
          82 kB
        5. F.jasm
          2 kB
        6. F.jasm.crash.graph.png
          F.jasm.crash.graph.png
          82 kB
        7. D.jasm.crash.graph.png
          D.jasm.crash.graph.png
          94 kB
        8. G.jasm
          2 kB
        9. G.jasm.crash.graph.png
          G.jasm.crash.graph.png
          45 kB
        10. H.jasm
          2 kB
        11. K.jasm.bailout.graph.png
          K.jasm.bailout.graph.png
          76 kB
        12. K.jasm
          2 kB
        13. N.jasm
          2 kB
        14. N.jasm.graph.crash.png
          N.jasm.graph.crash.png
          55 kB
        15. N.jasm.graph.png
          N.jasm.graph.png
          88 kB
        16. A2.jasm
          0.9 kB
        17. A2.jasm.graph.crash.png
          A2.jasm.graph.crash.png
          48 kB
        18. A2.jasm.graph.png
          A2.jasm.graph.png
          68 kB
        19. D2.jasm
          2 kB
        20. D2.jasm.graph.crash.png
          D2.jasm.graph.crash.png
          75 kB
        21. D2.jasm.graph.png
          D2.jasm.graph.png
          142 kB
        22. D2.jasm.images.zip
          1.02 MB
        23. P.jasm
          0.7 kB
        24. P.jasm.2.at_crash.png
          P.jasm.2.at_crash.png
          81 kB
        25. P.jasm.0.after_parsing.png
          P.jasm.0.after_parsing.png
          108 kB
        26. P.jasm.1.before_codegen.png
          P.jasm.1.before_codegen.png
          58 kB
        27. Q1.jasm
          0.9 kB
        28. Q1.jasm.0.before.png
          Q1.jasm.0.before.png
          108 kB
        29. Q1.jasm.1.crash.png
          Q1.jasm.1.crash.png
          116 kB
        30. R.jasm
          0.9 kB
        31. R.jasm.5.crash.png
          R.jasm.5.crash.png
          110 kB
        32. R.jasm.graph.zip
          569 kB
        33. Q3.jasm
          1 kB
        34. Q3.jasm.graph.png
          Q3.jasm.graph.png
          32 kB
        35. test_007.0.png
          test_007.0.png
          75 kB
        36. test_007.1.png
          test_007.1.png
          45 kB
        37. test_007.2.png
          test_007.2.png
          34 kB
        38. test_009.1.png
          test_009.1.png
          64 kB
        39. test_009.0.png
          test_009.0.png
          95 kB
        40. test_009.2.png
          test_009.2.png
          51 kB
        41. T.java
          2 kB
        42. T.java.images.zip
          767 kB
        43. T2.java
          2 kB
        44. T3.java
          4 kB
        45. TestIrreducibleLoops.jasm
          21 kB
        46. test_011.png
          test_011.png
          1.65 MB

            epeter Emanuel Peter
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: