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

Introduce diagnostic flag to abort VM on too long VM operations

    Details

    • Subcomponent:
    • Resolved In Build:
      b24

      Backports

        Description

        We now have SafepointTimeout machinery, that covers the "synchronization" part of the safepoint, i.e. the phase where threads are coming to a safepoint. But some use cases would enjoy the JVM mode where it exits if the _entire_ synchronized-at-safepoint, including the execution of associated VM operations, was handled by timeout machinery.

        Since VMThread is blocked executing the actual VM operation, it makes sense to use the existing periodic tasks / WatcherThread machinery to sample for safepoint, and act accordingly. It seems that if we are timeout-ing in the middle of VM operation, no recovery action is possible, and the only option is to crash JVM hard, hoping the deployment handles this properly.

        Example patch:
          http://cr.openjdk.java.net/~shade/8181143/webrev.01/

        Example output:
          http://cr.openjdk.java.net/~shade/8181143/LongAlloc.java
          http://cr.openjdk.java.net/~shade/8181143/g1.txt

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  shade Aleksey Shipilev
                  Reporter:
                  shade Aleksey Shipilev
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: