Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
Xray DC 8.4.3
-
None
-
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
- Shutdown a Jira node using service jira stop
- 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.