Uploaded image for project: 'Xray for Jira'
  1. Xray for Jira
  2. XRAY-11707

Xray background thread pool is not shut down during Jira shutdown

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Xray DC 8.4.3
    • None
    • JIRA Compatibility
    • None
    • Data Center

    Description

      When Jira shuts down with Xray enabled, the XrayThreadPoolExecutorImpl leaves background threads (XrayCalculator-N) running. These threads are non-daemon and are not explicitly terminated, causing them to remain blocked on LinkedBlockingQueue.take() and preventing the JVM from exiting gracefully.

      As a result, Tomcat may exceed its shutdown timeout and require the process to be terminated manually.

      How to reproduce

      1. Shutdown a Jira node using service jira stop
      2. Observe the logs

      Actual result/Attachments
      Nodes fail to shut down gracefully when Xray is enabled

      Expected result
      When the Xray plugin is disabled or Jira shuts down:

      The calculator queue should stop accepting new tasks.
      Scheduled services should be removed.
      The thread pool should shut down gracefully.
      Any remaining threads should be forcibly terminated if they do not exit within a reasonable timeout.
      Jira/Tomcat should shut down cleanly without requiring a forced process kill.

      Workaround
      Terminate the process manually.

      Attachments

        Issue Links

          Activity

            People

              joana.fonseca Joana Fonseca
              goncalo.nunes Gonçalo Nunes
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: