[Bug 64645] bin/service.bat doesn't handle wrongly configured JAVA_HOME
https://bz.apache.org/bugzilla/show_bug.cgi?id=64645 Jakub Moravec changed: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED|REOPENED --- Comment #6 from Jakub Moravec --- Hi Mark, as far as I know, the current validation only checks that JAVA_HOME is setup, but the validation will pass even if the target of JAVA_HOME is a JRE (not a JDK), which will then cause the error I'm describing. This issue is easy to reproduce: * point JAVA_HOME to JRE (e.g. 1.8) * try to use service.bat to install the Tomcat service * the script will complete with no indication of failure, but the service is not installed -- 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 64666] New: Cannot allow special characters in query strings without replacing server.xml
https://bz.apache.org/bugzilla/show_bug.cgi?id=64666 Bug ID: 64666 Summary: Cannot allow special characters in query strings without replacing server.xml Product: Tomcat 8 Version: 8.5.x-trunk Hardware: PC OS: Mac OS X 10.1 Status: NEW Severity: normal Priority: P2 Component: Connectors Assignee: dev@tomcat.apache.org Reporter: franck...@yahoo.com Target Milestone: Square brackets can be allowed in query strings using this configuration in server.xml: In a docker image based on the standard tomcat85 base image however, this forces us to entirely replace the base server.xml. A system property or some other means of configuring this without modifying server.xml would be very useful. -- 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 64666] Cannot allow special characters in query strings without replacing server.xml
https://bz.apache.org/bugzilla/show_bug.cgi?id=64666 --- Comment #1 from Michael Osipov --- I am rejecting this because a system property will affect the entire container, not just this connector. Moreover, RFC 3986 does not allow [ or ] in a query string w/o pct-encoded because both chars are in gen-delims and not in pchar. -- 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 64666] Cannot allow special characters in query strings without replacing server.xml
https://bz.apache.org/bugzilla/show_bug.cgi?id=64666 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX -- 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
[tomcat] branch 9.0.x updated: Refactor the stopping of the acceptor.
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 28a0182 Refactor the stopping of the acceptor. 28a0182 is described below commit 28a0182b9f1db3aa1c7d46f9918b2768ddc7d47e Author: Mark Thomas AuthorDate: Thu Aug 13 17:10:48 2020 +0100 Refactor the stopping of the acceptor. Can't use !endpoint.isRunning() to trigger the stopping of the acceptor thread as endpoint.stop() followed immediately by endpoint.start() can result in the acceptor thread never seeing endpoint.isRunning() returning false. --- java/org/apache/tomcat/util/net/Acceptor.java | 156 +- java/org/apache/tomcat/util/net/AprEndpoint.java | 17 +-- java/org/apache/tomcat/util/net/Nio2Endpoint.java | 7 +- java/org/apache/tomcat/util/net/NioEndpoint.java | 1 + webapps/docs/changelog.xml| 5 + 5 files changed, 105 insertions(+), 81 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Acceptor.java b/java/org/apache/tomcat/util/net/Acceptor.java index c09bf4b..9fa0818 100644 --- a/java/org/apache/tomcat/util/net/Acceptor.java +++ b/java/org/apache/tomcat/util/net/Acceptor.java @@ -16,6 +16,9 @@ */ package org.apache.tomcat.util.net; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.jni.Error; @@ -32,6 +35,13 @@ public class Acceptor implements Runnable { private final AbstractEndpoint endpoint; private String threadName; +/* + * Tracked separately rather than using endpoint.isRunning() as calls to + * endpoint.stop() and endpoint.start() in quick succession can cause the + * acceptor to continue running when it should terminate. + */ +private volatile boolean stopCalled = false; +private final CountDownLatch stopLatch = new CountDownLatch(1); protected volatile AcceptorState state = AcceptorState.NEW; @@ -60,88 +70,102 @@ public class Acceptor implements Runnable { int errorDelay = 0; -// Loop until we receive a shutdown command -while (endpoint.isRunning()) { - -// Loop if endpoint is paused -while (endpoint.isPaused() && endpoint.isRunning()) { -state = AcceptorState.PAUSED; -try { -Thread.sleep(50); -} catch (InterruptedException e) { -// Ignore +try { +// Loop until we receive a shutdown command +while (!stopCalled) { + +// Loop if endpoint is paused +while (endpoint.isPaused() && !stopCalled) { +state = AcceptorState.PAUSED; +try { +Thread.sleep(50); +} catch (InterruptedException e) { +// Ignore +} } -} -if (!endpoint.isRunning()) { -break; -} -state = AcceptorState.RUNNING; - -try { -//if we have reached max connections, wait -endpoint.countUpOrAwaitConnection(); - -// Endpoint might have been paused while waiting for latch -// If that is the case, don't accept new connections -if (endpoint.isPaused()) { -continue; +if (stopCalled) { +break; } +state = AcceptorState.RUNNING; -U socket = null; try { -// Accept the next incoming connection from the server -// socket -socket = endpoint.serverSocketAccept(); -} catch (Exception ioe) { -// We didn't get a socket -endpoint.countDownConnection(); -if (endpoint.isRunning()) { -// Introduce delay if necessary -errorDelay = handleExceptionWithDelay(errorDelay); -// re-throw -throw ioe; -} else { -break; +//if we have reached max connections, wait +endpoint.countUpOrAwaitConnection(); + +// Endpoint might have been paused while waiting for latch +// If that is the case, don't accept new connections +if (endpoint.isPaused()) { +continue; } -} -// Successful accept, reset the error delay -errorDelay = 0; - -// Configure the sock
[tomcat] branch master updated: Refactor the stopping of the acceptor.
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 7343eed Refactor the stopping of the acceptor. 7343eed is described below commit 7343eeddcc310af85a677613a4dd58a1e30984c6 Author: Mark Thomas AuthorDate: Thu Aug 13 17:10:48 2020 +0100 Refactor the stopping of the acceptor. Can't use !endpoint.isRunning() to trigger the stopping of the acceptor thread as endpoint.stop() followed immediately by endpoint.start() can result in the acceptor thread never seeing endpoint.isRunning() returning false. --- java/org/apache/tomcat/util/net/Acceptor.java | 156 +- java/org/apache/tomcat/util/net/AprEndpoint.java | 17 +-- java/org/apache/tomcat/util/net/Nio2Endpoint.java | 7 +- java/org/apache/tomcat/util/net/NioEndpoint.java | 1 + webapps/docs/changelog.xml| 5 + 5 files changed, 105 insertions(+), 81 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Acceptor.java b/java/org/apache/tomcat/util/net/Acceptor.java index c09bf4b..9fa0818 100644 --- a/java/org/apache/tomcat/util/net/Acceptor.java +++ b/java/org/apache/tomcat/util/net/Acceptor.java @@ -16,6 +16,9 @@ */ package org.apache.tomcat.util.net; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.jni.Error; @@ -32,6 +35,13 @@ public class Acceptor implements Runnable { private final AbstractEndpoint endpoint; private String threadName; +/* + * Tracked separately rather than using endpoint.isRunning() as calls to + * endpoint.stop() and endpoint.start() in quick succession can cause the + * acceptor to continue running when it should terminate. + */ +private volatile boolean stopCalled = false; +private final CountDownLatch stopLatch = new CountDownLatch(1); protected volatile AcceptorState state = AcceptorState.NEW; @@ -60,88 +70,102 @@ public class Acceptor implements Runnable { int errorDelay = 0; -// Loop until we receive a shutdown command -while (endpoint.isRunning()) { - -// Loop if endpoint is paused -while (endpoint.isPaused() && endpoint.isRunning()) { -state = AcceptorState.PAUSED; -try { -Thread.sleep(50); -} catch (InterruptedException e) { -// Ignore +try { +// Loop until we receive a shutdown command +while (!stopCalled) { + +// Loop if endpoint is paused +while (endpoint.isPaused() && !stopCalled) { +state = AcceptorState.PAUSED; +try { +Thread.sleep(50); +} catch (InterruptedException e) { +// Ignore +} } -} -if (!endpoint.isRunning()) { -break; -} -state = AcceptorState.RUNNING; - -try { -//if we have reached max connections, wait -endpoint.countUpOrAwaitConnection(); - -// Endpoint might have been paused while waiting for latch -// If that is the case, don't accept new connections -if (endpoint.isPaused()) { -continue; +if (stopCalled) { +break; } +state = AcceptorState.RUNNING; -U socket = null; try { -// Accept the next incoming connection from the server -// socket -socket = endpoint.serverSocketAccept(); -} catch (Exception ioe) { -// We didn't get a socket -endpoint.countDownConnection(); -if (endpoint.isRunning()) { -// Introduce delay if necessary -errorDelay = handleExceptionWithDelay(errorDelay); -// re-throw -throw ioe; -} else { -break; +//if we have reached max connections, wait +endpoint.countUpOrAwaitConnection(); + +// Endpoint might have been paused while waiting for latch +// If that is the case, don't accept new connections +if (endpoint.isPaused()) { +continue; } -} -// Successful accept, reset the error delay -errorDelay = 0; - -// Configure the so
buildbot failure in on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/5343 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf946_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch master] 7343eeddcc310af85a677613a4dd58a1e30984c6 Blamelist: Mark Thomas BUILD FAILED: failed compile_1 Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Don't force socket close if bind is on init rather than start
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 6c2e869 Don't force socket close if bind is on init rather than start 6c2e869 is described below commit 6c2e869677ad3b0b9563dae05fc039655501f2c2 Author: Mark Thomas AuthorDate: Thu Aug 13 19:30:32 2020 +0100 Don't force socket close if bind is on init rather than start --- java/org/apache/tomcat/util/net/AprEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 57e6d5f..004f7a7 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -491,7 +491,7 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB for (SocketWrapperBase socketWrapper : connections.values()) { socketWrapper.close(); } -if (acceptor.getState() != AcceptorState.ENDED) { +if (acceptor.getState() != AcceptorState.ENDED && !getBindOnInit()) { log.warn(sm.getString("endpoint.warn.unlockAcceptorFailed", acceptor.getThreadName())); // If the Acceptor is still running force // the hard socket close. - 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: Don't force socket close if bind is on init rather than start
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 5301ba6 Don't force socket close if bind is on init rather than start 5301ba6 is described below commit 5301ba6b834f5bfb2062941c95418f54da347cee Author: Mark Thomas AuthorDate: Thu Aug 13 19:30:32 2020 +0100 Don't force socket close if bind is on init rather than start --- java/org/apache/tomcat/util/net/AprEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 57e6d5f..004f7a7 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -491,7 +491,7 @@ public class AprEndpoint extends AbstractEndpoint implements SNICallB for (SocketWrapperBase socketWrapper : connections.values()) { socketWrapper.close(); } -if (acceptor.getState() != AcceptorState.ENDED) { +if (acceptor.getState() != AcceptorState.ENDED && !getBindOnInit()) { log.warn(sm.getString("endpoint.warn.unlockAcceptorFailed", acceptor.getThreadName())); // If the Acceptor is still running force // the hard socket close. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Consistent test method naming
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 5d8611a Consistent test method naming 5d8611a is described below commit 5d8611aebeac68ca65f667f5816da4bff2af19bd Author: Mark Thomas AuthorDate: Thu Aug 13 19:52:38 2020 +0100 Consistent test method naming --- test/org/apache/coyote/http2/TestHttp2Limits.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/org/apache/coyote/http2/TestHttp2Limits.java b/test/org/apache/coyote/http2/TestHttp2Limits.java index 69f6438..e4fcec0 100644 --- a/test/org/apache/coyote/http2/TestHttp2Limits.java +++ b/test/org/apache/coyote/http2/TestHttp2Limits.java @@ -415,21 +415,21 @@ public class TestHttp2Limits extends Http2TestBase { @Test -public void doTestPostWithTrailerHeadersDefaultLimit() throws Exception{ +public void testPostWithTrailerHeadersDefaultLimit() throws Exception{ doTestPostWithTrailerHeaders(Constants.DEFAULT_MAX_TRAILER_COUNT, Constants.DEFAULT_MAX_TRAILER_SIZE, FailureMode.NONE); } @Test -public void doTestPostWithTrailerHeadersCount0() throws Exception{ +public void testPostWithTrailerHeadersCount0() throws Exception{ doTestPostWithTrailerHeaders(0, Constants.DEFAULT_MAX_TRAILER_SIZE, FailureMode.STREAM_RESET); } @Test -public void doTestPostWithTrailerHeadersSize0() throws Exception{ +public void testPostWithTrailerHeadersSize0() throws Exception{ doTestPostWithTrailerHeaders(Constants.DEFAULT_MAX_TRAILER_COUNT, 0, FailureMode.CONNECTION_RESET); } - 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: Consistent test method naming
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 228b5a0 Consistent test method naming 228b5a0 is described below commit 228b5a07ebee97f72bd6c6c614191d342d6c062d Author: Mark Thomas AuthorDate: Thu Aug 13 19:52:38 2020 +0100 Consistent test method naming --- test/org/apache/coyote/http2/TestHttp2Limits.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/org/apache/coyote/http2/TestHttp2Limits.java b/test/org/apache/coyote/http2/TestHttp2Limits.java index a8f4458..97345a4 100644 --- a/test/org/apache/coyote/http2/TestHttp2Limits.java +++ b/test/org/apache/coyote/http2/TestHttp2Limits.java @@ -415,21 +415,21 @@ public class TestHttp2Limits extends Http2TestBase { @Test -public void doTestPostWithTrailerHeadersDefaultLimit() throws Exception{ +public void testPostWithTrailerHeadersDefaultLimit() throws Exception{ doTestPostWithTrailerHeaders(Constants.DEFAULT_MAX_TRAILER_COUNT, Constants.DEFAULT_MAX_TRAILER_SIZE, FailureMode.NONE); } @Test -public void doTestPostWithTrailerHeadersCount0() throws Exception{ +public void testPostWithTrailerHeadersCount0() throws Exception{ doTestPostWithTrailerHeaders(0, Constants.DEFAULT_MAX_TRAILER_SIZE, FailureMode.STREAM_RESET); } @Test -public void doTestPostWithTrailerHeadersSize0() throws Exception{ +public void testPostWithTrailerHeadersSize0() throws Exception{ doTestPostWithTrailerHeaders(Constants.DEFAULT_MAX_TRAILER_COUNT, 0, FailureMode.CONNECTION_RESET); } - 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: Consistent test method naming
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 5d854d7 Consistent test method naming 5d854d7 is described below commit 5d854d7589112effb0d291169cd87812cf5557d5 Author: Mark Thomas AuthorDate: Thu Aug 13 19:52:38 2020 +0100 Consistent test method naming --- test/org/apache/coyote/http2/TestHttp2Limits.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/org/apache/coyote/http2/TestHttp2Limits.java b/test/org/apache/coyote/http2/TestHttp2Limits.java index a8f4458..97345a4 100644 --- a/test/org/apache/coyote/http2/TestHttp2Limits.java +++ b/test/org/apache/coyote/http2/TestHttp2Limits.java @@ -415,21 +415,21 @@ public class TestHttp2Limits extends Http2TestBase { @Test -public void doTestPostWithTrailerHeadersDefaultLimit() throws Exception{ +public void testPostWithTrailerHeadersDefaultLimit() throws Exception{ doTestPostWithTrailerHeaders(Constants.DEFAULT_MAX_TRAILER_COUNT, Constants.DEFAULT_MAX_TRAILER_SIZE, FailureMode.NONE); } @Test -public void doTestPostWithTrailerHeadersCount0() throws Exception{ +public void testPostWithTrailerHeadersCount0() throws Exception{ doTestPostWithTrailerHeaders(0, Constants.DEFAULT_MAX_TRAILER_SIZE, FailureMode.STREAM_RESET); } @Test -public void doTestPostWithTrailerHeadersSize0() throws Exception{ +public void testPostWithTrailerHeadersSize0() throws Exception{ doTestPostWithTrailerHeaders(Constants.DEFAULT_MAX_TRAILER_COUNT, 0, FailureMode.CONNECTION_RESET); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/5344 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf946_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch master] 6c2e869677ad3b0b9563dae05fc039655501f2c2 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
buildbot failure in on tomcat-85-trunk
The Buildbot has detected a new failure on builder tomcat-85-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-85-trunk/builds/2405 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] 5d854d7589112effb0d291169cd87812cf5557d5 Blamelist: Mark Thomas BUILD FAILED: failed compile_1 Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org