Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15847 closed defect (fixed)

JOSM got stuck (deadlocked) while merging layers

Reported by: naoliv Owned by: team
Priority: major Milestone: 18.02
Component: Core Version:
Keywords: deadlock autosave merge Cc:

Description

I was trying to merge 59 layers when JOSM simply got stuck (I can't do anything).
With jstack I see a blocked thread:

2018-01-29 08:26:59
Full thread dump OpenJDK 64-Bit Server VM (9.0.1+11-Debian-1 mixed mode):

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

   Locked ownable synchronizers:
	- None

"ForkJoinPool.commonPool-worker-4" #81 daemon prio=6 os_prio=0 tid=0x00007f47f804b000 nid=0x5de5 waiting on condition [0x00007f47b2b69000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)
	- parking to wait for  <0x0000000601370e98> (a java.util.concurrent.ForkJoinPool)
	at java.util.concurrent.locks.LockSupport.park(java.base@9.0.1/LockSupport.java:194)
	at java.util.concurrent.ForkJoinPool.runWorker(java.base@9.0.1/ForkJoinPool.java:1668)
	at java.util.concurrent.ForkJoinWorkerThread.run(java.base@9.0.1/ForkJoinWorkerThread.java:175)

   Locked ownable synchronizers:
	- None

"styled-map-renderer-4" #80 daemon prio=5 os_prio=0 tid=0x00007f47e803b800 nid=0x5de4 waiting on condition [0x00007f47b2f6d000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)
	- parking to wait for  <0x0000000603494560> (a java.util.concurrent.ForkJoinPool)
	at java.util.concurrent.locks.LockSupport.park(java.base@9.0.1/LockSupport.java:194)
	at java.util.concurrent.ForkJoinPool.runWorker(java.base@9.0.1/ForkJoinPool.java:1668)
	at java.util.concurrent.ForkJoinWorkerThread.run(java.base@9.0.1/ForkJoinWorkerThread.java:175)

   Locked ownable synchronizers:
	- None

"styled-map-renderer-0" #74 daemon prio=5 os_prio=0 tid=0x00005563ec9d2000 nid=0x5d43 waiting on condition [0x00007f47c95e9000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)
	- parking to wait for  <0x0000000603494560> (a java.util.concurrent.ForkJoinPool)
	at java.util.concurrent.locks.LockSupport.parkUntil(java.base@9.0.1/LockSupport.java:275)
	at java.util.concurrent.ForkJoinPool.runWorker(java.base@9.0.1/ForkJoinPool.java:1656)
	at java.util.concurrent.ForkJoinWorkerThread.run(java.base@9.0.1/ForkJoinWorkerThread.java:175)

   Locked ownable synchronizers:
	- None

"Map Status Collector" #73 daemon prio=6 os_prio=0 tid=0x00005563ec90b000 nid=0x5d36 waiting on condition [0x00007f47c93e7000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)
	- parking to wait for  <0x0000000609180c78> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@9.0.1/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@9.0.1/AbstractQueuedSynchronizer.java:2062)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@9.0.1/LinkedBlockingQueue.java:435)
	at org.openstreetmap.josm.gui.MapStatus$Collector.run(MapStatus.java:433)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

"Timer-1" #69 prio=6 os_prio=0 tid=0x00005563ec8b0800 nid=0x5d2e in Object.wait() [0x00007f47c89e5000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@9.0.1/Native Method)
	- waiting on <0x0000000607b911f0> (a java.util.TaskQueue)
	at java.lang.Object.wait(java.base@9.0.1/Object.java:516)
	at java.util.TimerThread.mainLoop(java.base@9.0.1/Timer.java:527)
	- waiting to re-lock in wait() <0x0000000607b911f0> (a java.util.TaskQueue)
	at java.util.TimerThread.run(java.base@9.0.1/Timer.java:506)

   Locked ownable synchronizers:
	- None

"main-worker-0" #68 prio=5 os_prio=0 tid=0x00005563ec72d000 nid=0x5d2b in Object.wait() [0x00007f47b346e000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@9.0.1/Native Method)
	- waiting on <no object reference available>
	at java.lang.Object.wait(java.base@9.0.1/Object.java:516)
	at java.awt.EventQueue.invokeAndWait(java.desktop@9.0.1/EventQueue.java:1322)
	- waiting to re-lock in wait() <0x000000077f362858> (a java.awt.EventQueue$1AWTInvocationLock)
	at java.awt.EventQueue.invokeAndWait(java.desktop@9.0.1/EventQueue.java:1303)
	at javax.swing.SwingUtilities.invokeAndWait(java.desktop@9.0.1/SwingUtilities.java:1475)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWait(GuiHelper.java:215)
	at org.openstreetmap.josm.actions.MergeLayerAction.lambda$doMerge$2(MergeLayerAction.java:66)
	at org.openstreetmap.josm.actions.MergeLayerAction$$Lambda$702/929511816.run(Unknown Source)
	at java.util.concurrent.Executors$RunnableAdapter.call(java.base@9.0.1/Executors.java:514)
	at java.util.concurrent.FutureTask.run(java.base@9.0.1/FutureTask.java:264)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9.0.1/ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9.0.1/ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- <0x0000000607b915b0> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"DestroyJavaVM" #51 prio=5 os_prio=0 tid=0x00007f4868012000 nid=0x5c06 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"message-notifier-0" #50 prio=5 os_prio=0 tid=0x00007f4868a64800 nid=0x5c5f waiting on condition [0x00007f47b3efd000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)
	- parking to wait for  <0x00000006028f71b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.parkNanos(java.base@9.0.1/LockSupport.java:234)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@9.0.1/AbstractQueuedSynchronizer.java:2104)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@9.0.1/ScheduledThreadPoolExecutor.java:1131)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@9.0.1/ScheduledThreadPoolExecutor.java:848)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@9.0.1/ThreadPoolExecutor.java:1092)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9.0.1/ThreadPoolExecutor.java:1152)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9.0.1/ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

"Timer-0" #48 daemon prio=6 os_prio=0 tid=0x00005563ec733000 nid=0x5c5c waiting for monitor entry [0x00007f47b3ffe000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.getEditLayer(MainLayerManager.java:355)
	- waiting to lock <0x0000000601007e08> (a org.openstreetmap.josm.gui.layer.MainLayerManager)
	at org.openstreetmap.josm.gui.MainFrame.onLayerChange(MainFrame.java:166)
	at org.openstreetmap.josm.gui.MainFrame.lambda$new$1(MainFrame.java:45)
	at org.openstreetmap.josm.gui.MainFrame$$Lambda$191/234250762.propertyChange(Unknown Source)
	at java.beans.PropertyChangeSupport.fire(java.desktop@9.0.1/PropertyChangeSupport.java:341)
	at java.beans.PropertyChangeSupport.firePropertyChange(java.desktop@9.0.1/PropertyChangeSupport.java:333)
	at java.beans.PropertyChangeSupport.firePropertyChange(java.desktop@9.0.1/PropertyChangeSupport.java:266)
	at java.beans.PropertyChangeSupport.firePropertyChange(java.desktop@9.0.1/PropertyChangeSupport.java:308)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.setRequiresSaveToFile(OsmDataLayer.java:207)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.onPostSaveToFile(OsmDataLayer.java:971)
	at org.openstreetmap.josm.gui.io.importexport.OsmExporter.save(OsmExporter.java:96)
	at org.openstreetmap.josm.gui.io.importexport.OsmExporter.exportData(OsmExporter.java:75)
	at org.openstreetmap.josm.gui.layer.AutosaveTask.savelayer(AutosaveTask.java:242)
	at org.openstreetmap.josm.gui.layer.AutosaveTask.run(AutosaveTask.java:271)
	- locked <0x0000000608d41c60> (a java.lang.Object)
	at java.util.TimerThread.mainLoop(java.base@9.0.1/Timer.java:556)
	at java.util.TimerThread.run(java.base@9.0.1/Timer.java:506)

   Locked ownable synchronizers:
	- None

"RemoteControl HTTPS Server" #47 daemon prio=5 os_prio=0 tid=0x00007f4868aa2800 nid=0x5c5b runnable [0x00007f47b83f2000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(java.base@9.0.1/Native Method)
	at java.net.AbstractPlainSocketImpl.accept(java.base@9.0.1/AbstractPlainSocketImpl.java:459)
	at java.net.ServerSocket.implAccept(java.base@9.0.1/ServerSocket.java:551)
	at sun.security.ssl.SSLServerSocketImpl.accept(java.base@9.0.1/SSLServerSocketImpl.java:352)
	at org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer.run(RemoteControlHttpsServer.java:404)

   Locked ownable synchronizers:
	- None

"RemoteControl HTTPS Server" #46 daemon prio=5 os_prio=0 tid=0x00007f486921d800 nid=0x5c5a runnable [0x00007f47b84f3000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(java.base@9.0.1/Native Method)
	at java.net.AbstractPlainSocketImpl.accept(java.base@9.0.1/AbstractPlainSocketImpl.java:459)
	at java.net.ServerSocket.implAccept(java.base@9.0.1/ServerSocket.java:551)
	at sun.security.ssl.SSLServerSocketImpl.accept(java.base@9.0.1/SSLServerSocketImpl.java:352)
	at org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer.run(RemoteControlHttpsServer.java:404)

   Locked ownable synchronizers:
	- None

"RemoteControl HTTP Server" #45 daemon prio=5 os_prio=0 tid=0x00007f4868a99800 nid=0x5c59 runnable [0x00007f47b98f5000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(java.base@9.0.1/Native Method)
	at java.net.AbstractPlainSocketImpl.accept(java.base@9.0.1/AbstractPlainSocketImpl.java:459)
	at java.net.ServerSocket.implAccept(java.base@9.0.1/ServerSocket.java:551)
	at java.net.ServerSocket.accept(java.base@9.0.1/ServerSocket.java:519)
	at org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpServer.run(RemoteControlHttpServer.java:104)

   Locked ownable synchronizers:
	- None

"RemoteControl HTTP Server" #44 daemon prio=5 os_prio=0 tid=0x00007f48691c1000 nid=0x5c58 runnable [0x00007f47b97f4000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(java.base@9.0.1/Native Method)
	at java.net.AbstractPlainSocketImpl.accept(java.base@9.0.1/AbstractPlainSocketImpl.java:459)
	at java.net.ServerSocket.implAccept(java.base@9.0.1/ServerSocket.java:551)
	at java.net.ServerSocket.accept(java.base@9.0.1/ServerSocket.java:519)
	at org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpServer.run(RemoteControlHttpServer.java:104)

   Locked ownable synchronizers:
	- None

"WeakCollectionCleaner" #39 daemon prio=8 os_prio=0 tid=0x00007f4868df3800 nid=0x5c4e in Object.wait() [0x00007f47b9bf6000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@9.0.1/Native Method)
	- waiting on <0x00000006050801f8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@9.0.1/ReferenceQueue.java:151)
	- waiting to re-lock in wait() <0x00000006050801f8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@9.0.1/ReferenceQueue.java:172)
	at org.geotools.util.WeakCollectionCleaner.run(WeakCollectionCleaner.java:77)

   Locked ownable synchronizers:
	- None

"GT authority factory disposer" #36 daemon prio=5 os_prio=0 tid=0x00007f4868c72800 nid=0x5c4a in Object.wait() [0x00007f47c92e6000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(java.base@9.0.1/Native Method)
	- waiting on <0x00000006050807b0> (a java.util.TaskQueue)
	at java.util.TimerThread.mainLoop(java.base@9.0.1/Timer.java:553)
	- waiting to re-lock in wait() <0x00000006050807b0> (a java.util.TaskQueue)
	at java.util.TimerThread.run(java.base@9.0.1/Timer.java:506)

   Locked ownable synchronizers:
	- None

"JCS-ElementEventQueue-Thread-1" #35 daemon prio=5 os_prio=0 tid=0x00007f47d416a000 nid=0x5c47 waiting on condition [0x00007f47c94e8000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)
	- parking to wait for  <0x000000060088ee98> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@9.0.1/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@9.0.1/AbstractQueuedSynchronizer.java:2062)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@9.0.1/LinkedBlockingQueue.java:435)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@9.0.1/ThreadPoolExecutor.java:1092)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9.0.1/ThreadPoolExecutor.java:1152)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9.0.1/ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

"image-fetcher-0" #32 prio=5 os_prio=0 tid=0x00007f47cc0e6000 nid=0x5c45 waiting on condition [0x00007f47c86e4000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)
	- parking to wait for  <0x0000000600636ac8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@9.0.1/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@9.0.1/AbstractQueuedSynchronizer.java:2062)
	at java.util.concurrent.LinkedBlockingQueue.take(java.base@9.0.1/LinkedBlockingQueue.java:435)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@9.0.1/ThreadPoolExecutor.java:1092)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9.0.1/ThreadPoolExecutor.java:1152)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9.0.1/ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

"Weak reference cleaner" #24 prio=5 os_prio=0 tid=0x00007f48689d7000 nid=0x5c32 in Object.wait() [0x00007f47c98ea000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@9.0.1/Native Method)
	- waiting on <0x000000060062a6c0> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@9.0.1/ReferenceQueue.java:151)
	- waiting to re-lock in wait() <0x000000060062a6c0> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@9.0.1/ReferenceQueue.java:172)
	at org.openstreetmap.josm.tools.ListenableWeakReference.clean(ListenableWeakReference.java:60)
	at org.openstreetmap.josm.tools.ListenableWeakReference$$Lambda$262/1917442783.run(Unknown Source)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

"File Watcher" #13 prio=5 os_prio=0 tid=0x00007f486894d800 nid=0x5c31 waiting on condition [0x00007f47c9beb000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)
	- parking to wait for  <0x0000000601007a08> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@9.0.1/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@9.0.1/AbstractQueuedSynchronizer.java:2062)
	at java.util.concurrent.LinkedBlockingDeque.takeFirst(java.base@9.0.1/LinkedBlockingDeque.java:483)
	at java.util.concurrent.LinkedBlockingDeque.take(java.base@9.0.1/LinkedBlockingDeque.java:671)
	at sun.nio.fs.AbstractWatchService.take(java.base@9.0.1/AbstractWatchService.java:118)
	at org.openstreetmap.josm.io.FileWatcher.processEvents(FileWatcher.java:107)
	at org.openstreetmap.josm.io.FileWatcher$$Lambda$37/497359413.run(Unknown Source)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

"TimerQueue" #23 daemon prio=5 os_prio=0 tid=0x00005563ec63c000 nid=0x5c2e waiting on condition [0x00007f47de138000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@9.0.1/Native Method)
	- parking to wait for  <0x0000000600641400> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@9.0.1/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@9.0.1/AbstractQueuedSynchronizer.java:2062)
	at java.util.concurrent.DelayQueue.take(java.base@9.0.1/DelayQueue.java:217)
	at javax.swing.TimerQueue.run(java.desktop@9.0.1/TimerQueue.java:171)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- <0x0000000603774268> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)

"AWT-EventQueue-0" #20 prio=6 os_prio=0 tid=0x00007f4868901000 nid=0x5c2d waiting for monitor entry [0x00007f47de237000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.openstreetmap.josm.gui.layer.AutosaveTask.layerRemoving(AutosaveTask.java:324)
	- waiting to lock <0x0000000608d41c60> (a java.lang.Object)
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerRemoving(LayerManager.java:475)
	at org.openstreetmap.josm.gui.layer.LayerManager.realRemoveSingleLayer(LayerManager.java:277)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realRemoveSingleLayer(MainLayerManager.java:292)
	at org.openstreetmap.josm.gui.layer.LayerManager.realRemoveLayer(LayerManager.java:265)
	- locked <0x0000000601007e08> (a org.openstreetmap.josm.gui.layer.MainLayerManager)
	at org.openstreetmap.josm.gui.layer.LayerManager.lambda$removeLayer$1(LayerManager.java:247)
	at org.openstreetmap.josm.gui.layer.LayerManager$$Lambda$704/2101992772.run(Unknown Source)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:234)
	at org.openstreetmap.josm.gui.layer.LayerManager.removeLayer(LayerManager.java:247)
	at org.openstreetmap.josm.actions.MergeLayerAction.lambda$doMerge$1(MergeLayerAction.java:66)
	at org.openstreetmap.josm.actions.MergeLayerAction$$Lambda$703/1745373566.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(java.desktop@9.0.1/InvocationEvent.java:303)
	at java.awt.EventQueue.dispatchEventImpl(java.desktop@9.0.1/EventQueue.java:764)
	at java.awt.EventQueue.access$500(java.desktop@9.0.1/EventQueue.java:97)
	at java.awt.EventQueue$3.run(java.desktop@9.0.1/EventQueue.java:717)
	at java.awt.EventQueue$3.run(java.desktop@9.0.1/EventQueue.java:711)
	at java.security.AccessController.doPrivileged(java.base@9.0.1/Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@9.0.1/ProtectionDomain.java:89)
	at java.awt.EventQueue.dispatchEvent(java.desktop@9.0.1/EventQueue.java:734)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@9.0.1/EventDispatchThread.java:199)
	at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@9.0.1/EventDispatchThread.java:124)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@9.0.1/EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(java.desktop@9.0.1/EventDispatchThread.java:109)
	at java.awt.EventDispatchThread.pumpEvents(java.desktop@9.0.1/EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.run(java.desktop@9.0.1/EventDispatchThread.java:90)

   Locked ownable synchronizers:
	- None

"AWT-Shutdown" #21 prio=5 os_prio=0 tid=0x00007f48688fb800 nid=0x5c2c in Object.wait() [0x00007f47de33a000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@9.0.1/Native Method)
	- waiting on <no object reference available>
	at java.lang.Object.wait(java.base@9.0.1/Object.java:516)
	at sun.awt.AWTAutoShutdown.run(java.desktop@9.0.1/AWTAutoShutdown.java:291)
	- waiting to re-lock in wait() <0x00000006006418f8> (a java.lang.Object)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

"AWT-XAWT" #19 daemon prio=6 os_prio=0 tid=0x00007f4868857000 nid=0x5c2a runnable [0x00007f47df7e6000]
   java.lang.Thread.State: RUNNABLE
	at sun.awt.X11.XToolkit.waitForEvents(java.desktop@9.0.1/Native Method)
	at sun.awt.X11.XToolkit.run(java.desktop@9.0.1/XToolkit.java:588)
	at sun.awt.X11.XToolkit.run(java.desktop@9.0.1/XToolkit.java:552)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

"Java2D Disposer" #16 daemon prio=10 os_prio=0 tid=0x00007f4868758000 nid=0x5c26 in Object.wait() [0x00007f47de90d000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@9.0.1/Native Method)
	- waiting on <no object reference available>
	at java.lang.ref.ReferenceQueue.remove(java.base@9.0.1/ReferenceQueue.java:151)
	- waiting to re-lock in wait() <0x0000000601489718> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@9.0.1/ReferenceQueue.java:172)
	at sun.java2d.Disposer.run(java.desktop@9.0.1/Disposer.java:144)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

"FileSystemWatchService" #12 daemon prio=5 os_prio=0 tid=0x00007f4868657000 nid=0x5c1e runnable [0x00007f48117e4000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.fs.LinuxWatchService.poll(java.base@9.0.1/Native Method)
	at sun.nio.fs.LinuxWatchService.access$600(java.base@9.0.1/LinuxWatchService.java:47)
	at sun.nio.fs.LinuxWatchService$Poller.run(java.base@9.0.1/LinuxWatchService.java:316)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)

   Locked ownable synchronizers:
	- None

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

   Locked ownable synchronizers:
	- None

"Common-Cleaner" #9 daemon prio=8 os_prio=0 tid=0x00007f486839d800 nid=0x5c1a in Object.wait() [0x00007f481814c000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(java.base@9.0.1/Native Method)
	- waiting on <no object reference available>
	at java.lang.ref.ReferenceQueue.remove(java.base@9.0.1/ReferenceQueue.java:151)
	- waiting to re-lock in wait() <0x0000000601c90120> (a java.lang.ref.ReferenceQueue$Lock)
	at jdk.internal.ref.CleanerImpl.run(java.base@9.0.1/CleanerImpl.java:148)
	at java.lang.Thread.run(java.base@9.0.1/Thread.java:844)
	at jdk.internal.misc.InnocuousThread.run(java.base@9.0.1/InnocuousThread.java:122)

   Locked ownable synchronizers:
	- None

"Sweeper thread" #8 daemon prio=9 os_prio=0 tid=0x00007f4868350800 nid=0x5c19 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"C1 CompilerThread2" #7 daemon prio=9 os_prio=0 tid=0x00007f486834e800 nid=0x5c18 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

   Locked ownable synchronizers:
	- None

"C2 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007f486834c800 nid=0x5c17 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

   Locked ownable synchronizers:
	- None

"C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007f486834a800 nid=0x5c16 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

   Locked ownable synchronizers:
	- None

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007f4868346800 nid=0x5c15 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f4868332800 nid=0x5c14 in Object.wait() [0x00007f484c16f000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@9.0.1/Native Method)
	- waiting on <no object reference available>
	at java.lang.ref.ReferenceQueue.remove(java.base@9.0.1/ReferenceQueue.java:151)
	- waiting to re-lock in wait() <0x0000000601c90cd8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@9.0.1/ReferenceQueue.java:172)
	at java.lang.ref.Finalizer$FinalizerThread.run(java.base@9.0.1/Finalizer.java:216)

   Locked ownable synchronizers:
	- None

"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f486831d800 nid=0x5c13 waiting on condition [0x00007f484c270000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.ref.Reference.waitForReferencePendingList(java.base@9.0.1/Native Method)
	at java.lang.ref.Reference.processPendingReferences(java.base@9.0.1/Reference.java:174)
	at java.lang.ref.Reference.access$000(java.base@9.0.1/Reference.java:44)
	at java.lang.ref.Reference$ReferenceHandler.run(java.base@9.0.1/Reference.java:138)

   Locked ownable synchronizers:
	- None

"VM Thread" os_prio=0 tid=0x00007f4868314000 nid=0x5c12 runnable 

"GC Thread#0" os_prio=0 tid=0x00007f4868027800 nid=0x5c07 runnable 

"GC Thread#1" os_prio=0 tid=0x00007f4868029000 nid=0x5c08 runnable 

"GC Thread#2" os_prio=0 tid=0x00007f486802a800 nid=0x5c09 runnable 

"GC Thread#3" os_prio=0 tid=0x00007f486802c800 nid=0x5c0a runnable 

"G1 Main Marker" os_prio=0 tid=0x00007f48680af800 nid=0x5c10 runnable 

"G1 Marker#0" os_prio=0 tid=0x00007f48680b1800 nid=0x5c11 runnable 

"G1 Refine#0" os_prio=0 tid=0x00007f4868033800 nid=0x5c0e runnable 

"G1 Refine#1" os_prio=0 tid=0x00007f4868032000 nid=0x5c0d runnable 

"G1 Refine#2" os_prio=0 tid=0x00007f4868030000 nid=0x5c0c runnable 

"G1 Refine#3" os_prio=0 tid=0x00007f486802e800 nid=0x5c0b runnable 

"G1 Young RemSet Sampling" os_prio=0 tid=0x00007f4868035800 nid=0x5c0f runnable 

"VM Periodic Task Thread" os_prio=0 tid=0x00007f486847a800 nid=0x5c1c waiting on condition 

JNI global references: 9140


Found one Java-level deadlock:
=============================
"Timer-0":
  waiting to lock monitor 0x00007f47f8048080 (object 0x0000000601007e08, a org.openstreetmap.josm.gui.layer.MainLayerManager),
  which is held by "AWT-EventQueue-0"
"AWT-EventQueue-0":
  waiting to lock monitor 0x00007f47f8043280 (object 0x0000000608d41c60, 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:355)
	- waiting to lock <0x0000000601007e08> (a org.openstreetmap.josm.gui.layer.MainLayerManager)
	at org.openstreetmap.josm.gui.MainFrame.onLayerChange(MainFrame.java:166)
	at org.openstreetmap.josm.gui.MainFrame.lambda$new$1(MainFrame.java:45)
	at org.openstreetmap.josm.gui.MainFrame$$Lambda$191/234250762.propertyChange(Unknown Source)
	at java.beans.PropertyChangeSupport.fire(java.desktop@9.0.1/PropertyChangeSupport.java:341)
	at java.beans.PropertyChangeSupport.firePropertyChange(java.desktop@9.0.1/PropertyChangeSupport.java:333)
	at java.beans.PropertyChangeSupport.firePropertyChange(java.desktop@9.0.1/PropertyChangeSupport.java:266)
	at java.beans.PropertyChangeSupport.firePropertyChange(java.desktop@9.0.1/PropertyChangeSupport.java:308)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.setRequiresSaveToFile(OsmDataLayer.java:207)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.onPostSaveToFile(OsmDataLayer.java:971)
	at org.openstreetmap.josm.gui.io.importexport.OsmExporter.save(OsmExporter.java:96)
	at org.openstreetmap.josm.gui.io.importexport.OsmExporter.exportData(OsmExporter.java:75)
	at org.openstreetmap.josm.gui.layer.AutosaveTask.savelayer(AutosaveTask.java:242)
	at org.openstreetmap.josm.gui.layer.AutosaveTask.run(AutosaveTask.java:271)
	- locked <0x0000000608d41c60> (a java.lang.Object)
	at java.util.TimerThread.mainLoop(java.base@9.0.1/Timer.java:556)
	at java.util.TimerThread.run(java.base@9.0.1/Timer.java:506)
"AWT-EventQueue-0":
	at org.openstreetmap.josm.gui.layer.AutosaveTask.layerRemoving(AutosaveTask.java:324)
	- waiting to lock <0x0000000608d41c60> (a java.lang.Object)
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerRemoving(LayerManager.java:475)
	at org.openstreetmap.josm.gui.layer.LayerManager.realRemoveSingleLayer(LayerManager.java:277)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realRemoveSingleLayer(MainLayerManager.java:292)
	at org.openstreetmap.josm.gui.layer.LayerManager.realRemoveLayer(LayerManager.java:265)
	- locked <0x0000000601007e08> (a org.openstreetmap.josm.gui.layer.MainLayerManager)
	at org.openstreetmap.josm.gui.layer.LayerManager.lambda$removeLayer$1(LayerManager.java:247)
	at org.openstreetmap.josm.gui.layer.LayerManager$$Lambda$704/2101992772.run(Unknown Source)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:234)
	at org.openstreetmap.josm.gui.layer.LayerManager.removeLayer(LayerManager.java:247)
	at org.openstreetmap.josm.actions.MergeLayerAction.lambda$doMerge$1(MergeLayerAction.java:66)
	at org.openstreetmap.josm.actions.MergeLayerAction$$Lambda$703/1745373566.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(java.desktop@9.0.1/InvocationEvent.java:303)
	at java.awt.EventQueue.dispatchEventImpl(java.desktop@9.0.1/EventQueue.java:764)
	at java.awt.EventQueue.access$500(java.desktop@9.0.1/EventQueue.java:97)
	at java.awt.EventQueue$3.run(java.desktop@9.0.1/EventQueue.java:717)
	at java.awt.EventQueue$3.run(java.desktop@9.0.1/EventQueue.java:711)
	at java.security.AccessController.doPrivileged(java.base@9.0.1/Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@9.0.1/ProtectionDomain.java:89)
	at java.awt.EventQueue.dispatchEvent(java.desktop@9.0.1/EventQueue.java:734)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@9.0.1/EventDispatchThread.java:199)
	at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@9.0.1/EventDispatchThread.java:124)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@9.0.1/EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(java.desktop@9.0.1/EventDispatchThread.java:109)
	at java.awt.EventDispatchThread.pumpEvents(java.desktop@9.0.1/EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.run(java.desktop@9.0.1/EventDispatchThread.java:90)

Found 1 deadlock.

JOSM:

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-01-28 23:08:56 +0100 (Sun, 28 Jan 2018)
Revision:13367
Build-Date:2018-01-28 22:25:44
URL:http://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (13367 pt_BR) Linux Debian GNU/Linux testing (buster)
Memory Usage: 2120 MB / 7168 MB (1272 MB allocated, but free)
Java version: 9.0.1+11-Debian-1, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900, :0.1 1280x1024
Maximum Screen Size: 1600x1024
Java package: openjdk-9-jre:amd64-9.0.1+11-1
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-15
VM arguments: [--add-modules=java.activation,java.se.ee, -Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Attachments (0)

Change History (4)

comment:1 by Don-vip, 7 years ago

Keywords: deadlock autosave added
Milestone: 18.02
Priority: normalmajor

AutosaveTask field layerLock is used in two different threads (EDT & autosave thread) => deadlock

comment:2 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

In 13462/josm:

fix #15847 - fires OsmDataLayer property change events in EDT to avoid deadlock in AutoSaveTask

comment:3 by Don-vip, 7 years ago

Ticket #13142 has been marked as a duplicate of this ticket.

comment:4 by Don-vip, 7 years ago

Keywords: merge added

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.