[Bug 65178] An Error that is "Calling [asyncPostProcess()] is not valid for a request with Async state [ERROR]" occur
https://bz.apache.org/bugzilla/show_bug.cgi?id=65178 Remy Maucherat changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #1 from Remy Maucherat --- Please don't file duplicate on purpose, you can comment on other bugs. If you have questions, you should direct them to the user mailing list. *** This bug has been marked as a duplicate of bug 64496 *** -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 64496] Calling [asyncPostProcess()] is not valid for a request with Async state [ERROR]
https://bz.apache.org/bugzilla/show_bug.cgi?id=64496 Remy Maucherat changed: What|Removed |Added CC||raramira...@gmail.com --- Comment #8 from Remy Maucherat --- *** Bug 65178 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 65178] An Error that is "Calling [asyncPostProcess()] is not valid for a request with Async state [ERROR]" occur
https://bz.apache.org/bugzilla/show_bug.cgi?id=65178 soic changed: What|Removed |Added Summary|An Error that "Calling |An Error that is "Calling |[asyncPostProcess()] is not |[asyncPostProcess()] is not |valid for a request with|valid for a request with |Async state [ERROR]" occur |Async state [ERROR]" occur -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 65178] New: An Error that "Calling [asyncPostProcess()] is not valid for a request with Async state [ERROR]" occur
https://bz.apache.org/bugzilla/show_bug.cgi?id=65178 Bug ID: 65178 Summary: An Error that "Calling [asyncPostProcess()] is not valid for a request with Async state [ERROR]" occur Product: Tomcat 9 Version: 9.0.37 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: raramira...@gmail.com Target Milestone: - Hello. Probably the same as this ticket. https://bz.apache.org/bugzilla/show_bug.cgi?id=64496 I'm developing using Tomcat and Java. The following logs will be spit out during operation. Error reading request, ignoredthrowable:java.lang.IllegalStateException: Calling [asyncPostProcess()] is not valid for a request with Async state [ERROR]\n at org.apache.coyote.AsyncStateMachine.asyncPostProcess(AsyncStateMachine.java:290)\n at org.apache.coyote.AbstractProcessor.asyncPostProcess(AbstractProcessor.java:192)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:81)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at java.util.concurrent.ThreadPoolExecutor.runWorker(null:-1)\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(null:-1)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.lang.Thread.run(null:-1) After investigating, it seems to be an error that occurs when the following this line occurs when tomcat runs a thread. https://code.yawk.at/org.apache.tomcat/tomcat-catalina/9.0.26/org/apache/catalina/core/AsyncContextImpl.java#421 However, The same event cannot occur locally. What settings and requests should I make to get this error? Also, is there a way to handle this error? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in on tomcat-85-trunk
The Buildbot has detected a restored build on builder tomcat-85-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-85-trunk/builds/2639 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf946_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' triggered this build Build Source Stamp: [branch 8.5.x] c14973619a5bc0e05c0df1d54126c3d176045bd7 Blamelist: Mark Thomas Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Update changelog
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 5ada7d9 Update changelog 5ada7d9 is described below commit 5ada7d9641a442e1f69377aad924a600a94b4592 Author: remm AuthorDate: Wed Mar 10 16:34:59 2021 +0100 Update changelog --- webapps/docs/changelog.xml | 8 1 file changed, 8 insertions(+) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index cb21b43..f9e45a5 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -104,6 +104,14 @@ issues do not "pop up" wrt. others). --> + + + +Improve consistency of OpenSSL error stack handling in the TLS engine, +and log all errors found as debug. (remm) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Try out more consistent error handling
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 720e613 Try out more consistent error handling 720e613 is described below commit 720e613bbe529682d725de7c4c1b89a9a1450cad Author: remm AuthorDate: Wed Mar 10 16:07:05 2021 +0100 Try out more consistent error handling Any meaningful SSL call should clear the error stack, then follow up with checking for errors on <= 0 results. All errors are logged as debug. --- .../tomcat/util/net/openssl/OpenSSLEngine.java | 33 +++--- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java index f17ca3a..99720f3 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java @@ -308,7 +308,7 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } } -return -1; +return 0; } /** @@ -430,12 +430,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn return new SSLEngineResult(SSLEngineResult.Status.BUFFER_OVERFLOW, handshakeStatus, 0, 0); } +clearLastError(); // Write the pending data from the network BIO into the dst buffer try { bytesProduced = readEncryptedData(networkBIO, dst, pendingNet); } catch (Exception e) { throw new SSLException(e); } +if (bytesProduced == 0) { +checkLastError(); +} // If isOutboundDone is set, then the data from the network BIO // was the close_notify message -- we are not required to wait @@ -457,12 +461,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } while (src.hasRemaining()) { +clearLastError(); // Write plain text application data to the SSL engine try { bytesConsumed += writePlaintextData(ssl, src); } catch (Exception e) { throw new SSLException(e); } +if (bytesConsumed == 0) { +checkLastError(); +} // Check to see if the engine wrote data into the network BIO pendingNet = SSL.pendingWrittenBytesInBIO(networkBIO); @@ -474,12 +482,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn SSLEngineResult.Status.BUFFER_OVERFLOW, getHandshakeStatus(), bytesConsumed, bytesProduced); } +clearLastError(); // Write the pending data from the network BIO into the dst buffer try { bytesProduced += readEncryptedData(networkBIO, dst, pendingNet); } catch (Exception e) { throw new SSLException(e); } +if (bytesProduced == 0) { +checkLastError(); +} return new SSLEngineResult(getEngineStatus(), getHandshakeStatus(), bytesConsumed, bytesProduced); } @@ -541,15 +553,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } // Write encrypted data to network BIO -int written = -1; +clearLastError(); +int written = 0; try { written = writeEncryptedData(networkBIO, src); } catch (Exception e) { throw new SSLException(e); } // OpenSSL can return 0 or -1 to these calls if nothing was written -if (written < 0) { -written = 0; +if (written == 0) { +checkLastError(); } // There won't be any application data until we're done handshaking @@ -584,6 +597,7 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn break; } +clearLastError(); int bytesRead; try { bytesRead = readPlaintextData(ssl, dst); @@ -591,7 +605,8 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn throw new SSLException(e); } -if (bytesRead <= 0) { +if (bytesRead == 0) { +checkLastError(); // This should not be possible. pendingApp is positive
[tomcat] branch 8.5.x updated: Document error handling for OpenSSL
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 4d0dbbe Document error handling for OpenSSL 4d0dbbe is described below commit 4d0dbbe04090393749ff9121a559ba95a565c932 Author: remm AuthorDate: Tue Mar 9 15:17:25 2021 +0100 Document error handling for OpenSSL Also log all errors on the stack as debug. --- .../tomcat/util/net/openssl/OpenSSLEngine.java | 40 +++--- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java index 4700c2a..f17ca3a 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java @@ -940,34 +940,50 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } private void checkLastError() throws SSLException { -long error = SSL.getLastErrorNumber(); -if (error != SSL.SSL_ERROR_NONE) { -String err = SSL.getErrorString(error); -if (logger.isDebugEnabled()) { -logger.debug(sm.getString("engine.openSSLError", Long.toString(error), err)); -} +String sslError = getLastError(); +if (sslError != null) { // Many errors can occur during handshake and need to be reported if (!handshakeFinished) { sendHandshakeError = true; } else { -throw new SSLException(err); +throw new SSLException(sslError); } } } -/* +/** + * Clear out any errors, but log a warning. + */ +private static void clearLastError() { +getLastError(); +} + +/** * Many calls to SSL methods do not check the last error. Those that do * check the last error need to ensure that any previously ignored error is * cleared prior to the method call else errors may be falsely reported. + * @return the first error in the stack + * + * TODO: Improve error handling. Ideally, before any SSL_read, SSL_write, + * clearLastError should always be called, and getLastError should be called + * after on any negative result. * - * TODO: Check last error after every call to an SSL method and respond - * appropriately. */ -private static void clearLastError() { -while (SSL.getLastErrorNumber() != SSL.SSL_ERROR_NONE) { +private static String getLastError() { +String sslError = null; +long error; +while ((error = SSL.getLastErrorNumber()) != SSL.SSL_ERROR_NONE) { // Loop until getLastErrorNumber() returns SSL_ERROR_NONE +String err = SSL.getErrorString(error); +if (sslError == null) { +sslError = err; +} +if (logger.isDebugEnabled()) { +logger.debug(sm.getString("engine.openSSLError", Long.toString(error), err)); +} } +return sslError; } private SSLEngineResult.Status getEngineStatus() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Update changelog
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new ae868e1 Update changelog ae868e1 is described below commit ae868e123945f67376d70d4ad8bcdc6c29c2ae2a Author: remm AuthorDate: Wed Mar 10 16:30:01 2021 +0100 Update changelog --- webapps/docs/changelog.xml | 8 1 file changed, 8 insertions(+) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 2b0b279..79b581c 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -104,6 +104,14 @@ issues do not "pop up" wrt. others). --> + + + +Improve consistency of OpenSSL error stack handling in the TLS engine, +and log all errors found as debug. (remm) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Try out more consistent error handling
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 19ac462 Try out more consistent error handling 19ac462 is described below commit 19ac462da84a58b10039cd973f9dd2a11793a7d9 Author: remm AuthorDate: Wed Mar 10 16:07:05 2021 +0100 Try out more consistent error handling Any meaningful SSL call should clear the error stack, then follow up with checking for errors on <= 0 results. All errors are logged as debug. --- .../tomcat/util/net/openssl/OpenSSLEngine.java | 33 +++--- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java index f17ca3a..99720f3 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java @@ -308,7 +308,7 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } } -return -1; +return 0; } /** @@ -430,12 +430,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn return new SSLEngineResult(SSLEngineResult.Status.BUFFER_OVERFLOW, handshakeStatus, 0, 0); } +clearLastError(); // Write the pending data from the network BIO into the dst buffer try { bytesProduced = readEncryptedData(networkBIO, dst, pendingNet); } catch (Exception e) { throw new SSLException(e); } +if (bytesProduced == 0) { +checkLastError(); +} // If isOutboundDone is set, then the data from the network BIO // was the close_notify message -- we are not required to wait @@ -457,12 +461,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } while (src.hasRemaining()) { +clearLastError(); // Write plain text application data to the SSL engine try { bytesConsumed += writePlaintextData(ssl, src); } catch (Exception e) { throw new SSLException(e); } +if (bytesConsumed == 0) { +checkLastError(); +} // Check to see if the engine wrote data into the network BIO pendingNet = SSL.pendingWrittenBytesInBIO(networkBIO); @@ -474,12 +482,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn SSLEngineResult.Status.BUFFER_OVERFLOW, getHandshakeStatus(), bytesConsumed, bytesProduced); } +clearLastError(); // Write the pending data from the network BIO into the dst buffer try { bytesProduced += readEncryptedData(networkBIO, dst, pendingNet); } catch (Exception e) { throw new SSLException(e); } +if (bytesProduced == 0) { +checkLastError(); +} return new SSLEngineResult(getEngineStatus(), getHandshakeStatus(), bytesConsumed, bytesProduced); } @@ -541,15 +553,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } // Write encrypted data to network BIO -int written = -1; +clearLastError(); +int written = 0; try { written = writeEncryptedData(networkBIO, src); } catch (Exception e) { throw new SSLException(e); } // OpenSSL can return 0 or -1 to these calls if nothing was written -if (written < 0) { -written = 0; +if (written == 0) { +checkLastError(); } // There won't be any application data until we're done handshaking @@ -584,6 +597,7 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn break; } +clearLastError(); int bytesRead; try { bytesRead = readPlaintextData(ssl, dst); @@ -591,7 +605,8 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn throw new SSLException(e); } -if (bytesRead <= 0) { +if (bytesRead == 0) { +checkLastError(); // This should not be possible. pendingApp is positive
[tomcat] branch 9.0.x updated: Document error handling for OpenSSL
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new fc1f191 Document error handling for OpenSSL fc1f191 is described below commit fc1f1916fb679a8cc77b8ecfaf013825cbd3b3fe Author: remm AuthorDate: Tue Mar 9 15:17:25 2021 +0100 Document error handling for OpenSSL Also log all errors on the stack as debug. --- .../tomcat/util/net/openssl/OpenSSLEngine.java | 40 +++--- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java index 4700c2a..f17ca3a 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java @@ -940,34 +940,50 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } private void checkLastError() throws SSLException { -long error = SSL.getLastErrorNumber(); -if (error != SSL.SSL_ERROR_NONE) { -String err = SSL.getErrorString(error); -if (logger.isDebugEnabled()) { -logger.debug(sm.getString("engine.openSSLError", Long.toString(error), err)); -} +String sslError = getLastError(); +if (sslError != null) { // Many errors can occur during handshake and need to be reported if (!handshakeFinished) { sendHandshakeError = true; } else { -throw new SSLException(err); +throw new SSLException(sslError); } } } -/* +/** + * Clear out any errors, but log a warning. + */ +private static void clearLastError() { +getLastError(); +} + +/** * Many calls to SSL methods do not check the last error. Those that do * check the last error need to ensure that any previously ignored error is * cleared prior to the method call else errors may be falsely reported. + * @return the first error in the stack + * + * TODO: Improve error handling. Ideally, before any SSL_read, SSL_write, + * clearLastError should always be called, and getLastError should be called + * after on any negative result. * - * TODO: Check last error after every call to an SSL method and respond - * appropriately. */ -private static void clearLastError() { -while (SSL.getLastErrorNumber() != SSL.SSL_ERROR_NONE) { +private static String getLastError() { +String sslError = null; +long error; +while ((error = SSL.getLastErrorNumber()) != SSL.SSL_ERROR_NONE) { // Loop until getLastErrorNumber() returns SSL_ERROR_NONE +String err = SSL.getErrorString(error); +if (sslError == null) { +sslError = err; +} +if (logger.isDebugEnabled()) { +logger.debug(sm.getString("engine.openSSLError", Long.toString(error), err)); +} } +return sslError; } private SSLEngineResult.Status getEngineStatus() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: Try out more consistent error handling
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 54c6ac7ee1c9e583f8ce25aec9be74d767a4bae8 Author: remm AuthorDate: Wed Mar 10 16:07:05 2021 +0100 Try out more consistent error handling Any meaningful SSL call should clear the error stack, then follow up with checking for errors on <= 0 results. All errors are logged as debug. --- .../tomcat/util/net/openssl/OpenSSLEngine.java | 33 +++--- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java index f17ca3a..99720f3 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java @@ -308,7 +308,7 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } } -return -1; +return 0; } /** @@ -430,12 +430,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn return new SSLEngineResult(SSLEngineResult.Status.BUFFER_OVERFLOW, handshakeStatus, 0, 0); } +clearLastError(); // Write the pending data from the network BIO into the dst buffer try { bytesProduced = readEncryptedData(networkBIO, dst, pendingNet); } catch (Exception e) { throw new SSLException(e); } +if (bytesProduced == 0) { +checkLastError(); +} // If isOutboundDone is set, then the data from the network BIO // was the close_notify message -- we are not required to wait @@ -457,12 +461,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } while (src.hasRemaining()) { +clearLastError(); // Write plain text application data to the SSL engine try { bytesConsumed += writePlaintextData(ssl, src); } catch (Exception e) { throw new SSLException(e); } +if (bytesConsumed == 0) { +checkLastError(); +} // Check to see if the engine wrote data into the network BIO pendingNet = SSL.pendingWrittenBytesInBIO(networkBIO); @@ -474,12 +482,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn SSLEngineResult.Status.BUFFER_OVERFLOW, getHandshakeStatus(), bytesConsumed, bytesProduced); } +clearLastError(); // Write the pending data from the network BIO into the dst buffer try { bytesProduced += readEncryptedData(networkBIO, dst, pendingNet); } catch (Exception e) { throw new SSLException(e); } +if (bytesProduced == 0) { +checkLastError(); +} return new SSLEngineResult(getEngineStatus(), getHandshakeStatus(), bytesConsumed, bytesProduced); } @@ -541,15 +553,16 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn } // Write encrypted data to network BIO -int written = -1; +clearLastError(); +int written = 0; try { written = writeEncryptedData(networkBIO, src); } catch (Exception e) { throw new SSLException(e); } // OpenSSL can return 0 or -1 to these calls if nothing was written -if (written < 0) { -written = 0; +if (written == 0) { +checkLastError(); } // There won't be any application data until we're done handshaking @@ -584,6 +597,7 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn break; } +clearLastError(); int bytesRead; try { bytesRead = readPlaintextData(ssl, dst); @@ -591,7 +605,8 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn throw new SSLException(e); } -if (bytesRead <= 0) { +if (bytesRead == 0) { +checkLastError(); // This should not be possible. pendingApp is positive // therefore the read should have read at least one byte. throw new
[tomcat] 02/02: Update changelog
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 62ea6f7807789ca3186006f3d1eeb1dfe96f2d2e Author: remm AuthorDate: Wed Mar 10 16:08:38 2021 +0100 Update changelog --- webapps/docs/changelog.xml | 8 1 file changed, 8 insertions(+) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index d173beb..556b213 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -104,6 +104,14 @@ issues do not "pop up" wrt. others). --> + + + +Improve consistency of OpenSSL error stack handling in the TLS engine, +and log all errors found as debug. (remm) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated (efe0fe8 -> 62ea6f7)
This is an automated email from the ASF dual-hosted git repository. remm pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git. from efe0fe8 Add release date for 10.0.4 new 54c6ac7 Try out more consistent error handling new 62ea6f7 Update changelog The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../tomcat/util/net/openssl/OpenSSLEngine.java | 33 +++--- webapps/docs/changelog.xml | 8 ++ 2 files changed, 31 insertions(+), 10 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] martin-g commented on pull request #412: Adding default manager roles in tomcat users config.
martin-g commented on pull request #412: URL: https://github.com/apache/tomcat/pull/412#issuecomment-795354818 For some reason `getParentStream()` returns null on s390x (JDK11). https://github.com/apache/tomcat/blob/efe0fe8b3d6b10b7e416c32b59f60bb441831c39/java/org/apache/coyote/http2/AbstractNonZeroStream.java#L125 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] dagnelies commented on pull request #412: Adding default manager roles in tomcat users config.
dagnelies commented on pull request #412: URL: https://github.com/apache/tomcat/pull/412#issuecomment-795327884 ...I guess the travis CI is currently broken This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Add release date for 8.5.64
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new c149736 Add release date for 8.5.64 c149736 is described below commit c14973619a5bc0e05c0df1d54126c3d176045bd7 Author: Mark Thomas AuthorDate: Wed Mar 10 11:48:50 2021 + Add release date for 8.5.64 --- webapps/docs/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index f3edde0..cb21b43 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,7 +105,7 @@ --> - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Add release date for 9.0.44
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new c454ee1 Add release date for 9.0.44 c454ee1 is described below commit c454ee196b0c57e914f3c229dc25ee4b6bc11d63 Author: Mark Thomas AuthorDate: Wed Mar 10 11:32:14 2021 + Add release date for 9.0.44 --- webapps/docs/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index facfe56..2b0b279 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,7 +105,7 @@ --> - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Add release date for 10.0.4
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/master by this push: new efe0fe8 Add release date for 10.0.4 efe0fe8 is described below commit efe0fe8b3d6b10b7e416c32b59f60bb441831c39 Author: Mark Thomas AuthorDate: Wed Mar 10 11:26:07 2021 + Add release date for 10.0.4 --- webapps/docs/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 6aeec4f..d173beb 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,7 +105,7 @@ --> - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r46562 - /dev/tomcat/tomcat-8/v8.5.64/ /release/tomcat/tomcat-8/v8.5.64/
Author: markt Date: Wed Mar 10 11:47:33 2021 New Revision: 46562 Log: Release Apache Tomcat 8.5.64 Added: release/tomcat/tomcat-8/v8.5.64/ - copied from r46561, dev/tomcat/tomcat-8/v8.5.64/ Removed: dev/tomcat/tomcat-8/v8.5.64/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE][RESULT] Release Apache Tomcat 8.5.64
The following votes were cast: Binding: +1: remm, mgrigorov, markt, kfujino, kkolinko No other votes were cast. The vote therefore passes. Thanks to everybody who contributed to this release. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r46561 - /dev/tomcat/tomcat-9/v9.0.44/ /release/tomcat/tomcat-9/v9.0.44/
Author: markt Date: Wed Mar 10 11:31:17 2021 New Revision: 46561 Log: Release Apache Tomcat 9.0.44 Added: release/tomcat/tomcat-9/v9.0.44/ - copied from r46560, dev/tomcat/tomcat-9/v9.0.44/ Removed: dev/tomcat/tomcat-9/v9.0.44/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE][RELEASE] Release Apache Tomcat 9.0.44
The following votes were cast: Binding: +1: remm, ebourg, mgrigorov, markt, kfujino, jfclere, kkolinko No other votes were cast. The vote therefore passes. Thank you to everyone who contributed to this release. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r46560 - /dev/tomcat/tomcat-10/v10.0.4/ /release/tomcat/tomcat-10/v10.0.4/
Author: markt Date: Wed Mar 10 11:24:46 2021 New Revision: 46560 Log: Release Apache Tomcat 10.0.4 Added: release/tomcat/tomcat-10/v10.0.4/ - copied from r46559, dev/tomcat/tomcat-10/v10.0.4/ Removed: dev/tomcat/tomcat-10/v10.0.4/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE][RESULT] Release Apache Tomcat 10.0.4
The following votes were cast: Binding: +1: remm, mgrigorov, markt, kfujino No other votes were cast. The vote therefore passes. Thank you to everybody who contributed to this release. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org