JDK-8032901 : WaitForMultipleObjects() return value not handled appropriately
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2014-01-28
  • Updated: 2014-10-15
  • Resolved: 2014-06-04
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 7 JDK 8 JDK 9
7u76Fixed 8u20Fixed 9 b17Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
There are two valid return values from WaitForMultipleObjects() which 
indicate that a mutex object was successfully obtained, WAIT_OBJECT_0 and 
WAIT_ABANDONED.  WAIT_ABANDONED is not being handled appropriately in 
j2se/src/windows/transport/shmem/shmem_md.c, i.e., the thread may never 
release the mutex, which can result in other threads remaining blocked.


Comments
I seem to be seeing a build failure on JDK 7u for this fix. JDK-8046269 logged.
06-06-2014

Most likely a race during shutdown, so it's not likely that it will show up in every run.
05-06-2014

This fix caused a test failure: http://aurora-ds3.us.oracle.com:9502/runs%2F501687.CORELIBS-JDK-NIGHTLY-JTREG-3-20140605111811397/results/workDir/com/sun/jdi/RedefineCrossEvent.jtr FATAL ERROR in native method: Shared Memory Transport "shmem_md.c" (Jun 4 2014), line 212: Observed abandoned IP mutex. Aborting. at com.sun.tools.jdi.SharedMemoryConnection.close0(Native Method) at com.sun.tools.jdi.SharedMemoryConnection.close(SharedMemoryConnection.java:70) - locked <0x041036d8> (a java.lang.Object) at com.sun.tools.jdi.TargetVM.run(TargetVM.java:130) at java.lang.Thread.run(Thread.java:745) I wonder what the root cause is. Are there cases in our testing where muteness are abandoned for some reason?
05-06-2014

After discussions with dev team, it was decided to process the WAIT_ABANDODED retval by releasing mutex. Reopening this bug for adding this functionality.
31-03-2014

After analysis of WaitForMultipleObjects() calls the problem was narrowed down to the following question (see bugDB for more information): Will the JDWP resource be correctly deallocated in case of failure of JDWP service provider interface functions. All this functions will fail with locked mutex in case of WAIT_ABANDONED error.
28-01-2014