JDK-4683006 : 3rd party memory managers risk deadlock with JVMDI/JVMPI/JVM_Suspend
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.1,1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,linux
  • CPU: generic
  • Submitted: 2002-05-10
  • Updated: 2012-10-08
  • Resolved: 2002-11-13
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.
Other
1.4.2 mantisFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
With the fix for 4678415, in 1.4.1 b11 there is a risk of deadlock, causing 
the VM to hang if a 3rd party memory manager such as mtmalloc, ptmalloc, etc.
is run with JVMDI, JVMPI or an application that calls JVM_Suspend.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis
14-06-2004

PUBLIC COMMENTS .
10-06-2004

EVALUATION (At least) the following changes are necessary to turn off UseForcedSuspension flag: 1. wait_for_ext_suspend_completion() returns true for threads running native code. 2. Change state transition code (ThreadInVMfromNative, ThreadToNativeFromVM) and make sure they check for suspend request on the way back to VM. Currently the check is only done for transitions from VM to native (and this seems unnecessary). 3. Change interpreter, C1 and C2 to check for suspend request when a thread returns from native calls. This probably can be combined with safepoint and/or stack overflow checks. 4. On Solaris/Sparc, jvmpi::get_call_trace() needs to briefly suspend/resume target thread to flush its register windows. ###@###.### 2002-05-13 The first 3 items are implemented for Sparc and x86 and have been put back for 1.4.2 b05. The IA64 part will follow soon. Item 4 isn't really necessary, because java_suspend() will force a safepoint, and safepoint will prepare the stack to be walkable. However, we do need to check if the stack is walkable in wait_for_ext_suspend_completion() and do not return if the register windows are not flushed, just in case the functions are not called in the right order (that is, java_suspend() first, then wait_for_ext_suspend_completion()). I'll leave the bug open until IA64 support is added (only the interpreter support is missing). ###@###.### 2002-10-25 IA64 part is checked in today. Close as fixed ###@###.### 2002-11-01
25-10-2002