Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8294773

j.l.AssertionError in ResponseSubscribers.HttpResponseInputStream.read() with J11

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 11
    • core-libs
    • Java 11 affected, Java 17 not affected. Haven't tried 12-16.

      Just managed to successfully reproduce a j.l.AssertionError in ResponseSubscribers.HttpResponseInputStream.read(), which happens with Java 11, but not with 17 or newer.

      A reproducer is in this public repo on GitHub:
      https://github.com/snazy/http-client-tcp-reset-repro.git
      The command `./gradlew test` using Java 11 can be used to reproduce the AE.

      {code}
          java.lang.AssertionError
      1707
              at java.net.http/jdk.internal.net.http.ResponseSubscribers$HttpResponseInputStream.read(ResponseSubscribers.java:408)
      1708
              at java.base/java.io.InputStream.readNBytes(InputStream.java:396)
      1709
              at java.base/java.io.InputStream.readAllBytes(InputStream.java:333)
      1710
              at org.openjdk.httpclientresetrepro.fixture.BaseTest.withNewJavaHttpClient(BaseTest.java:218)
      1711
      {code}

            rpallath Rajendrakumar Pallath
            rstupp Robert Stupp
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: