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

java/net/httpclient/CancelRequestTest.java fails intermittently

    XMLWordPrintable

Details

    • b22

    Description

      java.lang.AssertionError: WARNING: tracker for HttpClientImpl(13) has outstanding operations:
      Pending HTTP Requests: 0
      Pending HTTP/1.1 operations: 0
      Pending HTTP/2 streams: 0
      Pending WebSocket operations: 0
      Pending TCP connections: 2
      Pending Subscribers: 1
      Total pending operations: 0
      Facade referenced: true
      Selector alive: true

      Log extract:

      =================================================================================================

      HTTPSlowHandler received request to /http1/x/same/interrupt/post
      Cancelling from Thread[#29,pool-1-thread-1,5,MainThreadGroup]
      java.util.concurrent.CompletionException: java.util.concurrent.CancellationException: Request cancelled
      Got expected exception: java.util.concurrent.ExecutionException: java.util.concurrent.CancellationException: Request cancelled
      cancelled jdk.internal.net.http.common.MinimalFuture@37b42f67[Completed exceptionally: java.util.concurrent.CompletionException: java.util.concurrent.CancellationException: Request cancelled] (id=6054)
      Got expected exception: java.util.concurrent.ExecutionException: java.util.concurrent.CancellationException: Request cancelled
      Got expected exception: java.util.concurrent.CancellationException: Request cancelled
      cause: java.io.IOException: Request cancelled
      Waiting for HTTP operations to terminate...
      Server wrote 12 bytes
      Server wrote 12 bytes
      HTTPSlowHandler: unexpected exception: java.io.IOException: Broken pipe
      HTTPSlowHandler reply sent: /http1/x/same/interrupt/post
      WARNING: exception caught in HttpTestHandler::handle java.io.IOException: Broken pipe
      java.io.IOException: Broken pipe
      at java.base/sun.nio.ch.UnixFileDispatcherImpl.write0(Native Method)
      at java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:62)
      at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:136)
      at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:101)
      at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:57)
      at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:542)
      at jdk.httpserver/sun.net.httpserver.Request$WriteStream.write(Request.java:390)
      at jdk.httpserver/sun.net.httpserver.ChunkedOutputStream.writeChunk(ChunkedOutputStream.java:125)
      at jdk.httpserver/sun.net.httpserver.ChunkedOutputStream.flush(ChunkedOutputStream.java:159)
      at jdk.httpserver/sun.net.httpserver.PlaceholderOutputStream.flush(ExchangeImpl.java:469)
      at CancelRequestTest$HTTPSlowHandler.handle(CancelRequestTest.java:655)
      at HttpServerAdapters$HttpTestHandler.doHandle(HttpServerAdapters.java:382)
      at HttpServerAdapters$HttpTestHandler.lambda$toHttpHandler$0(HttpServerAdapters.java:375)
      at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:98)
      at jdk.httpserver/sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:82)
      at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:101)
      at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:868)
      at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:98)
      at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:835)
      at jdk.httpserver/sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:204)
      at jdk.httpserver/sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:567)
      at jdk.httpserver/sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:533)
      at java.base/java.lang.Thread.run(Thread.java:1591)
      Suppressed: java.io.IOException: Broken pipe
      at java.base/sun.nio.ch.UnixFileDispatcherImpl.write0(Native Method)
      at java.base/sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:62)
      at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:136)
      at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:101)
      at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:57)
      at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:542)
      at jdk.httpserver/sun.net.httpserver.Request$WriteStream.write(Request.java:390)
      at jdk.httpserver/sun.net.httpserver.ChunkedOutputStream.writeChunk(ChunkedOutputStream.java:125)
      at jdk.httpserver/sun.net.httpserver.ChunkedOutputStream.flush(ChunkedOutputStream.java:159)
      at jdk.httpserver/sun.net.httpserver.ChunkedOutputStream.close(ChunkedOutputStream.java:134)
      at jdk.httpserver/sun.net.httpserver.PlaceholderOutputStream.close(ExchangeImpl.java:474)
      at CancelRequestTest$HTTPSlowHandler.handle(CancelRequestTest.java:646)
      ... 12 more
      WARNING: tracker for HttpClientImpl(13) has outstanding operations:
      Pending HTTP Requests: 0
      Pending HTTP/1.1 operations: 0
      Pending HTTP/2 streams: 0
      Pending WebSocket operations: 0
      Pending TCP connections: 2
      Pending Subscribers: 1
      Total pending operations: 0
      Facade referenced: true
      Selector alive: true
      Found 0 client still active, with 0 operations still pending out of 61 tracked clients.
      test CancelRequestTest.testPostSendAsync("http://localhost:44765/http1/x/same/interrupt", true, true): failure
      java.lang.AssertionError: WARNING: tracker for HttpClientImpl(13) has outstanding operations:
      Pending HTTP Requests: 0
      Pending HTTP/1.1 operations: 0
      Pending HTTP/2 streams: 0
      Pending WebSocket operations: 0
      Pending TCP connections: 2
      Pending Subscribers: 1
      Total pending operations: 0
      Facade referenced: true
      Selector alive: true
      Found 0 client still active, with 0 operations still pending out of 61 tracked clients.
      at ReferenceTracker.check(ReferenceTracker.java:268)
      at CancelRequestTest.testPostSendAsync(CancelRequestTest.java:493)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
      at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
      at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
      at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
      at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
      at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
      at org.testng.TestRunner.privateRun(TestRunner.java:764)
      at org.testng.TestRunner.run(TestRunner.java:585)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
      at org.testng.SuiteRunner.run(SuiteRunner.java:286)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
      at org.testng.TestNG.runSuites(TestNG.java:1069)
      at org.testng.TestNG.run(TestNG.java:1037)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:93)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:53)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
      at java.base/java.lang.Thread.run(Thread.java:1591)
      config CancelRequestTest.beforeMethod(org.testng.TestRunner@4b0d5fdc): success

      Attachments

        Issue Links

          Activity

            People

              dfuchs Daniel Fuchs
              dfuchs Daniel Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: