You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/04/17 12:16:44 UTC
[tomcat] branch master updated: Correct concurrency issue in
sendfile thread
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 b96f9be Correct concurrency issue in sendfile thread
b96f9be is described below
commit b96f9becc45628fe5920ea224fd76153f8d2c50e
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Apr 17 13:16:32 2019 +0100
Correct concurrency issue in sendfile thread
Identified by Coverity scan.
---
java/org/apache/tomcat/util/net/AprEndpoint.java | 4 +++-
webapps/docs/changelog.xml | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java
index fea7c15..8478e0b 100644
--- a/java/org/apache/tomcat/util/net/AprEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AprEndpoint.java
@@ -1894,7 +1894,9 @@ public class AprEndpoint extends AbstractEndpoint<Long,Long> implements SNICallB
maintainTime = 0;
try {
synchronized (this) {
- this.wait();
+ if (sendfileRunning && sendfileCount < 1 && addS.size() < 1) {
+ this.wait();
+ }
}
} catch (InterruptedException e) {
// Ignore
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 060e07a..73ac6fb 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -60,6 +60,10 @@
Fix a potential concurrency issue in the StringCache identifed by
Coverity scan. (markt)
</fix>
+ <fix>
+ Fix a potential concurrency issue in the main Sendfile thread of the APR
+ connector. Identified by Coverity scan. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org