Modify

Opened 2 months ago

Last modified 2 months ago

#17326 new defect

Cached capabilities somehow cause socket timeout / Handling of missing(?) entries in existing preferences

Reported by: anonymous Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc: wiktorn

Description

Sorry for two titles: I came because I had a bug that was probably some issue with cached data on my machine so not very interesting. But during debugging I found that the handling of (probably missing) config values and cached values in preferences.xml was giving me an especially hard time finding this issue. So I want to suggest improving the handling here instead of focusing on the specific cause for the socket timeout:

---

I've been hunting reproducible (on my machine) socket timeouts:

...
INFO: GET https://api.openstreetmap.org/api/0.6/user/details -> !!!
WARNING: java.net.SocketTimeoutException: connect timed out
...

I figured that deleting my preferences and restarting fixed this timeout. So that made me diff the default preferences with my file and it boiled down to the cache.capabilities1637351842 entry:
In the newly generated file:

<tag key='cache.capabilities1637351842' value='1550012254'/>

The old value in my file was:

<tag key='cache.capabilities1637351842' value='1535475470'/>

By changing this one line I can reproduce the socket timeout every time.

I do not know what these values mean, but I accept that there might be something wrong with the value I had in my configuration. The problem is that simply deleting the line did not help either. It was not recreated and it did not cause any other (visible) error than the socket timeout I already had before. I would have expected that this value would be recreated in the file if it was necessary. Instead I had to copy that line from a pristine preferences.xml into mine to make a connection error go away.

In general it seems that preferences.xml is a mixture of actual preferences and cached values. Separating these in two files would have allowed me to simply delete the cache and keep all my settings (ie. mostly servers and credentials) without manually diffing the files to get rid of that socket timeout.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-02-10 16:03:37 +0100 (Sun, 10 Feb 2019)
Revision:14779
Build-Date:2019-02-11 02:30:49
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (14779 en) Linux Ubuntu 18.04.2 LTS
Memory Usage: 389 MB / 4008 MB (192 MB allocated, but free)
Java version: 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080, :0.1 1920x1080
Maximum Screen Size: 1920x1080
Java package: openjdk-11-jre:-
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-20ubuntu0.1
VM arguments: [-Djosm.restart=true, -Djosm.dir.name=JOSM-latest, -Djava.net.useSystemProxies=true]

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (0)

Change History (1)

comment:1 Changed 2 months ago by Don-vip

Cc: wiktorn added

@wiktorn "cache" and "preferences" keywords make me think you have an idea about what to do here :)

Modify Ticket

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

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.