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

java/net/httpclient/CancelStreamedBodyTest.java fails with "java.lang.AssertionError: WARNING: tracker for HttpClientImpl(1) has outstanding operations"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • core-libs
    • b25
    • generic
    • generic
    • Verified

    Description

      The following test failed in the JDK20 CI:

      java/net/httpclient/CancelStreamedBodyTest.java

      Here's a snippet from the log file:

      ----------System.out:(273/17116)----------
      Http1TestServer[localhost/127.0.0.1:41883]::addHandler CancelStreamedBodyTest$HTTPSlowHandler@358f2ca7, /http1/x/
      Http1TestServer[localhost/127.0.0.1:38199]::addHandler CancelStreamedBodyTest$HTTPSlowHandler@358f2ca7, /https1/x/
      Http2TestServerImpl[localhost/127.0.0.1:55169]::addHandler CancelStreamedBodyTest$HTTPSlowHandler@687e1a8a, /http2/x/
      Http2TestServerImpl[localhost/127.0.0.1:43629]::addHandler CancelStreamedBodyTest$HTTPSlowHandler@687e1a8a, /https2/x/
      Http1TestServer: start
      Http1TestServer: start
      Http2TestServerImpl: start
      Http2TestServerImpl: start
      config CancelStreamedBodyTest.setup(): success
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success

      [0 s, 366 ms, 407427 ns] testAsLines(http://localhost:41883/http1/x/new/testAsLines, false)
      HTTPSlowHandler received request to /http1/x/new/testAsLines
      Server wrote 12 bytes
      Waiting for HTTP operations to terminate...
      PASSED: No subscribers for testAsLines(http://localhost:41883/http1/x/new/testAsLines)
      step [0,0] found in HttpClientImpl(1)
      HTTPSlowHandler: unexpected exception: java.io.IOException: Broken pipe
      HTTPSlowHandler reply sent: /http1/x/new/testAsLines
      WARNING: exception caught in HttpTestHandler::handle java.io.IOException: Broken pipe
      java.io.IOException: Broken pipe
      at java.base/sun.nio.ch.SocketDispatcher.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 CancelStreamedBodyTest$HTTPSlowHandler.handle(CancelStreamedBodyTest.java:430)
      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.SocketDispatcher.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 CancelStreamedBodyTest$HTTPSlowHandler.handle(CancelStreamedBodyTest.java:421)
      ... 12 more
      HTTPSlowHandler received request to /http1/x/new/testAsLines
      Server wrote 12 bytes
      Server wrote 14 bytes
      Waiting for HTTP operations to terminate...
      Server wrote 22 bytes
      HTTPSlowHandler: unexpected exception: java.io.IOException: Broken pipe
      HTTPSlowHandler reply sent: /http1/x/new/testAsLines
      WARNING: exception caught in HttpTestHandler::handle java.io.IOException: Broken pipe
      java.io.IOException: Broken pipe
      at java.base/sun.nio.ch.SocketDispatcher.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 CancelStreamedBodyTest$HTTPSlowHandler.handle(CancelStreamedBodyTest.java:430)
      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.SocketDispatcher.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 CancelStreamedBodyTest$HTTPSlowHandler.handle(CancelStreamedBodyTest.java:421)
      ... 12 more
      WARNING: tracker for HttpClientImpl(1) 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: 0
      Pending Subscribers: 1
      Total pending operations: 0
      Facade referenced: true
      Selector alive: true
      test CancelStreamedBodyTest.testAsLines("http://localhost:41883/http1/x/new", false): failure
      java.lang.AssertionError: WARNING: tracker for HttpClientImpl(1) 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: 0
      Pending Subscribers: 1
      Total pending operations: 0
      Facade referenced: true
      Selector alive: true
      at ReferenceTracker.check(ReferenceTracker.java:229)
      at CancelStreamedBodyTest.testAsLines(CancelStreamedBodyTest.java:278)
      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 CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testAsLines("https://localhost:38199/https1/x/new", false): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testAsLines("http://localhost:55169/http2/x/new", false): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testAsLines("https://localhost:43629/https2/x/new", false): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testAsLines("http://localhost:41883/http1/x/same", true): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testAsLines("https://localhost:38199/https1/x/same", true): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testAsLines("http://localhost:55169/http2/x/same", true): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testAsLines("https://localhost:43629/https2/x/same", true): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testInputStream("http://localhost:41883/http1/x/new", false): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testInputStream("https://localhost:38199/https1/x/new", false): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testInputStream("http://localhost:55169/http2/x/new", false): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testInputStream("https://localhost:43629/https2/x/new", false): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testInputStream("http://localhost:41883/http1/x/same", true): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testInputStream("https://localhost:38199/https1/x/same", true): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testInputStream("http://localhost:55169/http2/x/same", true): skip
      org.testng.SkipException: some tests failed
      config CancelStreamedBodyTest.beforeMethod(org.testng.TestRunner@1d9fea44): success
      test CancelStreamedBodyTest.testInputStream("https://localhost:43629/https2/x/same", true): skip
      org.testng.SkipException: some tests failed

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

      [1 s, 799 ms, 470812 ns] Created 4 servers and 1 clients
      Failed tests:
      testAsLines[http://localhost:41883/http1/x/new, false]: java.lang.AssertionError: WARNING: tracker for HttpClientImpl(1) 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: 0
      Pending Subscribers: 1
      Total pending operations: 0
      Facade referenced: true
      Selector alive: true
      java.lang.AssertionError: WARNING: tracker for HttpClientImpl(1) 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: 0
      Pending Subscribers: 1
      Total pending operations: 0
      Facade referenced: true
      Selector alive: true
      at ReferenceTracker.check(ReferenceTracker.java:229)
      at CancelStreamedBodyTest.testAsLines(CancelStreamedBodyTest.java:278)
      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 CancelStreamedBodyTest.printFailedTests(org.testng.TestRunner@1d9fea44): success
      PASSED: No outstanding operations or unreleased resources found in 1 clients
      Http1TestServer: stop
      Http1TestServer: stop
      Http2TestServerImpl: stop
      Http2TestServerImpl: stop
      config CancelStreamedBodyTest.teardown(): success

      ===============================================
      java/net/httpclient/CancelStreamedBodyTest.java
      Total tests run: 16, Passes: 0, Failures: 1, Skips: 15
      ===============================================

      ----------System.err:(590/58174)----------

      Attachments

        Issue Links

          Activity

            People

              dfuchs Daniel Fuchs
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: