Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#5897 closed defect (duplicate)

JOSM hangs when adding or deleting large number of keys from nodes

Reported by: beddhist Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: hang delete keys nodes Cc:

Description

I accidentally added keys to a little over 1700 nodes in layer converted from GPS. (The add is almost instant.) I then selected all the nodes, but not the ways they belong to and with one of the two keys selected pressed delete. The program stopped responding after that with CPU usage close to 100%. No change after 1 hour, so I killed it.

I can reproduce this.

Attachments (2)

CS 20110108.gpx.gz (43.5 KB) - added by Beddhist 13 years ago.
Not the file that originally caused the problem, but it hangs JOSM anyway.
5897_profile.png (43.2 KB) - added by ax 13 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 in reply to:  description Changed 13 years ago by skyper

Replying to beddhist:

I accidentally added keys to a little over 1700 nodes in layer converted from GPS. (The add is almost instant.) I then selected all the nodes, but not the ways they belong to and with one of the two keys selected pressed delete. The program stopped responding after that with CPU usage close to 100%. No change after 1 hour, so I killed it.

I can reproduce this.

It is always easier to debug with more info. If possible, please attach the file you were editing, and tell us your operating system and the java version.

You can also start JOSM from a terminal/console and post the logs from there.

Thanks

comment:2 Changed 13 years ago by bastiK

@skyper: thanks for helping with the bug reports, have you tried to reproduce what beddhist reported? (Converting a GPX file and so on...)

comment:3 Changed 13 years ago by anonymous

OK, I'll try my best. Here is an extract from an error dump that I have posted for another ticket, as there is nothing relevant in the console window:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2010-12-31 02:31:28
Last Changed Author: bastiK
Revision: 3751
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2010-12-30 16:31:05 +0100 (Thu, 30 Dec 2010)
Last Changed Rev: 3751

Identification: JOSM/1.5 (3751 en)
Memory Usage: 93 MB / 247 MB (23 MB allocated, but free)
Java version: 1.6.0_20, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows XP
Dataset consistency test: No problems found

Plugin: dataimport (22542)
Plugin: editgpx (23659)
Plugin: measurement (22547)
Plugin: multipoly-convert (21706)
Plugin: turnrestrictions (24937)

Here is how to reproduce the problem:
Convert gpx file to layer
Ctrl-A
Add a key. I used source=GPS. Of course, this should only be applied to the roads, not the nodes, so now I try to undo it.
With all still selected click on the first node in the selection window.
Press Shift-End to select all nodes, but not the ways.
Click the Select button, so now the nodes are selected only.
In the Properties box make sure the key is selected and click the Bin button.
The program now hangs and CPU utilisation goes to max.

BTW: you don't expect feedback from the average user on tickets they have submitted? Because I didn't get notified of your comments it was by pure chance that I saw it. Most people wouldn't even know how to find their own tickets in here.

gpx file attached for you.

Kind regards,
Peter.

comment:4 Changed 13 years ago by Beddhist

Sorry the above got posted anonymously, but Trac kicked me off. I'm on a VERY slow mobile phone connection ...

Changed 13 years ago by Beddhist

Attachment: CS 20110108.gpx.gz added

Not the file that originally caused the problem, but it hangs JOSM anyway.

comment:5 in reply to:  2 Changed 13 years ago by skyper

Replying to bastiK:

@skyper: thanks for helping with the bug reports, have you tried to reproduce what beddhist reported? (Converting a GPX file and so on...)

No, I did not so far.
Sorry no time right now.

comment:6 in reply to:  3 ; Changed 13 years ago by skyper

Replying to beddhist:

OK, I'll try my best. Here is an extract from an error dump that I have posted for another ticket, as there is nothing relevant in the console window:

Thanks for that.

BTW: you don't expect feedback from the average user on tickets they have submitted? Because I didn't get notified of your comments it was by pure chance that I saw it. Most people wouldn't even know how to find their own tickets in here.

Did you not get a email ?
As long as you open a ticket or write a comment with a valid username or email-address, you should get a email for each new comment on that ticket.
It works for me.
If this does not happen, please fill a new ticket. Thanks

comment:7 Changed 13 years ago by skyper

Keywords: nodes added
Summary: JOSM hangs when deleting large number of keysJOSM hangs when adding or deleting large number of keys from nodes
Version: tested

I can reproduce it on debian squeeze with josm-tested and r3862 with openjdk-java

I made a dump:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2010-12-31 02:31:28
Last Changed Author: bastiK
Revision: 3751
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2010-12-30 16:31:05 +0100 (Thu, 30 Dec 2010)
Last Changed Rev: 3751

Open file: /home2/test/Desktop/CS 20110108.gpx (365814 bytes)
2011-02-07 14:26:59
Full thread dump OpenJDK Client VM (16.0-b13 mixed mode, sharing):

"Map Status Collector" daemon prio=10 tid=0xb38db400 nid=0xc88 in Object.wait() [0xb3dad000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at org.openstreetmap.josm.gui.MapStatus$Collector.run(MapStatus.java:149)
	- locked <0x8547c6c8> (a org.openstreetmap.josm.gui.MapStatus$Collector)
	at java.lang.Thread.run(Thread.java:636)

"pool-1-thread-1" prio=10 tid=0xb3736c00 nid=0xc87 waiting on condition [0xb3dfe000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x84a6c900> (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.LinkedBlockingQueue.take(LinkedBlockingQueue.java:386)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)

"Timer-0" daemon prio=10 tid=0xb3692400 nid=0xc86 in Object.wait() [0xb3c73000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.util.TimerThread.mainLoop(Timer.java:531)
	- locked <0x852e9690> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:484)

"DestroyJavaVM" prio=10 tid=0x093ba000 nid=0xc6d waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

"TimerQueue" daemon prio=10 tid=0x09786000 nid=0xc82 waiting on condition [0xb39fe000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x84cf3b60> (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:189)
	at javax.swing.TimerQueue.run(TimerQueue.java:167)
	at java.lang.Thread.run(Thread.java:636)

"AWT-EventQueue-0" prio=10 tid=0x0954fc00 nid=0xc7c runnable [0xb4007000]
   java.lang.Thread.State: RUNNABLE
	at java.util.AbstractCollection.toArray(AbstractCollection.java:138)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SetRelationSelection.updateEnabledState(SelectionListDialog.java:464)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SetRelationSelection.valueChanged(SelectionListDialog.java:469)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
	at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
	at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
	at javax.swing.DefaultListSelectionModel.addSelectionInterval(DefaultListSelectionModel.java:518)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SelectionListModel.setSelected(SelectionListDialog.java:600)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SelectionListModel.update(SelectionListDialog.java:645)
	at org.openstreetmap.josm.gui.dialogs.SelectionListDialog$SelectionListModel.tagsChanged(SelectionListDialog.java:729)
	at org.openstreetmap.josm.data.osm.event.TagsChangedEvent.fire(TagsChangedEvent.java:24)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager.fireEvents(DatasetEventManager.java:109)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager.access$200(DatasetEventManager.java:27)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager$1.run(DatasetEventManager.java:139)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

"AWT-Shutdown" prio=10 tid=0x0955bc00 nid=0xc7b in Object.wait() [0xb3fb6000]
   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:281)
	- locked <0x84c60a00> (a java.lang.Object)
	at java.lang.Thread.run(Thread.java:636)

"AWT-XAWT" daemon prio=10 tid=0x09533c00 nid=0xc76 runnable [0xb4058000]
   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:543)
	at java.lang.Thread.run(Thread.java:636)

"Java2D Disposer" daemon prio=10 tid=0x094f1800 nid=0xc75 in Object.wait() [0xb4151000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:133)
	- locked <0x84af4b18> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:149)
	at sun.java2d.Disposer.run(Disposer.java:143)
	at java.lang.Thread.run(Thread.java:636)

"Low Memory Detector" daemon prio=10 tid=0x09426c00 nid=0xc73 runnable [0x00000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x09424c00 nid=0xc72 waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x09423000 nid=0xc71 waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=10 tid=0x0941ac00 nid=0xc70 in Object.wait() [0xb48f8000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:133)
	- locked <0x84967ea8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:149)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)

"Reference Handler" daemon prio=10 tid=0x09419400 nid=0xc6f in Object.wait() [0xb4949000]
   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$ReferenceHandler.run(Reference.java:133)
	- locked <0x84967f30> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=10 tid=0x09417c00 nid=0xc6e runnable 

"VM Periodic Task Thread" prio=10 tid=0x0942a400 nid=0xc74 waiting on condition 

JNI global references: 1236

Heap
 def new generation   total 15104K, used 9648K [0x7f4d0000, 0x80530000, 0x84820000)
  eden space 13440K,  71% used [0x7f4d0000, 0x7fe264f8, 0x801f0000)
  from space 1664K,   5% used [0x80390000, 0x803a5ea8, 0x80530000)
  to   space 1664K,   0% used [0x801f0000, 0x801f0000, 0x80390000)
 tenured generation   total 33396K, used 26497K [0x84820000, 0x868bd000, 0x8eed0000)
   the space 33396K,  79% used [0x84820000, 0x86200708, 0x86200800, 0x868bd000)
 compacting perm gen  total 12288K, used 8741K [0x8eed0000, 0x8fad0000, 0x92ed0000)
   the space 12288K,  71% used [0x8eed0000, 0x8f759558, 0x8f759600, 0x8fad0000)
    ro space 10240K,  72% used [0x92ed0000, 0x9361a9e0, 0x9361aa00, 0x938d0000)
    rw space 12288K,  60% used [0x938d0000, 0x9400b0d0, 0x9400b200, 0x944d0000)

It is even worse. JOSM stalls also when adding a tag to all nodes and no way. I also saved the converted file and started a new session with this file, but it is the same.

With only ways selected it works but I am not sure if maybe the total number of ways is just to low.

comment:8 in reply to:  6 Changed 13 years ago by Beddhist

Replying to skyper:

Did you not get a email ?
As long as you open a ticket or write a comment with a valid username or email-address, you should get a email for each new comment on that ticket.

I'm new to Trac, so in a way it was my fault: I added the ticket with my OSM user name, not seeing the "Register" link and incorrectly assuming that my OSM login would work here. I did add my OSM user name and email to preferences, but that doesn't seem enough, it seems.

Since I have a user name I do get emails. I think this part of Trac needs a little work, so that Trac newbies don't get misled. Perhaps a valid user or email should be required?

comment:9 in reply to:  7 Changed 13 years ago by Beddhist

Replying to skyper:

It is even worse. JOSM stalls also when adding a tag to all nodes and no way. I also saved the converted file and started a new session with this file, but it is the same.

A little more info: I accidentally did this again with about 800 nodes and left the PC. After about 30-60 mins the delete completed. So, it seems that it's not hung, it's just extremely slow.

Adding tags to 2000-odd nodes and a bunch of ways on my system is instant. No problem there.

comment:10 Changed 13 years ago by ax

i had a look at this with a profiler:


as you may notice, this is for a selection of 10,195 elements, trying to remove one property. maybe this is helpful to someone. i give up after having spent too much time with it already.

Last edited 13 years ago by ax (previous) (diff)

Changed 13 years ago by ax

Attachment: 5897_profile.png added

comment:11 Changed 13 years ago by ax

ok, not yet :) so it seems most of the time is spent in SelectionListDialog::TitleUpdater.updateTitle(). but why does the title of the selection list has to be updated when a property changes? changing a property doesn't change the selection, does it? so shouldn't we just remove SelectionListDialog::TitleUpdater from the "delete property event chain"?

comment:12 Changed 13 years ago by stoecker

Resolution: duplicate
Status: newclosed

Ah. There was already a patch/suggestion in a previous ticket, which had an equal topic (#5209), but the author never continued the issue. The problem is, that at the right position in JOSM the sending of the wrong signal must be stopped.

comment:13 Changed 13 years ago by stoecker

Closed as duplicate of #5209.

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.