Skip to content

Download action is not handling the connection reset error properly #16

@sureshg

Description

@sureshg

The connection reset error happened twice and it seems working ok. The main issue is, even though the download failed with connection reset, the step is marked as successful and moved to the next one. That shouldn't happen.

Screen Shot 2022-03-22 at 9 55 04 AM

Run oracle-actions/setup-java@v1
  with:
    website: jdk.java.net
    release: loom
    install: false
    version: latest
  env:
    GITHUB_PUBLISH: false
Run JAVA=$JAVA_HOME_17_X64/bin/java
  JAVA=$JAVA_HOME_17_X64/bin/java
  DOWNLOAD=$GITHUB_ACTION_PATH/src/Download.java
  if [ ! -z "" ]; then
    $JAVA $DOWNLOAD 
  else
    $JAVA $DOWNLOAD jdk.java.net loom latest
  fi
  shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
  env:
    GITHUB_PUBLISH: false
java.io.IOException: fixed content-length: 18941963[2](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:2), bytes received: 41474110
Error: Error detected: java.io.IOException: fixed content-length: 1894196[3](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:3)2, bytes received: [4](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:4)1474110
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:[5](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:5)8[6](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:6))
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
	at Download$Browser.download(Download.java:256)
	at Download$Downloader.downloadArchive(Download.java:162)
	at Download.main(Download.java:95)
	at Download.main(Download.java:3[7](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:7))
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:56[8](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:8))
	at jdk.compiler/com.sun.tools.javac.launcher.Main.execute(Main.java:41[9](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:9))
	at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:192)
	at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:132)
Caused by: java.io.IOException: fixed content-length: 189419632, bytes received: 414741[10](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:10)
	at java.net.http/jdk.internal.net.http.common.Utils.wrapWithExtraDetail(Utils.java:351)
	at java.net.http/jdk.internal.net.http.Http1Response$BodyReader.onReadError(Http1Response.java:760)
	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:205)
	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:230)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:[11](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:11)36)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.net.SocketException: Connection reset
	at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394)
	at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426)
	at java.net.http/jdk.internal.net.http.SocketTube.readAvailable(SocketTube.java:1170)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.read(SocketTube.java:833)
	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:230)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:303)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:256)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.signalReadable(SocketTube.java:774)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$ReadEvent.signalEvent(SocketTube.java:957)
	at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowEvent.handle(SocketTube.java:253)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.handleEvent(HttpClientImpl.java:979)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.lambda$run$3(HttpClientImpl.java:934)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:[15](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:15)11)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:9[34](https://github.com/sureshg/openjdk-playground/runs/5614385112?check_suite_focus=true#step:4:34))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions