JDK-7105890 : [macosx] closed/javax/swing/JScrollBar/4708809/bug4708809.java deadlocks on MacOS
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86
  • Submitted: 2011-10-28
  • Updated: 2014-10-15
  • Resolved: 2011-12-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 7 JDK 8
7u4Fixed 8 b19Fixed
Description
closed/javax/swing/JScrollBar/4708809/bug4708809.java deadlocks on MacOS

Stacktrace:
2011-10-28 11:18:51
Full thread dump OpenJDK 64-Bit Server VM (21.0-b17 mixed mode):

"Attach Listener" daemon prio=5 tid=4333352960 nid=0x10d701000 waiting on condition [0]
   java.lang.Thread.State: RUNNABLE

"AWT-EventQueue-0" prio=5 tid=4331216896 nid=0x10aa6b000 waiting on condition [4473659392]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <34316084184> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
	at java.awt.EventQueue.getNextEvent(EventQueue.java:515)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:209)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:142)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:134)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

"TimerQueue" daemon prio=5 tid=4304027648 nid=0x10a7a2000 waiting on condition [4470738944]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <34316277456> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
	at java.util.concurrent.DelayQueue.take(DelayQueue.java:209)
	at javax.swing.TimerQueue.run(TimerQueue.java:171)
	at java.lang.Thread.run(Thread.java:722)

"Java2D Disposer" daemon prio=5 tid=4331104256 nid=0x10a5c5000 in Object.wait() [4468785152]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <34316153608> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
	- locked <34316153608> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
	at sun.java2d.Disposer.run(Disposer.java:145)
	at java.lang.Thread.run(Thread.java:722)

"Java2D Queue Flusher" daemon prio=5 tid=4304254976 nid=0x108d22000 in Object.wait() [4442951680]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <34316149648> (a sun.java2d.opengl.OGLRenderQueue$QueueFlusher)
	at sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(OGLRenderQueue.java:194)
	- locked <34316149648> (a sun.java2d.opengl.OGLRenderQueue$QueueFlusher)

"AWT-Shutdown" prio=5 tid=4329738240 nid=0x106b25000 in Object.wait() [4407312384]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <34316448704> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:503)
	at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:287)
	- locked <34316448704> (a java.lang.Object)
	at java.lang.Thread.run(Thread.java:722)

"AWT-AppKit" daemon prio=5 tid=4329734144 nid=0x7fff74e6b960 runnable [0]
   java.lang.Thread.State: RUNNABLE

"AppletThread" prio=5 tid=4303702016 nid=0x106801000 in Object.wait() [4404019200]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <34316272824> (a bug4708809)
	at java.lang.Object.wait(Object.java:503)
	at bug4708809.start(bug4708809.java:91)
	- locked <34316272824> (a bug4708809)
	at com.sun.javatest.regtest.AppletWrapper$AppletRunnable.run(AppletWrapper.java:152)
	at java.lang.Thread.run(Thread.java:722)

"Service Thread" daemon prio=5 tid=4328966144 nid=0x10648d000 runnable [0]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" daemon prio=5 tid=4328962048 nid=0x10638a000 waiting on condition [0]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" daemon prio=5 tid=4328923136 nid=0x106287000 waiting on condition [0]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=5 tid=4328812544 nid=0x106184000 runnable [0]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=5 tid=4328806400 nid=0x105c07000 in Object.wait() [4391460864]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <34315064760> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
	- locked <34315064760> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)

"Reference Handler" daemon prio=5 tid=4303642624 nid=0x105b04000 in Object.wait() [4390400000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <34315063608> (a java.lang.ref.Reference$Lock)
	at java.lang.Object.wait(Object.java:503)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
	- locked <34315063608> (a java.lang.ref.Reference$Lock)

"main" prio=5 tid=4328521728 nid=0x100501000 in Object.wait() [4300210176]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <34315877504> (a java.lang.Thread)
	at java.lang.Thread.join(Thread.java:1261)
	- locked <34315877504> (a java.lang.Thread)
	at java.lang.Thread.join(Thread.java:1335)
	at com.sun.javatest.regtest.AppletWrapper.main(AppletWrapper.java:105)

"VM Thread" prio=5 tid=4303632384 nid=0x105a01000 runnable 

"GC task thread#0 (ParallelGC)" prio=5 tid=4328568832 nid=0x1007c5000 runnable 

"GC task thread#1 (ParallelGC)" prio=5 tid=4328570880 nid=0x101b1f000 runnable 

"VM Periodic Task Thread" prio=5 tid=4328529920 nid=0x106590000 waiting on condition 

JNI global references: 365

Comments
EVALUATION Now the test fails on Windows because it expects to use longer delays between mouse moving and mouse release actions. This is covered in the issue 7120869 javax/swing/JScrollBar/4708809/bug4708809.java fails on Windows.
12-12-2011

EVALUATION The issue with the ScrollBar in Aqua L&F is fixed in the macosx repository http://hg.openjdk.java.net/macosx-port/macosx-port/jdk/rev/ca571a48818c
08-12-2011

EVALUATION 1) There is an issue in the ScrollBar behaviour in Aqua L&F. - Move mouse to the ScrollBar track - Press left mouse button (the thumb is moved under the mouse cursor) - Drag the mouse to the track The thumb is not dragged in this case because this action is treated as movinf the mouse cursor from one part of the track to another. The solution is unsetting the stillInTrack flag when the thumb has been moved under the cursor by the scroll timer. 2) The test hangs because it does not wake up in case an adjusment event is not received. The test need to be rewritten to fail in this case.
24-11-2011