Modify

Opened 2 years ago

Closed 4 months ago

#13142 closed defect (duplicate)

Deadlock while merging 2 layers

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: autosave Cc: michael2402

Description

Merged 2 layers in JOSM and it just hung.
With jstack I can see:

2016-07-14 14:44:41
Full thread dump OpenJDK 64-Bit Server VM (25.91-b14 mixed mode):

"Attach Listener" #16059 daemon prio=9 os_prio=0 tid=0x00007f01d0011000 nid=0x4bc4 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"pool-3-thread-3" #2589 prio=5 os_prio=0 tid=0x00007f01a029b000 nid=0x65ec waiting on condition [0x00007f017d4e8000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055b0240a8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"pool-3-thread-2" #2588 prio=5 os_prio=0 tid=0x00007f01a0298800 nid=0x65eb waiting on condition [0x00007f017edf4000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055b0240a8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"pool-3-thread-1" #2587 prio=5 os_prio=0 tid=0x00007f01a029f000 nid=0x65ea waiting on condition [0x00007f017ecf3000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055b0240a8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-9" #77 prio=5 os_prio=0 tid=0x00007f01a0326000 nid=0x56b0 waiting on condition [0x00007f017df64000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-8" #76 prio=5 os_prio=0 tid=0x00007f01a0324000 nid=0x56af waiting on condition [0x00007f017e065000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-7" #75 prio=5 os_prio=0 tid=0x00007f01a0323000 nid=0x56ae waiting on condition [0x00007f017e166000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-6" #74 prio=5 os_prio=0 tid=0x00007f01a0322800 nid=0x56ad waiting on condition [0x00007f017e267000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-5" #73 prio=5 os_prio=0 tid=0x00007f01a0321800 nid=0x56ac waiting on condition [0x00007f017f0f7000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-4" #72 prio=5 os_prio=0 tid=0x00007f01a0337000 nid=0x56ab waiting on condition [0x00007f017eaf1000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-3" #71 prio=5 os_prio=0 tid=0x00007f01a0336000 nid=0x56aa waiting on condition [0x00007f017eff6000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-2" #70 prio=5 os_prio=0 tid=0x00007f01a030c000 nid=0x56a9 waiting on condition [0x00007f017e9f0000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-1" #69 prio=5 os_prio=0 tid=0x00007f01a030b000 nid=0x56a8 waiting on condition [0x00007f019f6f2000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"TMS-downloader-0" #68 prio=5 os_prio=0 tid=0x00007f01a0550000 nid=0x56a7 waiting on condition [0x00007f017e8ef000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055ace5838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:93)
	at org.openstreetmap.josm.data.cache.HostLimitQueue.take(HostLimitQueue.java:32)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"Map Status Collector" #54 daemon prio=6 os_prio=0 tid=0x00007f01a038c800 nid=0x5697 waiting on condition [0x00007f017f3f8000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055a5f5158> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
	at org.openstreetmap.josm.gui.MapStatus$Collector.run(MapStatus.java:383)
	at java.lang.Thread.run(Thread.java:745)

"Timer-2" #53 daemon prio=6 os_prio=0 tid=0x00007f01a037c800 nid=0x5696 in Object.wait() [0x00007f017f4f9000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000055a5f51a0> (a java.util.TaskQueue)
	at java.lang.Object.wait(Object.java:502)
	at java.util.TimerThread.mainLoop(Timer.java:526)
	- locked <0x000000055a5f51a0> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:505)

"Timer-1" #49 prio=6 os_prio=0 tid=0x00007f01a018a800 nid=0x5693 in Object.wait() [0x00007f017fbfc000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000055a5f51b8> (a java.util.TaskQueue)
	at java.lang.Object.wait(Object.java:502)
	at java.util.TimerThread.mainLoop(Timer.java:526)
	- locked <0x000000055a5f51b8> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:505)

"main-worker-0" #47 daemon prio=5 os_prio=0 tid=0x00007f01a8004000 nid=0x5691 in Object.wait() [0x00007f019c2ef000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1315)
	- locked <0x0000000544cfd988> (a java.awt.EventQueue$1AWTInvocationLock)
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
	at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1348)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWait(GuiHelper.java:127)
	at org.openstreetmap.josm.actions.MergeLayerAction$1.run(MergeLayerAction.java:56)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"DestroyJavaVM" #45 prio=5 os_prio=0 tid=0x00007f021c00a000 nid=0x5650 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"message-notifier-0" #44 prio=5 os_prio=0 tid=0x00007f021ce8d000 nid=0x5689 waiting on condition [0x00007f017fafb000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055a5f5218> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"RemoteControl HTTPS Server" #40 daemon prio=5 os_prio=0 tid=0x00007f021d0d7800 nid=0x5684 runnable [0x00007f017fefd000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
	at java.net.ServerSocket.implAccept(ServerSocket.java:545)
	at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:348)
	at org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer.run(RemoteControlHttpsServer.java:418)

"RemoteControl HTTPS Server" #37 daemon prio=5 os_prio=0 tid=0x00007f021d0d4000 nid=0x5683 runnable [0x00007f017fffe000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
	at java.net.ServerSocket.implAccept(ServerSocket.java:545)
	at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:348)
	at org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer.run(RemoteControlHttpsServer.java:418)

"Timer-0" #39 daemon prio=6 os_prio=0 tid=0x00007f01a013e800 nid=0x5682 waiting for monitor entry [0x00007f019c1ee000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.getEditLayer(MainLayerManager.java:341)
	- waiting to lock <0x0000000555b23358> (a org.openstreetmap.josm.gui.layer.MainLayerManager)
	at org.openstreetmap.josm.gui.MainFrame.onLayerChange(MainFrame.java:175)
	at org.openstreetmap.josm.gui.MainFrame.access$000(MainFrame.java:41)
	at org.openstreetmap.josm.gui.MainFrame$2.propertyChange(MainFrame.java:55)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:303)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.setRequiresSaveToFile(OsmDataLayer.java:183)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.onPostSaveToFile(OsmDataLayer.java:899)
	at org.openstreetmap.josm.io.OsmExporter.save(OsmExporter.java:99)
	at org.openstreetmap.josm.io.OsmExporter.exportData(OsmExporter.java:68)
	at org.openstreetmap.josm.data.AutosaveTask.savelayer(AutosaveTask.java:214)
	at org.openstreetmap.josm.data.AutosaveTask.run(AutosaveTask.java:230)
	- locked <0x000000055a2e28e8> (a java.lang.Object)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)

"RemoteControl HTTP Server" #36 daemon prio=5 os_prio=0 tid=0x00007f021d0b6000 nid=0x5680 runnable [0x00007f019c3f0000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
	at java.net.ServerSocket.implAccept(ServerSocket.java:545)
	at java.net.ServerSocket.accept(ServerSocket.java:513)
	at org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpServer.run(RemoteControlHttpServer.java:101)

"RemoteControl HTTP Server" #35 daemon prio=5 os_prio=0 tid=0x00007f021d0b5000 nid=0x567f runnable [0x00007f01bc182000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
	at java.net.ServerSocket.implAccept(ServerSocket.java:545)
	at java.net.ServerSocket.accept(ServerSocket.java:513)
	at org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpServer.run(RemoteControlHttpServer.java:101)

"WeakCollectionCleaner" #31 daemon prio=8 os_prio=0 tid=0x00007f021cf60000 nid=0x567b in Object.wait() [0x00007f019f4f0000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
	- locked <0x00000005564b0f48> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
	at org.geotools.util.WeakCollectionCleaner.run(WeakCollectionCleaner.java:77)

