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

java/net/httpclient/http2/BasicTest.java fails with java.util.ConcurrentModificationException in HttpClientImpl

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      This can be reproduced once in ~3 runs. I tested on Linux X64, but looks not to be platform-related.

      The test failed at different codes, but error stack is similar.

      Please refer following test output:
      May 05, 2016 7:28:29 PM java.net.http.PlainHttpConnection close
      INFO: ERROR: Closing: PlainHttpConnection: HttpConnection: java.nio.channels.SocketChannel[connected local=/127.0.0.1:34669 remote=/127.0.0.1:55415]
      Shutdown: java.io.IOException: Connection aborted
      java.io.IOException: Connection aborted
      at java.net.http.PlainHttpConnection.shutdown(java.httpclient@9-ea/PlainHttpConnection.java:231)
      at java.net.http.PlainHttpConnection.asyncRead(java.httpclient@9-ea/PlainHttpConnection.java:252)
      at java.net.http.PlainHttpConnection$ReadEvent.handle(java.httpclient@9-ea/PlainHttpConnection.java:332)
      at java.net.http.HttpClientImpl$SelectorManager.handleEvent(java.httpclient@9-ea/HttpClientImpl.java:305)
      at java.net.http.HttpClientImpl$SelectorManager.run(java.httpclient@9-ea/HttpClientImpl.java:275)
      May 05, 2016 7:28:29 PM java.net.http.Http2Connection resetStream
      INFO: ERROR: Resetting stream 1 with error code 8
      java.nio.channels.ClosedChannelException
      at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(java.base@9-ea/SocketChannelImpl.java:272)
      at sun.nio.ch.SocketChannelImpl.write(java.base@9-ea/SocketChannelImpl.java:463)
      at java.net.http.PlainHttpConnection.write(java.httpclient@9-ea/PlainHttpConnection.java:184)
      at java.net.http.AsyncSSLDelegate.upperWrite(java.httpclient@9-ea/AsyncSSLDelegate.java:202)
      at java.net.http.Queue.putAll(java.httpclient@9-ea/Queue.java:58)
      at java.net.http.AsyncSSLDelegate.write(java.httpclient@9-ea/AsyncSSLDelegate.java:166)
      at java.net.http.AsyncSSLConnection.write(java.httpclient@9-ea/AsyncSSLConnection.java:85)
      at java.net.http.Http2Connection.sendOneFrame(java.httpclient@9-ea/Http2Connection.java:763)
      at java.net.http.Http2Connection.sendFrame(java.httpclient@9-ea/Http2Connection.java:739)
      at java.net.http.Http2Connection.resetStream(java.httpclient@9-ea/Http2Connection.java:462)
      at java.net.http.Stream.cancelImpl(java.httpclient@9-ea/Stream.java:630)
      at java.net.http.Http2Connection.shutdown(java.httpclient@9-ea/Http2Connection.java:373)
      at java.net.http.PlainHttpConnection.shutdown(java.httpclient@9-ea/PlainHttpConnection.java:231)
      at java.net.http.PlainHttpConnection.asyncRead(java.httpclient@9-ea/PlainHttpConnection.java:252)
      at java.net.http.PlainHttpConnection$ReadEvent.handle(java.httpclient@9-ea/PlainHttpConnection.java:332)
      at java.net.http.HttpClientImpl$SelectorManager.handleEvent(java.httpclient@9-ea/HttpClientImpl.java:305)
      at java.net.http.HttpClientImpl$SelectorManager.run(java.httpclient@9-ea/HttpClientImpl.java:275)
      Closing java.net.http.Queue@5f758cf4
      Closing java.net.http.Queue@7b6dd04d
      Closing PlainHttpConnection: HttpConnection: java.nio.channels.SocketChannel[closed]
      May 05, 2016 7:28:29 PM java.net.http.HttpClientImpl$SelectorManager run
      INFO: ERROR: HttpClientImpl: fatal error: java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextNode(java.base@9-ea/HashMap.java:1489)
      at java.util.HashMap$ValueIterator.next(java.base@9-ea/HashMap.java:1518)
      at java.net.http.Http2Connection.shutdown(java.httpclient@9-ea/Http2Connection.java:372)
      at java.net.http.PlainHttpConnection.shutdown(java.httpclient@9-ea/PlainHttpConnection.java:231)
      at java.net.http.PlainHttpConnection.asyncRead(java.httpclient@9-ea/PlainHttpConnection.java:252)
      at java.net.http.PlainHttpConnection$ReadEvent.handle(java.httpclient@9-ea/PlainHttpConnection.java:332)
      at java.net.http.HttpClientImpl$SelectorManager.handleEvent(java.httpclient@9-ea/HttpClientImpl.java:305)
      at java.net.http.HttpClientImpl$SelectorManager.run(java.httpclient@9-ea/HttpClientImpl.java:275)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michaelm Michael McMahon
                Reporter:
                xiaofeya Xiaofeng Yang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: