Opened 15 years ago
Closed 15 years ago
#3644 closed defect (worksforme)
High CPU usage when uploading whilst in deletion mode
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
I was:
- Editing the complete Iceland dump (http://osm.nix.is/latest/Iceland.osm.bz2)
- Had just uploaded to http://www.openstreetmap.org/browse/changeset/2721542 and left it open
- Pressed upload but something in the UI lagged so the upload commenced instead of giving me a changeset dialog (I may have pressed enter when the upload dialog was still waiting to appear)
- Uploaded an invalid node as a result
- Deleted it
- Opened a new upload dialog to upload this: http://www.openstreetmap.org/browse/changeset/2721633
- While doing #6 JOSM's CPU usage was >100%. Usually around 115% using around 900MB of resident memory:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 20286 avar 20 0 1234m 887m 5404 S 126 46.9 7:33.87 java
Both of the changeset comments were in the US ASCII subset of UTF-8 so I don't know if this is related to #3371
Here's the output of kill -QUIT when JOSM was consuming all that CPU:
2009-10-03 11:03:32 Full thread dump Java HotSpot(TM) Server VM (14.2-b01 mixed mode): "OpenStreetBugs download loop" prio=10 tid=0x081d7c00 nid=0x4f68 sleeping[0x6dc15000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at org.openstreetmap.josm.plugins.osb.OsbDownloadLoop.run(OsbDownloadLoop.java:93) "Map Status Collector" daemon prio=10 tid=0x08a0f400 nid=0x4f67 in Object.wait() [0x6dbc4000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x7a325740> (a org.openstreetmap.josm.gui.MapStatus$Collector) at java.lang.Object.wait(Object.java:485) at org.openstreetmap.josm.gui.MapStatus$Collector.run(MapStatus.java:147) - locked <0x7a325740> (a org.openstreetmap.josm.gui.MapStatus$Collector) at java.lang.Thread.run(Thread.java:619) "pool-1-thread-1" prio=10 tid=0x08819800 nid=0x4f63 waiting on condition [0x6f1a6000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x741a7ff0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) "DestroyJavaVM" prio=10 tid=0x6eef5400 nid=0x4f3f waiting on condition [0x00000000] java.lang.Thread.State: RUNNABLE "RemoteControl HTTP Server" daemon prio=10 tid=0x6ebef000 nid=0x4f56 runnable [0x6f0f9000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390) - locked <0x746fdf80> (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.openstreetmap.josm.plugins.remotecontrol.HttpServer.run(HttpServer.java:51) "AWT-EventQueue-0" prio=10 tid=0x6ea89000 nid=0x4f55 runnable [0x6f0a7000] java.lang.Thread.State: RUNNABLE at org.openstreetmap.josm.data.osm.Node.visit(Node.java:83) at org.openstreetmap.josm.data.osm.OsmPrimitive.hashCode(OsmPrimitive.java:486) at java.util.HashMap.getEntry(HashMap.java:344) at java.util.HashMap.containsKey(HashMap.java:335) at org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor.makeLookupTable(CollectBackReferencesVisitor.java:57) at org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor.<init>(CollectBackReferencesVisitor.java:51) at org.openstreetmap.josm.command.DeleteCommand.delete(DeleteCommand.java:308) at org.openstreetmap.josm.actions.mapmode.DeleteAction.buildDeleteCommands(DeleteAction.java:338) at org.openstreetmap.josm.actions.mapmode.DeleteAction.updateCursor(DeleteAction.java:184) at org.openstreetmap.josm.actions.mapmode.DeleteAction.eventDispatched(DeleteAction.java:376) at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2353) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2245) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2244) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2244) at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2203) at java.awt.Component.dispatchEventImpl(Component.java:4528) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668) at java.awt.Component.dispatchEventImpl(Component.java:4502) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178) at java.awt.Dialog$1.run(Dialog.java:1045) at java.awt.Dialog$3.run(Dialog.java:1097) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1095) at java.awt.Component.show(Component.java:1563) at java.awt.Component.setVisible(Component.java:1515) at java.awt.Window.setVisible(Window.java:841) at java.awt.Dialog.setVisible(Dialog.java:985) at org.openstreetmap.josm.gui.io.UploadDialog.setVisible(UploadDialog.java:404) at org.openstreetmap.josm.actions.upload.UploadParameterHook.checkUpload(UploadParameterHook.java:12) at org.openstreetmap.josm.actions.UploadAction.checkPreUploadConditions(UploadAction.java:148) at org.openstreetmap.josm.actions.UploadAction.actionPerformed(UploadAction.java:177) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636) at javax.swing.JComponent.processKeyBinding(JComponent.java:2851) at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267) at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216) at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2928) at javax.swing.JComponent.processKeyBindings(JComponent.java:2920) at javax.swing.JComponent.processKeyEvent(JComponent.java:2814) at java.awt.Component.processEvent(Component.java:6040) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668) at java.awt.Component.dispatchEventImpl(Component.java:4502) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) "AWT-Shutdown" prio=10 tid=0x6ea88c00 nid=0x4f54 in Object.wait() [0x6efa3000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x740f5f98> (a java.lang.Object) at java.lang.Object.wait(Object.java:485) at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259) - locked <0x740f5f98> (a java.lang.Object) at java.lang.Thread.run(Thread.java:619) "TimerQueue" daemon prio=10 tid=0x083f4000 nid=0x4f52 in Object.wait() [0x6f057000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x742dce80> (a javax.swing.TimerQueue) at javax.swing.TimerQueue.run(TimerQueue.java:236) - locked <0x742dce80> (a javax.swing.TimerQueue) at java.lang.Thread.run(Thread.java:619) "AWT-XAWT" daemon prio=10 tid=0x082bcc00 nid=0x4f4b runnable [0x6f1f7000] java.lang.Thread.State: RUNNABLE at sun.awt.X11.XToolkit.waitForEvents(Native Method) at sun.awt.X11.XToolkit.run(XToolkit.java:548) at sun.awt.X11.XToolkit.run(XToolkit.java:523) at java.lang.Thread.run(Thread.java:619) "Java2D Disposer" daemon prio=10 tid=0x081f5400 nid=0x4f4a in Object.wait() [0x6f27a000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x740fdb70> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118) - locked <0x740fdb70> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134) at sun.java2d.Disposer.run(Disposer.java:125) at java.lang.Thread.run(Thread.java:619) "Low Memory Detector" daemon prio=10 tid=0x08136400 nid=0x4f48 runnable [0x00000000] java.lang.Thread.State: RUNNABLE "CompilerThread1" daemon prio=10 tid=0x08134800 nid=0x4f47 waiting on condition [0x00000000] java.lang.Thread.State: RUNNABLE "CompilerThread0" daemon prio=10 tid=0x08131800 nid=0x4f46 waiting on condition [0x00000000] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" daemon prio=10 tid=0x08130000 nid=0x4f45 waiting on condition [0x00000000] java.lang.Thread.State: RUNNABLE "Finalizer" daemon prio=10 tid=0x0811fc00 nid=0x4f44 in Object.wait() [0x6f817000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x740ff480> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118) - locked <0x740ff480> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) "Reference Handler" daemon prio=10 tid=0x0811b400 nid=0x4f43 in Object.wait() [0x6f868000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x740ff4a0> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:485) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) - locked <0x740ff4a0> (a java.lang.ref.Reference$Lock) "VM Thread" prio=10 tid=0x08117400 nid=0x4f42 runnable "GC task thread#0 (ParallelGC)" prio=10 tid=0x080a1800 nid=0x4f40 runnable "GC task thread#1 (ParallelGC)" prio=10 tid=0x080a3000 nid=0x4f41 runnable "VM Periodic Task Thread" prio=10 tid=0x08138400 nid=0x4f49 waiting on condition JNI global references: 7662 Heap PSYoungGen total 82688K, used 37929K [0xacf20000, 0xb40d0000, 0xb40e0000) eden space 49408K, 19% used [0xacf20000,0xad896538,0xaff60000) from space 33280K, 84% used [0xaff60000,0xb1af4010,0xb1fe0000) to space 33088K, 0% used [0xb2080000,0xb2080000,0xb40d0000) PSOldGen total 790528K, used 236629K [0x740e0000, 0xa44e0000, 0xacf20000) object space 790528K, 29% used [0x740e0000,0x827f5530,0xa44e0000) PSPermGen total 29056K, used 28834K [0x700e0000, 0x71d40000, 0x740e0000) object space 29056K, 99% used [0x700e0000,0x71d08b70,0x71d40000)
Attachments (0)
Change History (5)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Summary: | High CPU usage when trying to upload a changeset → High CPU usage when uploading whilst in deletion mode |
---|
Confirmed. When I'm in selection mode and try to upload things are very snappy, but doing the same thing in deletion mode with the mouse hovering over the upload dialog (not the data) sends JOSM into 25-90% CPU and the upload textbox can take up to 30 seconds to respond to input.
I understand that JOSM is very slow with big datasets in deletion mode currently but regardless of that it shouldn't be doing any dataset processing when I have the upload dialog in the foreground and not the editing window.
Even if the backend were faster this bug suggests that JOSM would still be doing completely unrequired work when uploading.
follow-up: 4 comment:3 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
Stil an issue or fixed inbetween?
comment:4 by , 15 years ago
Replying to stoecker:
Stil an issue or fixed inbetween?
I haven't noticed it recently. But I don't know whether that's because deletion mode got faster or because it's not doing work in the background anymore.
comment:5 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | needinfo → closed |
There have been so many changes, reopen when happening again.
JOSM is very slow when you work with big datasets in Delete mode. That's one of the things that will get fixed by introducings referrers. Otherwise the stacktrace looks ok to me.