Modify

Opened 8 years ago

Closed 7 years ago

#15151 closed defect (fixed)

Very slow and high CPU usage after restarting

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: ipv6 restart performance Cc:

Description

It's not the first time that I see this happening: JOSM tries to detect a valid IPv6 connection, fails and then restarts to use an IPv4 mode only; this is usually fine, except that sometimes JOSM restarts and gets very laggy (even to click on the File menu) + I can see it using 25~47% of CPU time.

jstack output:

2017-08-14 09:14:48
Full thread dump OpenJDK 64-Bit Server VM (25.141-b15 mixed mode):

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

   Locked ownable synchronizers:
	- None

"DestroyJavaVM" #49 prio=5 os_prio=0 tid=0x00007f2cdc00a000 nid=0x3685 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
	- None

"message-notifier-0" #48 prio=5 os_prio=0 tid=0x00007f2cdcb0d000 nid=0x3720 waiting on condition [0x00007f2c37efd000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x000000075a849dc0> (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:1074)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- None

"RemoteControl HTTPS Server" #45 daemon prio=5 os_prio=0 tid=0x00007f2cdce88800 nid=0x371d runnable [0x00007f2c543ea000]
   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:402)

   Locked ownable synchronizers:
	- None

"RemoteControl HTTPS Server" #43 daemon prio=5 os_prio=0 tid=0x00007f2cdcaf7800 nid=0x371c runnable [0x00007f2c544eb000]
   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:402)

   Locked ownable synchronizers:
	- None

"Timer-0" #44 daemon prio=6 os_prio=0 tid=0x00007f2c60125800 nid=0x371b in Object.wait() [0x00007f2c545ec000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000075a86da58> (a java.util.TaskQueue)
	at java.util.TimerThread.mainLoop(Timer.java:552)
	- locked <0x000000075a86da58> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:505)

   Locked ownable synchronizers:
	- None

"RemoteControl HTTP Server" #42 daemon prio=5 os_prio=0 tid=0x00007f2cdcaf1800 nid=0x371a runnable [0x00007f2c546ed000]
   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:103)

   Locked ownable synchronizers:
	- None

"RemoteControl HTTP Server" #41 daemon prio=5 os_prio=0 tid=0x00007f2cdcaf0800 nid=0x3719 runnable [0x00007f2c550ef000]
   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:103)

   Locked ownable synchronizers:
	- None

"pool-1-thread-1" #38 prio=5 os_prio=0 tid=0x00007f2c3c004800 nid=0x36f8 waiting on condition [0x00007f2c54fee000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x0000000605684580> (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:1074)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- None

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

   Locked ownable synchronizers:
	- None

"GT authority factory disposer" #35 daemon prio=5 os_prio=0 tid=0x00007f2cdca83000 nid=0x36f2 in Object.wait() [0x00007f2c577fc000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0000000604a39718> (a java.util.TaskQueue)
	at java.util.TimerThread.mainLoop(Timer.java:552)
	- locked <0x0000000604a39718> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:505)

   Locked ownable synchronizers:
	- None

"JCS-ElementEventQueue-Thread-5" #32 daemon prio=5 os_prio=0 tid=0x00007f2c4815f000 nid=0x36df waiting on condition [0x00007f2c57efd000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x0000000604c11a48> (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:1074)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- None

"image-fetcher-0" #30 prio=5 os_prio=0 tid=0x00007f2c5c08a000 nid=0x36d1 waiting on condition [0x00007f2c576fb000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x0000000600782b20> (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:1074)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- None

"Weak reference cleaner" #22 prio=5 os_prio=0 tid=0x00007f2cdc7ac000 nid=0x36c7 in Object.wait() [0x00007f2ca5806000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0000000601c57ef8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
	- locked <0x0000000601c57ef8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
	at org.openstreetmap.josm.tools.ListenableWeakReference.clean(ListenableWeakReference.java:61)
	at org.openstreetmap.josm.tools.ListenableWeakReference$$Lambda$77/1030684756.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- None

"File Watcher" #11 prio=5 os_prio=0 tid=0x00007f2cdc707800 nid=0x36c6 waiting on condition [0x00007f2ca5dfe000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x0000000600e95cd0> (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:114)
	at org.openstreetmap.josm.io.FileWatcher$$Lambda$4/1147985808.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- None

"TimerQueue" #21 daemon prio=5 os_prio=0 tid=0x00007f2c60079800 nid=0x36c5 waiting on condition [0x00007f2cb9160000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000006013c88b0> (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:174)
	at java.lang.Thread.run(Thread.java:748)

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

"AWT-EventQueue-0" #18 prio=6 os_prio=0 tid=0x00007f2cdc669800 nid=0x369e waiting on condition [0x00007f2ca4be0000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000006006cff88> (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.awt.EventQueue.getNextEvent(EventQueue.java:554)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:170)
	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)

   Locked ownable synchronizers:
	- None

"AWT-Shutdown" #19 prio=5 os_prio=0 tid=0x00007f2cdc668000 nid=0x369d in Object.wait() [0x00007f2ca4ce1000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000006007fdfc8> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:502)
	at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:295)
	- locked <0x00000006007fdfc8> (a java.lang.Object)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- None

"AWT-XAWT" #17 daemon prio=6 os_prio=0 tid=0x00007f2cdc6a7000 nid=0x369c runnable [0x00007f2ca4fe2000]
   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:748)

   Locked ownable synchronizers:
	- None

"Java2D Disposer" #14 daemon prio=10 os_prio=0 tid=0x00007f2cdc606000 nid=0x369b in Object.wait() [0x00007f2cb8308000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000006007fe480> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
	- locked <0x00000006007fe480> (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:748)

   Locked ownable synchronizers:
	- None

"Thread-1" #10 daemon prio=5 os_prio=0 tid=0x00007f2cdc4e0000 nid=0x3693 runnable [0x00007f2cbadac000]
   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:748)

   Locked ownable synchronizers:
	- None

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

   Locked ownable synchronizers:
	- None

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

   Locked ownable synchronizers:
	- None

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

   Locked ownable synchronizers:
	- None

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

   Locked ownable synchronizers:
	- None

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

   Locked ownable synchronizers:
	- None

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f2cdc267000 nid=0x368c in Object.wait() [0x00007f2cbbdfc000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000006007ffb08> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
	- locked <0x00000006007ffb08> (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)

   Locked ownable synchronizers:
	- None

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

   Locked ownable synchronizers:
	- None

"VM Thread" os_prio=0 tid=0x00007f2cdc25a800 nid=0x368a runnable 

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007f2cdc01f000 nid=0x3686 runnable 

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007f2cdc021000 nid=0x3687 runnable 

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00007f2cdc022800 nid=0x3688 runnable 

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00007f2cdc024800 nid=0x3689 runnable 

"VM Periodic Task Thread" os_prio=0 tid=0x00007f2cdc2a7000 nid=0x3692 waiting on condition 

JNI global references: 7408

With visualvm's CPU profiling I can't see anything.

How can I help in debugging this, please?

JOSM:

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-08-13 19:54:54 +0200 (Sun, 13 Aug 2017)
Build-Date:2017-08-14 01:35:37
Revision:12598
Relative:URL: ^/trunk

Identification: JOSM/1.5 (12598 pt_BR) Linux Debian GNU/Linux testing (buster)
Memory Usage: 917 MB / 6372 MB (532 MB allocated, but free)
Java version: 1.8.0_141-8u141-b15-3-b15, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900, :0.1 1280x1024
Maximum Screen Size: 1600x1024
Java package: openjdk-8-jre:amd64-8u141-b15-3
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13
VM arguments: [-Dawt.useSystemAAFontSettings=on]

Plugins:
+ Create_grid_of_ways (32699)
+ FastDraw (33182)
+ ImportImagePlugin (33372)
+ OpeningHoursEditor (33185)
+ PicLayer (33385)
+ RoadSigns (33204)
+ SimplifyArea (33004)
+ apache-commons (32994)
+ buildings_tools (33004)
+ conflation (0.5.4)
+ contourmerge (1030)
+ download_along (32946)
+ editgpx (33004)
+ ejml (32680)
+ geojson (52)
+ geotools (33380)
+ importvec (33088)
+ indoorhelper (33088)
+ jts (32699)
+ log4j (32699)
+ measurement (33088)
+ merge-overlap (33436)
+ opendata (33438)
+ pbf (33241)
+ pdfimport (33004)
+ poly (33004)
+ reverter (33088)
+ scripting (30768)
+ tageditor (33021)
+ todo (30200)
+ turnlanes (33294)
+ turnlanes-tagging (254)
+ turnrestrictions (33088)
+ undelete (33480)
+ utilsplugin2 (33328)

Attachments (0)

Change History (10)

comment:1 by Don-vip, 8 years ago

How do you launch JOSM? At restart, JOSM tries to keep the same command-line parameters, but maybe something is not kept after restart, like the amount of allowed memory? Can you please check if these values in status report are the same before and after restart:

Memory Usage: xxx
VM arguments: xxx

comment:2 by stoecker, 8 years ago

Owner: changed from team to naoliv
Status: newneedinfo

Another question: Do you switch between IPv4 only and IPv6 enabled networks or why is JOSM restarted at all?

comment:3 by naoliv, 8 years ago

It seems that JOSM somehow fails too fast in detecting a valid IPv6 network.
Maybe the timeout is too low?
I don't see any kind of problem with any other application on this machine.

Sometimes it properly detects a useable IPv6 network, sometimes don't (it failed right now, for example):

$ josm --language=en
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Xms256M -Xmx7g
2017-08-15 09:43:27.028 INFORMAÇÕES: Log level is at INFORMAÇÕES (INFO, 800)
2017-08-15 09:43:29.481 INFO: Detected no useable IPv6 network, prefering IPv4 over IPv6 after next restart.
2017-08-15 09:43:32.616 INFO: Restart [/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java, -Dawt.useSystemAAFontSettings=on, -Xms256M, -Xmx7g, -jar, /home/naoliv/josm/josm-latest.jar, --language=en]

josm is only a script where I export _JAVA_OPTIONS and then call java -jar ~/josm/josm-latest.jar "$@"

In status after this restart:

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-08-15 01:29:35 +0200 (Tue, 15 Aug 2017)
Build-Date:2017-08-15 01:34:39
Revision:12606
Relative:URL: ^/trunk

Identification: JOSM/1.5 (12606 en) Linux Debian GNU/Linux testing (buster)
Memory Usage: 1403 MB / 6372 MB (1130 MB allocated, but free)
Java version: 1.8.0_141-8u141-b15-3-b15, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900, :0.1 1280x1024
Maximum Screen Size: 1600x1024
Java package: openjdk-8-jre:amd64-8u141-b15-3
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13
VM arguments: [-Dawt.useSystemAAFontSettings=on, -Dawt.useSystemAAFontSettings=on]
Program arguments: [--language=en]

Maybe this double -Dawt.useSystemAAFontSettings=on could be causing this slowness?

in reply to:  3 comment:4 by stoecker, 8 years ago

Replying to naoliv:

It seems that JOSM somehow fails too fast in detecting a valid IPv6 network.

That can be possible. The IPv6 detection is a bit fragile (because of bad dual stack support in Java) and tries to be conservative. If not sure it assumes IPv4 only. Still my hope that Java will fix this has not yet been fulfilled.

Still the question remains why it is slow. Maybe it is already slow before the restart - which also would explain why the IPV6 detection fails?

An issue could be external presets/styles/icons/... which overdid their refresh time and now cause a major lag? I have the feeling there is a bug in josm which under certain conditions causes delay instead of aborting the unsuccessful loading.

comment:5 by Don-vip, 8 years ago

Keywords: ipv6 restart performance added

in reply to:  3 comment:6 by Don-vip, 8 years ago

Replying to naoliv:

Maybe this double -Dawt.useSystemAAFontSettings=on could be causing this slowness?

It's definitively strange. If you launch JOSM via a script, can you please try to modify it so that it becomes responsible of the restart? You have to add the parameter -Djosm.restart=true and catch the return code 9, see 7275#comment:10

comment:7 by naoliv, 8 years ago

Testing with export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dawt.useSystemAAFontSettings=on" doesn't cause any slowness.

Using

    while true; do
        $JAVACMD $JAVA_OPTS -jar /home/naoliv/josm/josm-latest.jar "$@"
        if [ "z$?" != "z9" ]; then
            break
        fi
        echo ">> restarting josm..."
    done

works too (without any slowness; but JOSM isn't actually restarting here (we are just running it again)).

It seems that the problem happens when JOSM restarts itself.
Thinking about this I started JOSM without -Djosm.restart=true, went to File → Restart and could confirm that it gets slow too (it's reproducible, no matter if it detects or not an useable IPv6 connection)

Is there anything else that I can test, please?

comment:8 by Don-vip, 8 years ago

Owner: changed from naoliv to team
Status: needinfonew

comment:9 by Don-vip, 7 years ago

Can you please check if this issue remains after r13729?

comment:10 by naoliv, 7 years ago

Resolution: fixed
Status: newclosed

It seems fine now, thanks!

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.