JDK-8150425 : Deadlock potential when sampling suspended threads
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2016-02-23
  • Updated: 2025-05-30
  • Resolved: 2025-05-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 masterResolved
Related Reports
Duplicate :  
Description
As JDK-8144013 showed there is a risk of deadlock if a suspended thread holds a resource needed by the sampling code. This risk has always been known with the use of signal-based suspension in JFR but I am concerned that as time has passed the once well-contained and constrained sampling code now has a transitive closure that might include deadlock-prone executions. JDK-8144013 showed it with the dladdr lock, but as discussed in related email it might as easily be a malloc lock if the NMT code reachable from the sampling code has to perform a malloc. NMT, JFR events and even Unified Logging, all potentially increase the code closure reachable from the core sampling code and thus increase the chances of suspension induced deadlock.

If we can't avoid such usage we should at least have a clear understanding of where problems may arise, by generating some form of code reachability analysis.
Comments
OK thanks, I didnt know which bug was happening in my app.
24-04-2018

Eric, can you please move out the specifics that were put into this bug to JDK-8201805 (already fixed). This bug tracks the generic problems with sampling as it is currently implemented.
24-04-2018

ILW HLM = P3 I: High, Deadlock L: Low, Very intermittent, only seen with NMT so far W: Medium, Don't run JFR
10-02-2017

ILW = H (potential deadlock) M (intermittent) H = P1
26-02-2016