#7813 closed defect (fixed)
[Patch] JOSM often fails to download, and I cannot Cancel
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | 15.08 |
Component: | Core | Version: | latest |
Keywords: | josm download cancel | Cc: | jens@…, midibase@…, javnik36@… |
Description
When I try to Download from OSM, the process usually gets stuck at 16KB or 23KB. It goes for about a minute without downloading anything. Then, when I press Cancel, the program hangs up, I have to kill JOSM from Task Manager. This happens very frequently, I can say most of the time, but not always.
Version: 5210
OS: Windows
Attachments (3)
Change History (53)
comment:1 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
follow-up: 3 comment:2 by , 13 years ago
Hi,
I updated JOSM to latest a few days ago.
Status report:
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2012-06-04 01:31:02 Last Changed Author: simon04 Revision: 5267 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2012-06-03 22:21:06 +0200 (Sun, 03 Jun 2012) Last Changed Rev: 5267 Identification: JOSM/1.5 (5267 en) Memory Usage: 47 MB / 494 MB (25 MB allocated, but free) Java version: 1.7.0_05, Oracle Corporation, Java HotSpot(TM) Client VM Operating system: Windows 7 Plugin: openstreetbugs (28412) Plugin: turnrestrictions (28412)
I cleared the preferences and the problem still persists. It is not sensitive to the area.
comment:3 by , 13 years ago
+ I would like to add that I only tried to download Hungarian areas (all of which were quite small, so that should not be a problem). So it _might_ be sensitive to the area somehow, I can only say for sure that Hungarian areas fail to download for me, most of the time.
Replying to anonymous:
It is not sensitive to the area.
comment:5 by , 13 years ago
Cc: | added |
---|
comment:7 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
comment:8 by , 13 years ago
Cc: | added |
---|
comment:10 by , 13 years ago
Cc: | added |
---|
comment:11 by , 13 years ago
Priority: | normal → major |
---|
We have now 4 people complaining about this, and not a clue :(
comment:12 by , 13 years ago
Hi!
I want to repair my Josm and so i have done:
I went to the josm.exe properties then I have enabled compatibility mode with Win XP SP3 and apply. I run the Josm...and it works! JOSM normally download the OSM data, but why.....here is the question ;)
Maybe this helps...? (Sorry for my English :)
follow-up: 14 comment:13 by , 13 years ago
Latest josm-tested works perfectly with JRE6.0.33 but the bug appears with JRE7.0.5.
Tested with Windows 7 SP1 and JRE x64 JVMs.
follow-up: 15 comment:14 by , 13 years ago
Replying to anonymous:
the bug appears with JRE7.0.5.
Interesting. I see Java 7 update 4 introduced several huge changes (new JVM, GC, etc.). Is it possible for you to test with JRE7u3 ?
comment:15 by , 13 years ago
Replying to Don-vip:
Interesting. I see Java 7 update 4 introduced several huge changes (new JVM, GC, etc.). Is it possible for you to test with JRE7u3 ?
Tested with JRE7u3 and the new JRE7u6: same behaviour.
comment:17 by , 13 years ago
I have tested with new JOSM 5482 and new JRE7u7 and still the same behaviuor...
follow-up: 19 comment:18 by , 13 years ago
I am trying to get JOSM working to change items in my direct neighborhood. Downloading isn't working and I will get the same situation as described in this ticket. Downloading stops at 16kB and the only thing to do is kill the JOSM application with the task manager.
Hoping a solution/workaround is availabel soon
comment:19 by , 13 years ago
Replying to Witte22:
Hoping a solution/workaround is availabel soon.
As already mentioned a workaround is to use java 6 instead of java 7
EDT: or try comment:12
follow-up: 21 comment:20 by , 12 years ago
I went to State of the Map last weekend in Portland, so I'm excited to start working in OSM. I downloaded the jar file as indicated http://wiki.openstreetmap.org/wiki/JOSM/Guide and then tried to start on a little tiny town in the US, and I hang up exactly as described above. Help! I am completely new to OSM and JOSM.
follow-up: 22 comment:21 by , 12 years ago
Replying to heatherkcowley@…:
I went to State of the Map last weekend in Portland, so I'm excited to start working in OSM. I downloaded the jar file as indicated http://wiki.openstreetmap.org/wiki/JOSM/Guide and then tried to start on a little tiny town in the US, and I hang up exactly as described above. Help! I am completely new to OSM and JOSM.
Hi
Welcom to OSM !
This seems to be a problem with java 7 on windows. One solution is to use java 6. This has nothing to do with OSM and only little with JOSM.
Anyway, you probably get more help on the newbie mailing list or in the forum. This ticket system is definitly the wrong place to ask for help.
Cheers
follow-up: 23 comment:22 by , 12 years ago
Replying to skyper:
Replying to heatherkcowley@…:
I went to State of the Map last weekend in Portland, so I'm excited to start working in OSM. I downloaded the jar file as indicated http://wiki.openstreetmap.org/wiki/JOSM/Guide and then tried to start on a little tiny town in the US, and I hang up exactly as described above. Help! I am completely new to OSM and JOSM.
Hi
Welcom to OSM !
This seems to be a problem with java 7 on windows. One solution is to use java 6. This has nothing to do with OSM and only little with JOSM.
Anyway, you probably get more help on the newbie mailing list or in the forum. This ticket system is definitly the wrong place to ask for help.
Cheers
Where is the "Newbie mailing list" or the "forum"? I can't get JOSM to work, so I googled my problem and it matches this thread, so I don't understand the boot.
comment:23 by , 12 years ago
Replying to heatherkcowley@…:
Sorry, I did not intend to offend you but only was trying to give you a hint as this ticket is open for some time now and the problem is not found, yet. You are welcome to comment on tickets.
Where is the "Newbie mailing list" or the "forum"? I can't get JOSM to work, so I googled my problem and it matches this thread, so I don't understand the boot.
Have a look at the main page.
comment:24 by , 12 years ago
Maybe this bug has to deal with the 32-bit version of Java. I'm personally using the 64-bit and have had non of these downloading problems. So, if these people are using Windows 7 x64, they should install the x64 version of Java 7 to use with JOSM. It might fix their problems.
Too bad the "Operating system" line in the Status Report area doesn't list which version of Windows 7 they are running (x86 or x64). I wonder if that can be improved possibility in JOSM?
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2013-01-30 02:31:37 Last Changed Author: Don-vip Revision: 5692 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2013-01-30 02:25:13 +0100 (Wed, 30 Jan 2013) Last Changed Rev: 5692 Identification: JOSM/1.5 (5692 en) Memory Usage: 154 MB / 2730 MB (77 MB allocated, but free) Java version: 1.7.0_11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Operating system: Windows 7 Plugin: OpeningHoursEditor (29210) Plugin: buildings_tools (29210) Plugin: mapdust (29210) Plugin: measurement (29210) Plugin: mirrored_download (29210) Plugin: openstreetbugs (29210) Plugin: reverter (29216) Plugin: turnrestrictions (29210) Plugin: undelete (29210) Plugin: utilsplugin2 (29210)
comment:25 by , 11 years ago
Version: | latest → tested |
---|
comment:28 by , 11 years ago
Report same issue with Windows 7. Australia and latest version 6238. Never have had this issue before.
comment:29 by , 11 years ago
Also a problem on Linux with the history dialog when downloading the history, see 7326
comment:30 by , 10 years ago
I still have the problem. For me, the problem happens at around 10% of downloads. It's very annoying.
I did a thread dump when it happens and think it is caused by the OSM servers. See attached stacktraces:
- stacktrace1.txt: after the download stops progressing. Notice the thread pool-1-thread-1, which is stuck at
java.net.SocketInputStream.socketRead0
- stacktrace2.txt: after I click "Cancel": now the
AWT-EventQueue-0
thread is waiting to lock0x066f8da0
, which is held by thepool-1-thread-1
thread.
The probable culprit is, that the ChunkedInputStream.close()
method is synchronized and is waiting for the sockretRead to complete, but it never does (or maybe after very long time). If you closed the SSLSocket
instead, the Cancel functionality might work.
Another question is whether the OSM servers really fail that often. Maybe the problem is somewhere else, for example by trying to read after there are no more data in the socket. It would be worthwhile to look into the server logs. For example, I did following request today, that hung, no more than few minutes before 2015-05-05 05:23:27 GMT:
GET https://api.openstreetmap.org/api/0.6/map?bbox=17.8847122,48.7492849,17.892437,48.7721432
Hope this will help. Just a note, I'm using Windows 7, Java HotSpot SE Runtime Environment (build 1.8.0_40-b26) and latest JOSM.
by , 10 years ago
Attachment: | stacktrace1.txt added |
---|
by , 10 years ago
Attachment: | stacktrace2.txt added |
---|
follow-up: 33 comment:31 by , 10 years ago
I investigated the problem further. The Socket is internal to the HttpURLConnection, so you cannot close it. I reported a bug to the JDK.
Workaround could be to use a short timeout and just ignore the timeout exception and start the read again. This will make the cancel button work. I will investigate this possibility.
comment:32 by , 10 years ago
This is not easily possible, as the stream is read directly by the XML parser. Maybe we should be able to set timeout to about 20 seconds and if the OSM server stops sending data, we will wait and the download will fail. Or we should try to use third party library, such as apache HttpClient, but first we have to test if it does not have similar issue.
comment:33 by , 10 years ago
Replying to anirud:
I reported a bug to the JDK.
Thanks :) Can you please share the incident number here? (JI-XXXX)
comment:34 by , 10 years ago
It is JI-9021192, but AFAIK it's not to be found on the internet until it's approved under different number
comment:35 by , 10 years ago
Yesterday I got response from Oracle to the bug. It was someone with an Indian name and he asked for a test case, which I of course sent in the original report. This is my second bug to JDK and with same result. I think it is vain to wait for oracle.
I see two options now:
- implement timeout: JOSM will not hang forever, only for the duration of the timeout.
- use Apache HttpClient instead of java.net.HttpUrlConnection: I just tested cancelling from other another thread works.
comment:36 by , 10 years ago
I found out the timeout setting is already present under the key "socket.timeout.read" and "socket.timeout.connect", but it is not always honored. I will attach a patch to honor it during download. I tested it, and when the download hangs, it will fail with "read timed out". Then I just retry and it's ok. By the way, there are other places where setupURLConnection
is not called after openHttpConnection
.
by , 10 years ago
Attachment: | OsmServerReader.java.patch added |
---|
patch to honor socket.timeout.read setting
comment:37 by , 10 years ago
For reference: javabug:8081395
It's a shame how your bug report has been treated. I had some similar experience with the same person. It's usually better when American or Russian employees actually investigate the bug... We'll see to include your patch, thanks :)
comment:38 by , 10 years ago
Milestone: | → 15.06 |
---|---|
Summary: | JOSM often fails to download, and I cannot Cancel → [Patch] JOSM often fails to download, and I cannot Cancel |
follow-up: 43 comment:39 by , 10 years ago
How did you find that bug? I wasn't notified of it. Yes, that's my report.
That Pardeep Sharma was also assigned to my first JDK-bug, which was trivial to fix, and is not fixed until today and asked for test case, which was just one line of code :). They should fire him...
comment:40 by , 10 years ago
Closing this bug report as incomplete is not only a shame, but bloody brain damaged.
follow-up: 44 comment:41 by , 10 years ago
Is there a quality management for openJDK? For openSUSE when you got treated this way you could escalate a bug report into the quality management and somebody else reviewed if the bug handling person was doing right.
comment:42 by , 10 years ago
I don't know. I tried to contact Pardeep by email once more and asked him to reopen it.
comment:43 by , 10 years ago
Replying to anonymous:
How did you find that bug?
With the incident number you gave me :) Try this url: https://bugs.openjdk.java.net/browse/JI-9021192
comment:44 by , 10 years ago
Replying to stoecker:
Is there a quality management for openJDK? For openSUSE when you got treated this way you could escalate a bug report into the quality management and somebody else reviewed if the bug handling person was doing right.
This page details the life cycle of openjdk bugs. Incomplete basically means "not enough data to investigate", which is a pure joke in this case. At the end is said:
General questions about JBS can be sent to discuss@….
We should send a mail before the bug is closed.
comment:45 by , 10 years ago
Pardeep replied to my e-mail, he does not know to run the servlet, I'll try to help him.
comment:48 by , 10 years ago
This one is a duplicate of this, marked as fixed but not actually fixed: https://josm.openstreetmap.de/ticket/4216... Do you plan to apply my patch?
First of all, please try to update JOSM.
We need more information.
Thanks