JDK-8336655 : java/net/httpclient/DigestEchoClient.java IOException: HTTP/1.1 header parser received no bytes
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 24
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2024-07-17
  • Updated: 2024-08-26
  • Resolved: 2024-08-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 b12Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
The following test failed in the JDK24 CI:

java/net/httpclient/DigestEchoClient.java

Here's a snippet from the log file:

#section:main
----------messages:(7/688)----------
command: main DigestEchoClient
reason: User specified action: run main/othervm DigestEchoClient 
started: Wed Jul 17 11:31:56 UTC 2024
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.base,java.net.http,java.logging,jdk.httpserver --add-exports java.base/sun.net.www.http=ALL-UNNAMED --add-exports java.base/sun.net.www=ALL-UNNAMED --add-exports java.base/sun.net=ALL-UNNAMED --add-exports java.net.http/jdk.internal.net.http.common=ALL-UNNAMED --add-exports java.net.http/jdk.internal.net.http.frame=ALL-UNNAMED --add-exports java.net.http/jdk.internal.net.http.hpack=ALL-UNNAMED
finished: Wed Jul 17 11:31:58 UTC 2024
elapsed time (seconds): 1.76
----------configuration:(9/500)----------
Boot Layer
  add modules: java.base java.net.http java.logging jdk.httpserver 
  add exports: java.base/sun.net                          ALL-UNNAMED
               java.base/sun.net.www                      ALL-UNNAMED
               java.base/sun.net.www.http                 ALL-UNNAMED
               java.net.http/jdk.internal.net.http.common ALL-UNNAMED
               java.net.http/jdk.internal.net.http.frame  ALL-UNNAMED
               java.net.http/jdk.internal.net.http.hpack  ALL-UNNAMED

----------System.out:(625/36120)----------

<snip>

FINE [Jul 17, 11:31:58.376265300] sun.net.httpserver.ServerImpl$Exchange run: Exchange request line: POST /foo/ HTTP/1.1
FINE [Jul 17, 11:31:58.377264468] sun.net.httpserver.ServerImpl logReply: POST /foo/ HTTP/1.1 [200  OK] ()
FINE [Jul 17, 11:31:58.379281891] sun.net.httpserver.ServerImpl$Exchange run: Exchange request line: POST /foo/ HTTP/1.1
FINE [Jul 17, 11:31:58.379965132] sun.net.httpserver.ServerImpl logReply: POST /foo/ HTTP/1.1 [200  OK] ()
FINE [Jul 17, 11:31:58.380869713] sun.net.httpserver.ServerImpl$Exchange run: no request line: closing
java.lang.RuntimeException: Unexpected exception: java.io.IOException: HTTP/1.1 header parser received no bytes
	at DigestEchoClient.testBasic(DigestEchoClient.java:453)
	at DigestEchoClient.main(DigestEchoClient.java:277)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:588)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)
Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:969)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133)
	at DigestEchoClient.testBasic(DigestEchoClient.java:438)
	... 5 more
Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
	at java.net.http/jdk.internal.net.http.common.Utils.wrapWithExtraDetail(Utils.java:440)
	at java.net.http/jdk.internal.net.http.Http1Response$HeadersReader.onReadError(Http1Response.java:590)
	at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.checkForErrors(Http1AsyncReceiver.java:302)
	at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.flush(Http1AsyncReceiver.java:268)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:182)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	... 1 more
Caused by: java.io.IOException: connection closed locally
	at java.net.http/jdk.internal.net.http.SocketTube.signalClosed(SocketTube.java:159)
	at java.net.http/jdk.internal.net.http.PlainHttpConnection.close(PlainHttpConnection.java:428)
	at java.net.http/jdk.internal.net.http.PlainHttpConnection.close(PlainHttpConnection.java:406)
	at java.net.http/jdk.internal.net.http.ConnectionPool.cleanup(ConnectionPool.java:538)
	at java.net.http/jdk.internal.net.http.ConnectionPool$CleanupTrigger.triggerCleanup(ConnectionPool.java:561)
	at java.net.http/jdk.internal.net.http.ConnectionPool$CleanupTrigger.onNext(ConnectionPool.java:577)
	at java.net.http/jdk.internal.net.http.ConnectionPool$CleanupTrigger.onNext(ConnectionPool.java:546)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.read(SocketTube.java:865)
	at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowTask.run(SocketTube.java:181)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:280)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:233)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.handleSubscribeEvent(SocketTube.java:706)
	at java.net.http/jdk.internal.net.http.AsyncTriggerEvent.handle(AsyncTriggerEvent.java:54)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:1323)
java.lang.RuntimeException: Unexpected exception: java.io.IOException: HTTP/1.1 header parser received no bytes
	at DigestEchoClient.testBasic(DigestEchoClient.java:453)
	at DigestEchoClient.main(DigestEchoClient.java:277)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:588)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)
Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:969)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133)
	at DigestEchoClient.testBasic(DigestEchoClient.java:438)
	... 5 more
Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
	at java.net.http/jdk.internal.net.http.common.Utils.wrapWithExtraDetail(Utils.java:440)
	at java.net.http/jdk.internal.net.http.Http1Response$HeadersReader.onReadError(Http1Response.java:590)
	at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.checkForErrors(Http1AsyncReceiver.java:302)
	at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.flush(Http1AsyncReceiver.java:268)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:182)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	... 1 more
Caused by: java.io.IOException: connection closed locally
	at java.net.http/jdk.internal.net.http.SocketTube.signalClosed(SocketTube.java:159)
	at java.net.http/jdk.internal.net.http.PlainHttpConnection.close(PlainHttpConnection.java:428)
	at java.net.http/jdk.internal.net.http.PlainHttpConnection.close(PlainHttpConnection.java:406)
	at java.net.http/jdk.internal.net.http.ConnectionPool.cleanup(ConnectionPool.java:538)
	at java.net.http/jdk.internal.net.http.ConnectionPool$CleanupTrigger.triggerCleanup(ConnectionPool.java:561)
	at java.net.http/jdk.internal.net.http.ConnectionPool$CleanupTrigger.onNext(ConnectionPool.java:577)
	at java.net.http/jdk.internal.net.http.ConnectionPool$CleanupTrigger.onNext(ConnectionPool.java:546)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.read(SocketTube.java:865)
	at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowTask.run(SocketTube.java:181)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:280)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:233)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.handleSubscribeEvent(SocketTube.java:706)
	at java.net.http/jdk.internal.net.http.AsyncTriggerEvent.handle(AsyncTriggerEvent.java:54)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:1323)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Unexpected exception: java.io.IOException: HTTP/1.1 header parser received no bytes
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Unexpected exception: java.io.IOException: HTTP/1.1 header parser received no bytes
----------rerun:(44/8704)*----------
Comments
Note: this fix has been reverted by JDK-8338495; A redo is in progress with JDK-8338569.
26-08-2024

Changeset: 6169613d Branch: master Author: Daniel Fuchs <dfuchs@openjdk.org> Date: 2024-08-15 15:34:08 +0000 URL: https://git.openjdk.org/jdk/commit/6169613d9f3f0bf019d04a37a1d8f28f1463c17c
15-08-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20571 Date: 2024-08-13 18:02:37 +0000
13-08-2024