Modify

Opened 3 years ago

Last modified 2 years ago

#21261 new defect

Command line option --status-report does not exit

Reported by: skyper Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: template_report command line status report regression Cc: simon04

Description

What steps will reproduce the problem?

  1. Run josm-latest --status-report in a terminal (Ubuntu package)

What is the expected result?

The status report is printed and the program exits

What happens instead?

The status report is printed but the program does not exit afterwards

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

I had to kill the program see thread dump below.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-08-26 16:42:55 +0200 (Thu, 26 Aug 2021)
Revision:18182
Build-Date:2021-08-27 01:31:01
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18182 en) Linux Debian GNU/Linux 11 (bullseye)
Java version: 17-ea+19-Debian-1, Debian, OpenJDK 64-Bit Server VM
Full thread dump OpenJDK 64-Bit Server VM (17-ea+19-Debian-1 mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x00007f650c001a40, length=14, elements={
0x00007f65681c4700, 0x00007f65681c5b60, 0x00007f65681cbd10, 0x00007f65681cd140,
0x00007f65681ce590, 0x00007f65681cffc0, 0x00007f65681d1570, 0x00007f65681d2a60,
0x00007f6568228780, 0x00007f656829f2d0, 0x00007f6568505bd0, 0x00007f6568507080,
0x00007f65685f22a0, 0x00007f6568014b90
}

"Reference Handler" #2 daemon prio=10 os_prio=0 cpu=0,95ms elapsed=243,00s tid=0x00007f65681c4700 nid=0x3305 waiting on condition  [0x00007f654caf3000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.ref.Reference.waitForReferencePendingList(java.base@17-ea/Native Method)
	at java.lang.ref.Reference.processPendingReferences(java.base@17-ea/Reference.java:253)
	at java.lang.ref.Reference$ReferenceHandler.run(java.base@17-ea/Reference.java:215)

"Finalizer" #3 daemon prio=8 os_prio=0 cpu=0,44ms elapsed=243,00s tid=0x00007f65681c5b60 nid=0x3306 in Object.wait()  [0x00007f654c9f2000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@17-ea/Native Method)
	- waiting on <0x00000000d10f20e8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@17-ea/ReferenceQueue.java:155)
	- locked <0x00000000d10f20e8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@17-ea/ReferenceQueue.java:176)
	at java.lang.ref.Finalizer$FinalizerThread.run(java.base@17-ea/Finalizer.java:171)

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 cpu=0,29ms elapsed=242,89s tid=0x00007f65681cbd10 nid=0x3307 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #5 daemon prio=9 os_prio=0 cpu=0,41ms elapsed=242,89s tid=0x00007f65681cd140 nid=0x3308 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Monitor Deflation Thread" #6 daemon prio=9 os_prio=0 cpu=13,45ms elapsed=242,89s tid=0x00007f65681ce590 nid=0x3309 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #7 daemon prio=9 os_prio=0 cpu=2545,76ms elapsed=242,89s tid=0x00007f65681cffc0 nid=0x330a waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"C1 CompilerThread0" #9 daemon prio=9 os_prio=0 cpu=1188,93ms elapsed=242,89s tid=0x00007f65681d1570 nid=0x330b waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Sweeper thread" #10 daemon prio=9 os_prio=0 cpu=0,08ms elapsed=242,89s tid=0x00007f65681d2a60 nid=0x330c runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #11 daemon prio=8 os_prio=0 cpu=1,53ms elapsed=242,39s tid=0x00007f6568228780 nid=0x330d in Object.wait()  [0x00007f65373fe000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(java.base@17-ea/Native Method)
	- waiting on <0x00000000d10f22f8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@17-ea/ReferenceQueue.java:155)
	- locked <0x00000000d10f22f8> (a java.lang.ref.ReferenceQueue$Lock)
	at jdk.internal.ref.CleanerImpl.run(java.base@17-ea/CleanerImpl.java:140)
	at java.lang.Thread.run(java.base@17-ea/Thread.java:831)
	at jdk.internal.misc.InnocuousThread.run(java.base@17-ea/InnocuousThread.java:161)

"Notification Thread" #12 daemon prio=9 os_prio=0 cpu=0,13ms elapsed=241,66s tid=0x00007f656829f2d0 nid=0x330f runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Java2D Disposer" #16 daemon prio=10 os_prio=0 cpu=0,19ms elapsed=235,42s tid=0x00007f6568505bd0 nid=0x331b in Object.wait()  [0x00007f65372fd000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@17-ea/Native Method)
	- waiting on <0x00000000d3a0de88> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@17-ea/ReferenceQueue.java:155)
	- locked <0x00000000d3a0de88> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@17-ea/ReferenceQueue.java:176)
	at sun.java2d.Disposer.run(java.desktop@17-ea/Disposer.java:144)
	at java.lang.Thread.run(java.base@17-ea/Thread.java:831)

"AWT-XAWT" #17 daemon prio=6 os_prio=0 cpu=59,86ms elapsed=235,41s tid=0x00007f6568507080 nid=0x331c runnable  [0x00007f65357cd000]
   java.lang.Thread.State: RUNNABLE
	at sun.awt.X11.XToolkit.waitForEvents(java.desktop@17-ea/Native Method)
	at sun.awt.X11.XToolkit.run(java.desktop@17-ea/XToolkit.java:679)
	at sun.awt.X11.XToolkit.run(java.desktop@17-ea/XToolkit.java:643)
	at java.lang.Thread.run(java.base@17-ea/Thread.java:831)

"Weak reference cleaner" #18 prio=5 os_prio=0 cpu=0,23ms elapsed=233,37s tid=0x00007f65685f22a0 nid=0x332d in Object.wait()  [0x00007f65353c0000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@17-ea/Native Method)
	- waiting on <0x00000000d3333988> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@17-ea/ReferenceQueue.java:155)
	- locked <0x00000000d3333988> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@17-ea/ReferenceQueue.java:176)
	at org.openstreetmap.josm.tools.ListenableWeakReference.clean(ListenableWeakReference.java:60)
	at org.openstreetmap.josm.tools.ListenableWeakReference$$Lambda$265/0x0000000801192000.run(Unknown Source)
	at java.lang.Thread.run(java.base@17-ea/Thread.java:831)

"DestroyJavaVM" #19 prio=5 os_prio=0 cpu=2715,21ms elapsed=233,25s tid=0x00007f6568014b90 nid=0x32fe waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"VM Thread" os_prio=0 cpu=20,63ms elapsed=243,18s tid=0x00007f65681c0610 nid=0x3304 runnable  

"GC Thread#0" os_prio=0 cpu=63,00ms elapsed=244,82s tid=0x00007f656803f160 nid=0x32ff runnable  

"GC Thread#1" os_prio=0 cpu=30,94ms elapsed=241,49s tid=0x00007f6530004550 nid=0x3311 runnable  

"GC Thread#2" os_prio=0 cpu=19,84ms elapsed=239,26s tid=0x00007f6530005a40 nid=0x3314 runnable  

"GC Thread#3" os_prio=0 cpu=0,52ms elapsed=236,78s tid=0x00007f6530007790 nid=0x331a runnable  

"G1 Main Marker" os_prio=0 cpu=0,10ms elapsed=244,82s tid=0x00007f65680467a0 nid=0x3300 runnable  

"G1 Conc#0" os_prio=0 cpu=0,06ms elapsed=244,82s tid=0x00007f65680477d0 nid=0x3301 runnable  

"G1 Refine#0" os_prio=0 cpu=8,94ms elapsed=244,82s tid=0x00007f6568081580 nid=0x3302 runnable  

"G1 Refine#1" os_prio=0 cpu=0,11ms elapsed=239,26s tid=0x00007f6538000d10 nid=0x3315 runnable  

"G1 Service" os_prio=0 cpu=79,95ms elapsed=244,82s tid=0x00007f6568082530 nid=0x3303 runnable  

"VM Periodic Task Thread" os_prio=0 cpu=244,40ms elapsed=241,66s tid=0x00007f65682a11a0 nid=0x3310 waiting on condition  

JNI global refs: 69, weak refs: 0

Heap
 garbage-first heap   total 65536K, used 38881K [0x00000000d0000000, 0x0000000100000000)
  region size 1024K, 15 young (15360K), 4 survivors (4096K)
 Metaspace       used 14812K, committed 15040K, reserved 1064960K
  class space    used 1598K, committed 1728K, reserved 1048576K

Attachments (0)

Change History (2)

comment:1 by Don-vip, 3 years ago

Cc: simon04 added
Keywords: regression added

It's a regression from r17751 which causes this call:

	org.openstreetmap.josm.tools.ListenableWeakReference<T>.ensureQueueStarted() line: 52	
	org.openstreetmap.josm.data.preferences.AbstractProperty$WeakPreferenceAdapter(org.openstreetmap.josm.tools.ListenableWeakReference<T>).<init>(T, java.lang.Runnable) line: 39	
	org.openstreetmap.josm.data.preferences.AbstractProperty$WeakPreferenceAdapter(org.openstreetmap.josm.tools.ListenableWeakReference<T>).<init>(T) line: 28	
	org.openstreetmap.josm.data.preferences.AbstractProperty$WeakPreferenceAdapter.<init>(org.openstreetmap.josm.data.preferences.AbstractProperty.ValueChangeListener<? super T>) line: 282	
	org.openstreetmap.josm.data.preferences.CachingProperty<T>(org.openstreetmap.josm.data.preferences.AbstractProperty<T>).addWeakListener(org.openstreetmap.josm.data.preferences.AbstractProperty.ValueChangeListener<? super T>) line: 266	
	org.openstreetmap.josm.data.preferences.CachingProperty<T>.<init>(org.openstreetmap.josm.data.preferences.AbstractProperty<T>) line: 27	
	org.openstreetmap.josm.data.preferences.BooleanProperty(org.openstreetmap.josm.data.preferences.AbstractProperty<T>).cached() line: 239	
	org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.<clinit>() line: 69	
	org.openstreetmap.josm.data.preferences.sources.ValidatorPrefHelper.<init>() line: 63	
	org.openstreetmap.josm.data.preferences.sources.ValidatorPrefHelper.<clinit>() line: 24	
	org.openstreetmap.josm.actions.ShowStatusReportAction.getReportHeader() line: 234	
	org.openstreetmap.josm.gui.MainApplication.mainJOSM(org.openstreetmap.josm.gui.ProgramArguments) line: 803	
	org.openstreetmap.josm.gui.MainApplication$3.processArguments(java.lang.String[]) line: 281	
	org.openstreetmap.josm.gui.MainApplication.main(java.lang.String[]) line: 739	

And then the "Weak reference cleaner" thread blocks forever. I'm not sure what would be the better fix.

comment:2 by taylor.smock, 2 years ago

Stupid question: why wouldn't something like

  • src/org/openstreetmap/josm/gui/MainApplication.java

    diff --git a/src/org/openstreetmap/josm/gui/MainApplication.java b/src/org/openstreetmap/josm/gui/MainApplication.java
    a b  
    804804            Preferences.main().enableSaveOnPut(false);
    805805            Preferences.main().init(false);
    806806            System.out.println(ShowStatusReportAction.getReportHeader());
    807             return;
     807            Lifecycle.exitJosm(true, 0);
     808            return; // We should never hit this
    808809        } else if (args.showHelp()) {
    809810            showHelp();
    810811            return;

work?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to skyper.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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