"GT authority factory disposer" #29 daemon prio=5 os_prio=0 tid=0x00007f021cb5a000 nid=0x567a in Object.wait() [0x00007f019f5f1000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at java.util.TimerThread.mainLoop(Timer.java:526)
	- locked <0x00000005581f53f0> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:505)

"image-fetcher-0" #28 prio=5 os_prio=0 tid=0x00007f0198036800 nid=0x5679 waiting on condition [0x00007f019efef000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000055598ea50> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"File Watcher" #11 prio=5 os_prio=0 tid=0x00007f021c6ba000 nid=0x566e waiting on condition [0x00007f019fdfe000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000005555974e0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
	at java.util.concurrent.LinkedBlockingDeque.take(LinkedBlockingDeque.java:680)
	at sun.nio.fs.AbstractWatchService.take(AbstractWatchService.java:118)
	at org.openstreetmap.josm.io.FileWatcher.processEvents(FileWatcher.java:119)
	at org.openstreetmap.josm.io.FileWatcher.access$000(FileWatcher.java:30)
	at org.openstreetmap.josm.io.FileWatcher$1.run(FileWatcher.java:47)
	at java.lang.Thread.run(Thread.java:745)

"TimerQueue" #21 daemon prio=5 os_prio=0 tid=0x00007f01a00ae000 nid=0x566b waiting on condition [0x00007f01bc283000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x0000000555f88ed0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.DelayQueue.take(DelayQueue.java:211)
	at javax.swing.TimerQueue.run(TimerQueue.java:171)
	at java.lang.Thread.run(Thread.java:745)

"AWT-EventQueue-0" #18 prio=6 os_prio=0 tid=0x00007f021c666800 nid=0x566a waiting for monitor entry [0x00007f01bc783000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.openstreetmap.josm.data.AutosaveTask.layerRemoving(AutosaveTask.java:278)
	- waiting to lock <0x000000055a2e28e8> (a java.lang.Object)
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerRemoving(LayerManager.java:411)
	at org.openstreetmap.josm.gui.layer.LayerManager.realRemoveSingleLayer(LayerManager.java:235)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realRemoveSingleLayer(MainLayerManager.java:286)
	at org.openstreetmap.josm.gui.layer.LayerManager.realRemoveLayer(LayerManager.java:229)
	- locked <0x0000000555b23358> (a org.openstreetmap.josm.gui.layer.MainLayerManager)
	at org.openstreetmap.josm.gui.layer.LayerManager$2.run(LayerManager.java:213)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:146)
	at org.openstreetmap.josm.gui.layer.LayerManager.removeLayer(LayerManager.java:210)
	at org.openstreetmap.josm.actions.MergeLayerAction$1$1.run(MergeLayerAction.java:59)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

"AWT-Shutdown" #19 prio=5 os_prio=0 tid=0x00007f021c5a8800 nid=0x5669 in Object.wait() [0x00007f01bd2d1000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:295)
	- locked <0x0000000555f88f18> (a java.lang.Object)
	at java.lang.Thread.run(Thread.java:745)

"AWT-XAWT" #14 daemon prio=6 os_prio=0 tid=0x00007f021c53f000 nid=0x5662 runnable [0x00007f01bd7d2000]
   java.lang.Thread.State: RUNNABLE
	at sun.awt.X11.XToolkit.waitForEvents(Native Method)
	at sun.awt.X11.XToolkit.run(XToolkit.java:568)
	at sun.awt.X11.XToolkit.run(XToolkit.java:532)
	at java.lang.Thread.run(Thread.java:745)

"Java2D Disposer" #12 daemon prio=10 os_prio=0 tid=0x00007f021c524000 nid=0x5661 in Object.wait() [0x00007f01bdce4000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
	- locked <0x0000000555511eb8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
	at sun.java2d.Disposer.run(Disposer.java:148)
	at java.lang.Thread.run(Thread.java:745)

