JDK-8178403 : DirectAudio in JavaSound may hang and leak
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.sound
  • Affected Version: 8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-04-10
  • Updated: 2021-04-27
  • Resolved: 2017-07-06
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 10 JDK 8 Other
10 b23Fixed 8u301Fixed openjdk8u302Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
The fix for JDK-8168751 changed the timings in DirectAudioDevice, so the old test ClipCloseLoss.java now fails(2 or 3 time per 50 invocations). The reason is that DirectAudioDevice.run() method have incorrect wait logic, which may hang after attepmt to close it.
Run(100 times) the test below to reproduce the bug:
javax/sound/sampled/Clip/ClipCloseLoss.java
Comments
Fix Request (8u) I would like to backport this patch to openjdk 8u for parity with Oracle 8u301. 8u patch has been reviewed.
21-04-2021

OpenJDK8u code review thread: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-April/013688.html
21-04-2021

http://cr.openjdk.java.net/~serb/8178403/webrev.00/
05-07-2017

Also failed in mach5: http://java.se.oracle.com/mach5/job/9-dev/2365/artifact/testresults/linux-x64/jdk_test.tier3/JTwork/javax/sound/sampled/Clip/ClipCloseLoss.jtr/*view*/
16-05-2017