On 07/03/17 11:48, Rémy Maucherat wrote: > 2017-03-07 11:24 GMT+01:00 <r...@apache.org>: > >> Author: remm >> Date: Tue Mar 7 10:24:38 2017 >> New Revision: 1785820 >> >> URL: http://svn.apache.org/viewvc?rev=1785820&view=rev >> Log: >> Unlock a blocking read (with an IOE) when a stream exception occurs. The >> likely bad behavior is seen in many tests in the testsuite. Originally I >> think this is supposed to wait for a reset frame, but I don't really see a >> benefit. >> > > Mark, are you ok with that ? It's really heavy handed ...
If it had worked, I would have been OK with it until we could come up with a better plan. Mark > For whatever reason, it's not fixing the issue in CI: > https://ci.apache.org/projects/tomcat/tomcat9/logs/1785823/TEST-org.apache.coyote.http2.TestHttp2Section_6_9.NIO.txt > > Supposed to be replaced with an IOE: > [junit] java.io.IOException: Stream reset > [junit] at > org.apache.coyote.http2.Stream$StreamInputBuffer.doRead(Stream.java:698) > [junit] at org.apache.coyote.Request.doRead(Request.java:511) > > Rémy > >> >> Modified: >> tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties >> tomcat/trunk/java/org/apache/coyote/http2/Stream.java >> >> Modified: tomcat/trunk/java/org/apache/coyote/http2/LocalStrings. >> properties >> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/ >> coyote/http2/LocalStrings.properties?rev=1785820&r1= >> 1785819&r2=1785820&view=diff >> ============================================================ >> ================== >> --- tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties >> (original) >> +++ tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties Tue >> Mar 7 10:24:38 2017 >> @@ -85,6 +85,7 @@ stream.write=Connection [{0}], Stream [{ >> stream.inputBuffer.copy=Copying [{0}] bytes from inBuffer to outBuffer >> stream.inputBuffer.dispatch=Data added to inBuffer when read interest is >> registered. Triggering a read dispatch >> stream.inputBuffer.empty=The Stream input buffer is empty. Waiting for >> more data >> +stream.inputBuffer.reset=Stream reset >> stream.inputBuffer.signal=Data added to inBuffer when read thread is >> waiting. Signalling that thread to continue >> >> stream.outputBuffer.flush.debug=Connection [{0}], Stream [{1}], flushing >> output with buffer at position [{2}], writeInProgress [{3}] and closed [{4}] >> >> Modified: tomcat/trunk/java/org/apache/coyote/http2/Stream.java >> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/ >> coyote/http2/Stream.java?rev=1785820&r1=1785819&r2=1785820&view=diff >> ============================================================ >> ================== >> --- tomcat/trunk/java/org/apache/coyote/http2/Stream.java (original) >> +++ tomcat/trunk/java/org/apache/coyote/http2/Stream.java Tue Mar 7 >> 10:24:38 2017 >> @@ -470,6 +470,10 @@ class Stream extends AbstractStream impl >> } else { >> handler.closeConnection(http2Exception); >> } >> + // Reads wait internally so need to call a method to break the >> wait() >> + if (inputBuffer != null) { >> + inputBuffer.receiveReset(); >> + } >> } >> >> >> @@ -691,8 +695,7 @@ class Stream extends AbstractStream impl >> } >> inBuffer.wait(); >> if (reset) { >> - // TODO: i18n >> - throw new IOException("HTTP/2 Stream reset"); >> + throw new IOException(sm.getString(" >> stream.inputBuffer.reset")); >> } >> } catch (InterruptedException e) { >> // Possible shutdown / rst or similar. Use an >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: dev-h...@tomcat.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org