Author: markt
Date: Fri Aug 17 08:56:50 2018
New Revision: 1838243
URL: http://svn.apache.org/viewvc?rev=1838243&view=rev
Log:
Additional debug logging
Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java
Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java?rev=1838243&r1=1838242&r2=1838243&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProcessorLight.java Fri Aug 17
08:56:50 2018
@@ -70,16 +70,20 @@ public abstract class AbstractProcessorL
state = SocketState.CLOSED;
}
- if (state != SocketState.CLOSED && isAsync()) {
- state = asyncPostProcess();
- }
-
if (getLog().isDebugEnabled()) {
getLog().debug("Socket: [" + socketWrapper +
"], Status in: [" + status +
"], State out: [" + state + "]");
}
+ if (state != SocketState.CLOSED && isAsync()) {
+ state = asyncPostProcess();
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("Socket: [" + socketWrapper +
+ "], State after async post processing: [" + state
+ "]");
+ }
+ }
+
if (dispatches == null || !dispatches.hasNext()) {
// Only returns non-null iterator if there are
// dispatches to process.
Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1838243&r1=1838242&r2=1838243&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Fri Aug
17 08:56:50 2018
@@ -818,11 +818,19 @@ class Http2UpgradeHandler extends Abstra
}
Response coyoteResponse = ((Stream)
stream).getCoyoteResponse();
if (coyoteResponse.getWriteListener() == null) {
+ if (log.isDebugEnabled()) {
+ log.debug(sm.getString("upgradeHandler.notifyAll",
+ connectionId, stream.getIdentifier()));
+ }
// Blocking, so use notify to release StreamOutputBuffer
synchronized (stream) {
stream.notifyAll();
}
} else {
+ if (log.isDebugEnabled()) {
+ log.debug(sm.getString("upgradeHandler.dispatchWrite",
+ connectionId, stream.getIdentifier()));
+ }
// Non-blocking so dispatch
coyoteResponse.action(ActionCode.DISPATCH_WRITE, null);
// Need to explicitly execute dispatches on the
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=1838243&r1=1838242&r2=1838243&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties [UTF-8]
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties [UTF-8]
Fri Aug 17 08:56:50 2018
@@ -104,6 +104,7 @@ stream.outputBuffer.flush.debug=Connecti
streamProcessor.error.connection=Connection [{0}], Stream [{1}], An error
occurred during processing that was fatal to the connection
streamProcessor.error.stream=Connection [{0}], Stream [{1}], An error occurred
during processing that was fatal to the stream
+streamProcessor.flushBufferedWrite.entry=Connection [{0}], Stream [{1}],
Flushing buffered writes
streamProcessor.service.error=Error during request processing
streamStateMachine.debug.change=Connection [{0}], Stream [{1}], State changed
from [{2}] to [{3}]
@@ -115,12 +116,14 @@ upgradeHandler.allocate.left=Connection
upgradeHandler.allocate.recipient=Connection [{0}], Stream [{1}], potential
recipient [{2}] with weight [{3}]
upgradeHandler.connectionError=Connection error
upgradeHandler.dependency.invalid=Connection [{0}], Stream [{1}], Streams may
not depend on themselves
+upgradeHandler.dispatchWrite=Connection [{0}], Stream [{1}], Dispatching to
container thread for async write
upgradeHandler.goaway.debug=Connection [{0}], Goaway, Last stream [{1}], Error
code [{2}], Debug data [{3}]
upgradeHandler.init=Connection [{0}], State [{1}]
upgradeHandler.initialWindowSize.invalid=Connection [{0}], Illegal value of
[{1}] ignored for initial window size
upgradeHandler.invalidPreface=Connection [{0}], Invalid connection preface
upgradeHandler.ioerror=Connection [{0}]
upgradeHandler.noNewStreams=Connection [{0}], Stream [{1}], Stream ignored as
no new streams are permitted on this connection
+upgradeHandler.notifyAll=Connection [{0}], Stream [{1}], notifyAll() called to
release StreamOutputBuffer
upgradeHandler.pause.entry=Connection [{0}] Pausing
upgradeHandler.prefaceReceived=Connection [{0}], Connection preface received
from client
upgradeHandler.pingFailed=Connection [{0}] Failed to send ping to client
Modified: tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java?rev=1838243&r1=1838242&r2=1838243&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java Fri Aug 17
08:56:50 2018
@@ -86,9 +86,12 @@ class StreamProcessor extends AbstractPr
}
}
} catch (Exception e) {
- ConnectionException ce = new
ConnectionException(sm.getString(
- "streamProcessor.error.connection",
stream.getConnectionId(),
- stream.getIdentifier()),
Http2Error.INTERNAL_ERROR);
+ String msg =
sm.getString("streamProcessor.error.connection",
+ stream.getConnectionId(), stream.getIdentifier());
+ if (log.isDebugEnabled()) {
+ log.debug(msg, e);
+ }
+ ConnectionException ce = new ConnectionException(msg,
Http2Error.INTERNAL_ERROR);
ce.initCause(e);
stream.close(ce);
} finally {
@@ -358,6 +361,10 @@ class StreamProcessor extends AbstractPr
@Override
protected final boolean flushBufferedWrite() throws IOException {
+ if (log.isDebugEnabled()) {
+ log.debug(sm.getString("streamProcessor.flushBufferedWrite.entry",
+ stream.getConnectionId(), stream.getIdentifier()));
+ }
if (stream.flush(false)) {
// The buffer wasn't fully flushed so re-register the
// stream for write. Note this does not go via the
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]