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

java/net/httpclient/ManyRequests.java fails intermittently with java.io.IOException: Expected 200, got: 401

    XMLWordPrintable

    Details

      Description

      This has been observed once in 9 b175 same binaries run;

      ----------messages:(5/354)----------
      command: main -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequests
      reason: User specified action: run main/othervm/timeout=40 -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequests
      Mode: othervm [/othervm specified]
      Additional options from @modules: --add-modules jdk.incubator.httpclient,java.logging,jdk.httpserver
      elapsed time (seconds): 4.122
      ----------configuration:(3/80)----------
      Boot Layer
        add modules: jdk.incubator.httpclient java.logging jdk.httpserver

      ----------System.out:(51/1937)----------
      Sending 20 requests; delay=true, chunks=64, XFixed=false
      Client: sendAsync: https://127.0.0.1:65439/foo/x1
      Client: sendAsync: https://127.0.0.1:65439/foo/x2
      Client: sendAsync: https://127.0.0.1:65439/foo/x3
      Client: sendAsync: https://127.0.0.1:65439/foo/x4
      Client: sendAsync: https://127.0.0.1:65439/foo/x5
      Client: sendAsync: https://127.0.0.1:65439/foo/x6
      Client: sendAsync: https://127.0.0.1:65439/foo/x7
      Client: sendAsync: https://127.0.0.1:65439/foo/x8
      Client: sendAsync: https://127.0.0.1:65439/foo/x9
      Client: sendAsync: https://127.0.0.1:65439/foo/x10
      Client: sendAsync: https://127.0.0.1:65439/foo/x11
      Client: sendAsync: https://127.0.0.1:65439/foo/x12
      Client: sendAsync: https://127.0.0.1:65439/foo/x13
      Client: sendAsync: https://127.0.0.1:65439/foo/x14
      Client: sendAsync: https://127.0.0.1:65439/foo/x15
      Client: sendAsync: https://127.0.0.1:65439/foo/x16
      Client: sendAsync: https://127.0.0.1:65439/foo/x17
      Client: sendAsync: https://127.0.0.1:65439/foo/x18
      Client: sendAsync: https://127.0.0.1:65439/foo/x19
      Client: sendAsync: https://127.0.0.1:65439/foo/x20
      Server: received /foo/x20
      Result (1) from /foo/x20
      Server: received /foo/x12
      Result (2) from /foo/x12
      Server: received /foo/x2
      Result (3) from /foo/x2
      Server: received /foo/x15
      Result (4) from /foo/x15
      Server: received /foo/x17
      Result (5) from /foo/x17
      Server: received /foo/x5
      Result (6) from /foo/x5
      Server: received /foo/x13
      Result (7) from /foo/x13
      Server: received /foo/x19
      Result (8) from /foo/x19
      Server: received /foo/x11
      Result (9) from /foo/x11
      Server: received /foo/x9
      Result (10) from /foo/x9
      Expected 200, got: 401 from /foo/x16
      Expected 200, got: 401 from /foo/x1
      Expected 200, got: 401 from /foo/x6
      Expected 200, got: 401 from /foo/x18
      Expected 200, got: 401 from /foo/x4
      Expected 200, got: 401 from /foo/x3
      Expected 200, got: 401 from /foo/x14
      Expected 200, got: 401 from /foo/x7
      Expected 200, got: 401 from /foo/x8
      Expected 200, got: 401 from /foo/x10
      ----------System.err:(28/2145)----------
      WARNING: Using incubator modules: jdk.incubator.httpclient
      Jul 03, 2017 4:43:32 AM ManyRequests main
      INFO: TEST
      java.util.concurrent.CompletionException: java.io.IOException: Expected 200, got: 401
      at java.base/java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:367)
      at java.base/java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:376)
      at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1074)
      at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
      at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
      at jdk.incubator.httpclient/jdk.incubator.http.ResponseProcessors$ByteArrayProcessor.onComplete(ResponseProcessors.java:219)
      at jdk.incubator.httpclient/jdk.incubator.http.BlockingPushPublisher.acceptData(BlockingPushPublisher.java:65)
      at jdk.incubator.httpclient/jdk.incubator.http.AbstractPushPublisher.consume(AbstractPushPublisher.java:51)
      at jdk.incubator.httpclient/jdk.incubator.http.ResponseContent.pushBodyChunked(ResponseContent.java:234)
      at jdk.incubator.httpclient/jdk.incubator.http.ResponseContent.pushBody(ResponseContent.java:110)
      at jdk.incubator.httpclient/jdk.incubator.http.Http1Response.lambda$readBody$2(Http1Response.java:161)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1161)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.io.IOException: Expected 200, got: 401
      at ManyRequests.completedWithIOException(ManyRequests.java:183)
      at ManyRequests.lambda$test$2(ManyRequests.java:159)
      at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
      ... 11 more

        Attachments

          Activity

            People

            Assignee:
            dfuchs Daniel Fuchs
            Reporter:
            xiaofeya Xiaofeng Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: