Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2002

TCP client throws WritePendingException

    XMLWordPrintableJSON

Details

    Description

      The main Thread confirms a session by sending raw bytes from the forked JVM back to the TCP server in the plugin. Sometimes this async operation overlaps with another operation writing events to the NIO Channel. The exception WritePendingException is caught by the dump file:

      # Created at 2022-02-03T05:48:25.661
      java.io.IOException
      	at org.apache.maven.surefire.api.util.internal.Channels$1.write(Channels.java:111)
      	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
      	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
      	at org.apache.maven.surefire.api.util.internal.Channels$4.flushImpl(Channels.java:266)
      	at org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleWritableChannel.write(AbstractNoninterruptibleWritableChannel.java:76)
      	at org.apache.maven.surefire.api.util.internal.AbstractNoninterruptibleWritableChannel.write(AbstractNoninterruptibleWritableChannel.java:45)
      	at org.apache.maven.surefire.api.stream.AbstractStreamEncoder.write(AbstractStreamEncoder.java:78)
      	at org.apache.maven.surefire.booter.spi.EventChannelEncoder.write(EventChannelEncoder.java:334)
      	at org.apache.maven.surefire.booter.spi.EventChannelEncoder.consoleDebugLog(EventChannelEncoder.java:262)
      	at org.apache.maven.surefire.api.booter.ForkingRunListener.debug(ForkingRunListener.java:150)
      	at org.apache.maven.surefire.booter.ForkedBooter.listenToShutdownCommands(ForkedBooter.java:264)
      	at org.apache.maven.surefire.booter.ForkedBooter.setupBooter(ForkedBooter.java:146)
      	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:599)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:586)
      Caused by: java.nio.channels.WritePendingException
      	at sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:353)
      	at sun.nio.ch.AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:388)
      	at org.apache.maven.surefire.api.util.internal.Channels$1.write(Channels.java:100)
      	... 13 more
      
      
      # Created at 2022-02-03T05:48:32.716
      The channel (std/out or TCP/IP) failed to send a stream from this subprocess.
      
      
      

      Attachments

        Activity

          People

            tibordigana Tibor Digana
            tibordigana Tibor Digana
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: