Opened 9 minutes ago
#25150 new defect
Remote control: an idle connection blocks all other requests
| Reported by: | VeeBack02 | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core remotecontrol | Version: | |
| Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Start JOSM with remote control enabled.
- Open a TCP connection to the remote control port and send nothing, e.g.
nc 127.0.0.1 8111(leave it open). - In another terminal, send any request:
curl http://127.0.0.1:8111/version
What is the expected result?
The /version request is answered immediately, regardless of other open connections.
What happens instead?
The request hangs until the idle connection from step 2 is closed. All other remote control requests are blocked in the same way.
In practice this is triggered by web browsers: Chrome opens extra connections to localhost:8111 that never carry a request and only closes them after about 60 seconds. During that time every remote control call from any client stalls, so remote control seems randomly slow.
Please provide any additional information below. Attach a screenshot if possible.
RequestProcessor.run() takes ORDER_LOCK before reading the request from the socket. A connection that never sends anything therefore holds the lock while its thread waits in readLine(), and every later request queues behind it.
The attached patch only takes the lock around callHandler(), after the request line and headers have been read. Commands are still executed in the order in which they are received, but can no longer block other requests.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2026-11-26 22:24:37 +0100 (Thu, 26 Nov 2026) Revision:19707 Build-Date:2026-11-27 02:30:40 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (19707 en_GB) Windows 11 64-Bit OS Build number: Windows 10 Home 26H2 (26300) Memory Usage: 4078 MB / 4078 MB (449 MB allocated, but free) Java version: 21.0.13.0.3+1-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920x1080x32bpp@60Hz (scaling 1.00×1.00) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: Cp1252 Locale info: en_GB Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Dicedtea-web.bin.location=C:\Program Files\OpenWebStart\javaws, -Djdk.http.auth.tunneling.disabledSchemes=, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djava.security.manager=allow] Dataset consistency test: No problems found Plugins: + FastDraw (36503) + Mapillary (1822) + PicLayer (275) + apache-commons (36483) + areaselector (372) + austriaaddresshelper (107) + buildingcleanup (1.1.0) + buildings_tools (36503) + conflation (280) + ejml (36483) + gridify (61) + jts (36483) + lantmateriet-addresses (1.0.0) + log4j (36483) + mapwithai + panoramax (8) + parking-capacity (1.0.0) + pmtiles (36503) + reverter (36503) + terracer (36503) + urbaneye3d (2.9.3) + utilsplugin2 (36503) Tagging presets: + https://cdn.jsdelivr.net/npm/name-suggestion-index@latest/dist/presets/nsi-josm-presets.min.xml Map paint styles: + https://raw.githubusercontent.com/Yukiroshi/Clean-JOSM/refs/heads/main/Clean-JOSM.mapcss + https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1 Last errors/warnings: - 254382.017 W: Not downloading all tiles because there are more than 40 tiles on an axis! - 254382.017 W: Not downloading all tiles because there are more than 40 tiles on an axis! - 254814.427 W: Not downloading all tiles because there are more than 40 tiles on an axis! - 254814.427 W: Not downloading all tiles because there are more than 40 tiles on an axis! - 254815.518 W: Unable to get image from https://raw.githubusercontent.com/Yukiroshi/Clean-JOSM/refs/heads/main/patterns/pattern-grass.png - 254815.519 W: Unable to get image from https://raw.githubusercontent.com/Yukiroshi/Clean-JOSM/refs/heads/main/patterns/pattern-grass.png - 254815.519 W: Unable to get image from https://raw.githubusercontent.com/Yukiroshi/Clean-JOSM/refs/heads/main/patterns/pattern-grass.png - 254815.519 W: Unable to get image from https://raw.githubusercontent.com/Yukiroshi/Clean-JOSM/refs/heads/main/patterns/pattern-grass.png - 254815.519 W: Unable to get image from https://raw.githubusercontent.com/Yukiroshi/Clean-JOSM/refs/heads/main/patterns/pattern-grass.png - 257016.515 E: Failed to locate image 'https://kelkkareitit.fi/img/favicon.png'