"Thread-0" #10 daemon prio=5 os_prio=0 tid=0x00007f021c46a000 nid=0x5660 runnable [0x00007f01ec11b000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.fs.LinuxWatchService.poll(Native Method)
	at sun.nio.fs.LinuxWatchService.access$600(LinuxWatchService.java:47)
	at sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:314)
	at java.lang.Thread.run(Thread.java:745)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00007f021c337800 nid=0x565e runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread2" #8 daemon prio=9 os_prio=0 tid=0x00007f021c322800 nid=0x565d waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=0 tid=0x00007f021c31d800 nid=0x565c waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=0 tid=0x00007f021c31b800 nid=0x565b waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #5 daemon prio=9 os_prio=0 tid=0x00007f021c319800 nid=0x565a runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Surrogate Locker Thread (Concurrent GC)" #4 daemon prio=9 os_prio=0 tid=0x00007f021c317800 nid=0x5659 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f021c2f0000 nid=0x5658 in Object.wait() [0x00007f020483a000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
	- locked <0x0000000555512008> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f021c2eb800 nid=0x5657 in Object.wait() [0x00007f020493b000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
	- locked <0x0000000555816fd0> (a java.lang.ref.Reference$Lock)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

"VM Thread" os_prio=0 tid=0x00007f021c2e4000 nid=0x5656 runnable 

"Gang worker#0 (Parallel GC Threads)" os_prio=0 tid=0x00007f021c01b000 nid=0x5651 runnable 

"Gang worker#1 (Parallel GC Threads)" os_prio=0 tid=0x00007f021c01c800 nid=0x5652 runnable 

"Gang worker#2 (Parallel GC Threads)" os_prio=0 tid=0x00007f021c01e800 nid=0x5653 runnable 

"Gang worker#3 (Parallel GC Threads)" os_prio=0 tid=0x00007f021c020000 nid=0x5654 runnable 

"Concurrent Mark-Sweep GC Thread" os_prio=0 tid=0x00007f021c063000 nid=0x5655 runnable 

"VM Periodic Task Thread" os_prio=0 tid=0x00007f021c33a800 nid=0x565f waiting on condition 

JNI global references: 15701


Found one Java-level deadlock:
=============================
"Timer-0":
  waiting to lock monitor 0x00007f019000d9f8 (object 0x0000000555b23358, a org.openstreetmap.josm.gui.layer.MainLayerManager),
  which is held by "AWT-EventQueue-0"
"AWT-EventQueue-0":
  waiting to lock monitor 0x00007f01b80088c8 (object 0x000000055a2e28e8, a java.lang.Object),
  which is held by "Timer-0"

Java stack information for the threads listed above:
===================================================
"Timer-0":
	at org.openstreetmap.josm.gui.layer.MainLayerManager.getEditLayer(MainLayerManager.java:341)
	- waiting to lock <0x0000000555b23358> (a org.openstreetmap.josm.gui.layer.MainLayerManager)
	at org.openstreetmap.josm.gui.MainFrame.onLayerChange(MainFrame.java:175)
	at org.openstreetmap.josm.gui.MainFrame.access$000(MainFrame.java:41)
	at org.openstreetmap.josm.gui.MainFrame$2.propertyChange(MainFrame.java:55)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:303)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.setRequiresSaveToFile(OsmDataLayer.java:183)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.onPostSaveToFile(OsmDataLayer.java:899)
	at org.openstreetmap.josm.io.OsmExporter.save(OsmExporter.java:99)
	at org.openstreetmap.josm.io.OsmExporter.exportData(OsmExporter.java:68)
	at org.openstreetmap.josm.data.AutosaveTask.savelayer(AutosaveTask.java:214)
	at org.openstreetmap.josm.data.AutosaveTask.run(AutosaveTask.java:230)
	- locked <0x000000055a2e28e8> (a java.lang.Object)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
