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

JavaFX shutdown hook can hang preventing app from exiting

XMLWordPrintable

    • b11

      The QuantumToolkit registers a "Glass/Prism Shutdown Hook" that calls the QuantumToolkit.dispose method to gracefully shutdown the toolkit and renderer. If dispose hangs or deadlocks, this will prevent the application from exiting, requiring the process to be killed.

      This has been observed on macOS, due to JDK-8238505, which is is an intermittent deadlock that occurs during shutdown. We ought to eventually fix that intermittent deadlock, but even in the presence of a deadlock or hang, we don't want the shutdown hook to hang.

      This can happen at any time, but is especially a problem during an automated test run, which will then hang until the Jenkins job is either killed or its global timer (currently set to 12 hours) kills the job. Even in that case, processes can be left lying around which can affect subsequent runs.

      I discovered this while testing JDK-8328629, which adds a default Unit 5 timeout, and without fixing the deadlock, the timeout will be unable to abort the hanging test.

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: