Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15668 closed defect (fixed)

Enabling "Viewport Following" causes thread deadlock

Reported by: maripogoda Owned by: team
Priority: major Milestone: 17.12
Component: Core mappaint Version: latest
Keywords: template_report deadlock autofilter regression Cc:

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. Download map data.
  2. Enable "Viewport Following" (or set "draw.viewport.following=true" in preferences).
  3. Draw some lines. (In my environment, adding 4 to 7 lines is enough.)
  4. Then JOSM freezes. Java thread dumps show detailed report of deadlock.

To reproduce the problem, the area shouldn't be to small. Downloading "139.7730578,35.7083659,139.7770083,35.7118948" is good to reproduce it.

What is the expected result?

JOSM continues working:-)

What happens instead?

JOSM freezes silently. It doesn't accept any input.

Please provide any additional information below. Attach a screenshot if possible.

It seems that no personal configuration or plugin is related to this problem. I could reproduce it just after cleaning JOSM user directory and resetting preferences.

This is a part of the thread dumps. The full output is attached as a file.

Found one Java-level deadlock:
=============================
"smooth-scroller":
  waiting to lock monitor 0x00007ff75d18a358 (object 0x00000006c02485f0, a java.awt.Component$AWTTreeLock),
  which is held by "AWT-EventQueue-0"
"AWT-EventQueue-0":
  waiting to lock monitor 0x00007ff75d4e0688 (object 0x00000006c4f857f0, a org.openstreetmap.josm.gui.autofilter.AutoFilterManager),
  which is held by "smooth-scroller"

Java stack information for the threads listed above:
===================================================
"smooth-scroller":
	at java.awt.Container.remove(Container.java:1261)
	- waiting to lock <0x00000006c02485f0> (a java.awt.Component$AWTTreeLock)
	at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.removeAllButtons(AutoFilterManager.java:177)
	at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.updateButtons(AutoFilterManager.java:144)
	- locked <0x00000006c4f857f0> (a org.openstreetmap.josm.gui.autofilter.AutoFilterManager)
	at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.zoomChanged(AutoFilterManager.java:231)
	at org.openstreetmap.josm.gui.NavigatableComponent.fireZoomChanged(NavigatableComponent.java:141)
	at org.openstreetmap.josm.gui.NavigatableComponent.zoomNoUndoTo(NavigatableComponent.java:702)
	at org.openstreetmap.josm.gui.NavigatableComponent.zoomTo(NavigatableComponent.java:682)
	at org.openstreetmap.josm.gui.NavigatableComponent.zoomTo(NavigatableComponent.java:602)
	at org.openstreetmap.josm.gui.NavigatableComponent.zoomTo(NavigatableComponent.java:711)
	at org.openstreetmap.josm.gui.NavigatableComponent$2.run(NavigatableComponent.java:751)
"AWT-EventQueue-0":
	at org.openstreetmap.josm.gui.autofilter.AutoFilterManager.getCurrentAutoFilter(AutoFilterManager.java:359)
	- waiting to lock <0x00000006c4f857f0> (a org.openstreetmap.josm.gui.autofilter.AutoFilterManager)
	at org.openstreetmap.josm.gui.MapView.drawMapContent(MapView.java:606)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:492)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	- locked <0x00000006c02485f0> (a java.awt.Component$AWTTreeLock)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
	at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	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:80)
	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.
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-12-12 01:11:39 +0100 (Tue, 12 Dec 2017)
Build-Date:2017-12-12 02:41:40
Revision:13199
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13199 en) Mac OS X 10.13
OS Build number: Mac OS X 10.13 (17A405)
Memory Usage: 494 MB / 3641 MB (215 MB allocated, but free)
Java version: 1.8.0_144-b01, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 69732800 1280x800
Maximum Screen Size: 1280x800

Plugins:
+ EasyPresets (1512175382)
+ apache-commons (33668)
+ apache-http (32699)
+ buildings_tools (33735)
+ reverter (33865)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/JaNamigSample&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/JapaneseAddress&zip=1
+ http://www.yamasita.jp/osm/seminar/OSM_MappingParty/ShrinesAndTemples.xml

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Incline&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&zip=1

Last errors/warnings:
- W: Update plugins - org.openstreetmap.josm.plugins.PluginHandler$UpdatePluginsMessagePanel[,0,0,0x0,invalid,layout=java.awt.GridBagLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (1)

smooth-scroll-deadlock.txt (51.0 KB ) - added by maripogoda 7 years ago.
Original thread dumps

Download all attachments as: .zip

Change History (6)

by maripogoda, 7 years ago

Attachment: smooth-scroll-deadlock.txt added

Original thread dumps

comment:1 by Don-vip, 7 years ago

Description: modified (diff)
Keywords: deadlock added
Priority: normalmajor

comment:2 by Don-vip, 7 years ago

Keywords: autofilter regression added
Milestone: 17.12

comment:3 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

In 13200/josm:

fix #15668 - make sure zoom change events are always fired in EDT

comment:4 by Don-vip, 7 years ago

thanks for reporting the issue!

comment:5 by maripogoda, 7 years ago

I built rev 13200 locally and confirmed that the problem was resolved! Thank you for your quick fix!

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.