"AWT-EventQueue-0":
	at org.openstreetmap.josm.data.AutosaveTask.layerRemoving(AutosaveTask.java:278)
	- waiting to lock <0x000000055a2e28e8> (a java.lang.Object)
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerRemoving(LayerManager.java:411)
	at org.openstreetmap.josm.gui.layer.LayerManager.realRemoveSingleLayer(LayerManager.java:235)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realRemoveSingleLayer(MainLayerManager.java:286)
	at org.openstreetmap.josm.gui.layer.LayerManager.realRemoveLayer(LayerManager.java:229)
	- locked <0x0000000555b23358> (a org.openstreetmap.josm.gui.layer.MainLayerManager)
	at org.openstreetmap.josm.gui.layer.LayerManager$2.run(LayerManager.java:213)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:146)
	at org.openstreetmap.josm.gui.layer.LayerManager.removeLayer(LayerManager.java:210)
	at org.openstreetmap.josm.actions.MergeLayerAction$1$1.run(MergeLayerAction.java:59)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Found 1 deadlock.

JOSM:

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-07-10 14:56:47 +0200 (Sun, 10 Jul 2016)
Build-Date:2016-07-11 01:33:05
Revision:10525
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10525 pt_BR) Linux Debian GNU/Linux testing (stretch)
Memory Usage: 247 MB / 10206 MB (154 MB allocated, but free)
Java version: 1.8.0_91-8u91-b14-3-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Dawt.useSystemAAFontSettings=on]

Plugins:
- Create_grid_of_ways (32309)
- ImportImagePlugin (32326)
- OpeningHoursEditor (32309)
- PicLayer (32329)
- RoadSigns (32309)
- SimplifyArea (32309)
- apache-commons (32309)
- buildings_tools (32309)
- conflation (0.2.0)
- contourmerge (1014)
- download_along (32309)
- editgpx (32309)
- ejml (32309)
- geojson (41)
- geotools (32309)
- importvec (32309)
- indoorhelper (32326)
- jts (32311)
- log4j (32309)
- measurement (32324)
- merge-overlap (32309)
- opendata (32351)
- pbf (32309)
- pdfimport (32309)
- poly (32309)
- reverter (32309)
- scripting (30723)
- todo (29154)
- turnrestrictions (32386)
- undelete (32309)
- utilsplugin2 (32333)

Attachments (0)

Change History (12)

comment:1 Changed 2 years ago by Don-vip

Cc: michael2402 added
Keywords: regression gsoc-core added
Milestone: 16.07

comment:2 Changed 2 years ago by michael2402

Keywords: autosave added

This happened because the autosave task run while the layer was removed. This will be hard to reproduce.

A simple fix would be to replace the PropertyChangeSupport with a SwingPropertyChangeSupport and make all layer change events fire in the EDT. That way, they don't conflict with layer removal events.

I'll have a look at the autosave task to see if it can be improved e.g. using a COW-ArrayList.

comment:3 Changed 23 months ago by Don-vip

@michael: any news on this one?

comment:4 Changed 23 months ago by michael2402

No. Fixing the autosave task is not easy since it relies on the GUI thread in many places (which it should not...).

Since I have several other places I am working on I don't want to start another big project...

comment:5 Changed 23 months ago by Don-vip

Milestone: 16.0716.08

comment:6 Changed 22 months ago by michael2402

Keywords: regression gsoc-core removed

comment:7 Changed 22 months ago by Don-vip

Milestone: 16.0816.09

comment:8 Changed 21 months ago by simon04

Milestone: 16.0916.10

Milestone renamed

comment:9 Changed 21 months ago by simon04

Milestone: 16.1016.11

comment:10 Changed 19 months ago by Don-vip

Milestone: 16.1116.12

Milestone renamed

comment:11 Changed 18 months ago by Don-vip

Milestone: 16.12

comment:12 Changed 4 months ago by Don-vip

Resolution: duplicate
Status: newclosed

Closed as duplicate of #15847.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.