JDK-4305128 : VM deadlocks during shutdown
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_7
  • CPU: generic
  • Submitted: 2000-01-17
  • Updated: 2012-10-08
  • Resolved: 2000-03-03
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.3.0 solarisFixed
Related Reports
Duplicate :  
Relates :  
Description
The deadlock appears to be related to suspending the Compiler Thread
prior to VM shutdown at exit. See Comments section for further details.

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

WORK AROUND A temporary fix has been put in; a better one will be put in later (at lower priority).
11-06-2004

SUGGESTED FIX daniel.daugherty@Eng 2001-03-06 The temporary fix for this bug is being replaced by a more general solution using the following bug: 4333847 3/5 test mncntenter001 causes hotspot intermittently hangs
06-03-2001

EVALUATION Should be fixed along the lines of the suggestions in the Comments section. y.s.ramakrishna@eng 2000-02-24 Date: Thu, 24 Feb 2000 16:26:17 -0800 (PST) From: "Y. S. Ramakrishna" <###@###.###> To: ###@###.### Subject: Code Manager notification Mime-Version: 1.0 Event: putback-to Parent workspace: /net/jano/export/disk05/hotspot/ws/main/baseline (jano:/export/disk05/hotspot/ws/main/baseline) Child workspace: /net/jde1/export/jtech1/ysr/HSPOT (jde1:/export/jtech1/ysr/HSPOT) User: ysr Comment: 4305128 VM deadlocks during shutdown The problem is that when the VM is being shutdown, the main thread suspends all the daemon threads before initiating the shutdown, so that daemon threads do not access unmapped memory. (as far as i can tell from an old putback from Chris Cole, which introduced this suspension, one would otherwise get SEGV's as one tried to access unmapped memory). This was causing deadlocks on Solaris (with compiler2) as a compiler thread would be suspended in the midst of malloc/free and the main thread would then need to free a c heap object. Another instance involved the ThreadCritical lock a low level lock used in Solaris. A good solution to the problem is to have the compiler threads suspend themselves safely (voluntarily), rather than via thr_suspend. A less good, but at this point easier, solution is to fence off the shared resources prior to suspending the compiler threads. The bad thing about this latter solution is that it exposes __malloc_lock (a libc internal symbol) to the JVM. I have implemented the latter as a temporary measure only on Solaris, so that testing of big apps (in particular of Volano*) can proceed. The implementation has been quite extensively tested on JCK and on VolanoMark/Test (loop creating clients, which shutdown, for over 24 hours -- ca 20000 times). Reviews: jane, jcoomes History Lesson: jrose Tests: run.vmark stab, JCK (sparc only) Full JDK build (all tests done prior to most recent merge) Performance: no change in Volano scores Files: update: src/os/solaris/vm/os_solaris.cpp y.s.ramakrishna@eng 2000-03-03: A cleaner fix will be made in Merlin. For now, closing this as fixed.
03-03-2000