[Bug 66669] JVM crash in APR mode

2023-07-27 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=9

Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #13 from Mark Thomas  ---
I'm unable to reproduce the crash but adding some debug logging did confirm
that there is a memory leak here. I have a fix that I just need to clean up
before I commit it.

-- 
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-10.1.x

2023-07-27 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/883
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 10.1.x] 97ce7f957f0a893aa4f1429ada6ef9788874b81b


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Buildbot success in on tomcat-11.0.x

2023-07-27 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/497
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch main] 5cd6da7dca87ddd92ac6be3ee2c0779696f198ab


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


-
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: Additional debug logging after CI test failure

2023-07-27 Thread markt
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 72125872fa Additional debug logging after CI test failure
72125872fa is described below

commit 72125872facd907d90b38f587b9804aa6e781952
Author: Mark Thomas 
AuthorDate: Thu Jul 27 20:55:48 2023 +0100

Additional debug logging after CI test failure

Log the full trace before clearing it so the logs have the full picture
of what was received.
---
 test/org/apache/coyote/http2/TestRfc9218.java | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/coyote/http2/TestRfc9218.java 
b/test/org/apache/coyote/http2/TestRfc9218.java
index c42fd6ed7b..6cfd557022 100644
--- a/test/org/apache/coyote/http2/TestRfc9218.java
+++ b/test/org/apache/coyote/http2/TestRfc9218.java
@@ -43,6 +43,10 @@ public class TestRfc9218 extends Http2TestBase {
 readSimpleGetResponse();
 }
 
+String trace = output.getTrace();
+System.out.println(trace);
+output.clearTrace();
+
 // At this point the connection window should be 1k
 
 // Process a request on stream 17. This should consume the connection 
window.
@@ -50,6 +54,8 @@ public class TestRfc9218 extends Http2TestBase {
 // 17-headers, 17-1k-body
 parser.readFrame();
 parser.readFrame();
+trace = output.getTrace();
+System.out.println(trace);
 output.clearTrace();
 
 // Send additional requests. Connection window is empty so only 
headers will be returned.
@@ -59,6 +65,8 @@ public class TestRfc9218 extends Http2TestBase {
 // 19-headers, 21-headers
 parser.readFrame();
 parser.readFrame();
+trace = output.getTrace();
+System.out.println(trace);
 output.clearTrace();
 
 // At this point 17, 19 and 21 are all blocked because the connection 
window is zero.
@@ -102,7 +110,7 @@ public class TestRfc9218 extends Http2TestBase {
 parser.readFrame();
 parser.readFrame();
 
-String trace = output.getTrace();
+trace = output.getTrace();
 Assert.assertTrue(trace.contains("17-Body-877\n"));
 trace = trace.replace("17-Body-877\n", "");
 Assert.assertTrue(trace.contains("19-Body-1170\n"));


-
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: Additional debug logging after CI test failure

2023-07-27 Thread markt
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 50b61fd467 Additional debug logging after CI test failure
50b61fd467 is described below

commit 50b61fd467a48aa748d572cfe8725f6cb0137b50
Author: Mark Thomas 
AuthorDate: Thu Jul 27 20:55:48 2023 +0100

Additional debug logging after CI test failure

Log the full trace before clearing it so the logs have the full picture
of what was received.
---
 test/org/apache/coyote/http2/TestRfc9218.java | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/coyote/http2/TestRfc9218.java 
b/test/org/apache/coyote/http2/TestRfc9218.java
index c42fd6ed7b..6cfd557022 100644
--- a/test/org/apache/coyote/http2/TestRfc9218.java
+++ b/test/org/apache/coyote/http2/TestRfc9218.java
@@ -43,6 +43,10 @@ public class TestRfc9218 extends Http2TestBase {
 readSimpleGetResponse();
 }
 
+String trace = output.getTrace();
+System.out.println(trace);
+output.clearTrace();
+
 // At this point the connection window should be 1k
 
 // Process a request on stream 17. This should consume the connection 
window.
@@ -50,6 +54,8 @@ public class TestRfc9218 extends Http2TestBase {
 // 17-headers, 17-1k-body
 parser.readFrame();
 parser.readFrame();
+trace = output.getTrace();
+System.out.println(trace);
 output.clearTrace();
 
 // Send additional requests. Connection window is empty so only 
headers will be returned.
@@ -59,6 +65,8 @@ public class TestRfc9218 extends Http2TestBase {
 // 19-headers, 21-headers
 parser.readFrame();
 parser.readFrame();
+trace = output.getTrace();
+System.out.println(trace);
 output.clearTrace();
 
 // At this point 17, 19 and 21 are all blocked because the connection 
window is zero.
@@ -102,7 +110,7 @@ public class TestRfc9218 extends Http2TestBase {
 parser.readFrame();
 parser.readFrame();
 
-String trace = output.getTrace();
+trace = output.getTrace();
 Assert.assertTrue(trace.contains("17-Body-877\n"));
 trace = trace.replace("17-Body-877\n", "");
 Assert.assertTrue(trace.contains("19-Body-1170\n"));


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Additional debug logging after CI test failure

2023-07-27 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 97ce7f957f Additional debug logging after CI test failure
97ce7f957f is described below

commit 97ce7f957f0a893aa4f1429ada6ef9788874b81b
Author: Mark Thomas 
AuthorDate: Thu Jul 27 20:55:48 2023 +0100

Additional debug logging after CI test failure

Log the full trace before clearing it so the logs have the full picture
of what was received.
---
 test/org/apache/coyote/http2/TestRfc9218.java | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/coyote/http2/TestRfc9218.java 
b/test/org/apache/coyote/http2/TestRfc9218.java
index c42fd6ed7b..6cfd557022 100644
--- a/test/org/apache/coyote/http2/TestRfc9218.java
+++ b/test/org/apache/coyote/http2/TestRfc9218.java
@@ -43,6 +43,10 @@ public class TestRfc9218 extends Http2TestBase {
 readSimpleGetResponse();
 }
 
+String trace = output.getTrace();
+System.out.println(trace);
+output.clearTrace();
+
 // At this point the connection window should be 1k
 
 // Process a request on stream 17. This should consume the connection 
window.
@@ -50,6 +54,8 @@ public class TestRfc9218 extends Http2TestBase {
 // 17-headers, 17-1k-body
 parser.readFrame();
 parser.readFrame();
+trace = output.getTrace();
+System.out.println(trace);
 output.clearTrace();
 
 // Send additional requests. Connection window is empty so only 
headers will be returned.
@@ -59,6 +65,8 @@ public class TestRfc9218 extends Http2TestBase {
 // 19-headers, 21-headers
 parser.readFrame();
 parser.readFrame();
+trace = output.getTrace();
+System.out.println(trace);
 output.clearTrace();
 
 // At this point 17, 19 and 21 are all blocked because the connection 
window is zero.
@@ -102,7 +110,7 @@ public class TestRfc9218 extends Http2TestBase {
 parser.readFrame();
 parser.readFrame();
 
-String trace = output.getTrace();
+trace = output.getTrace();
 Assert.assertTrue(trace.contains("17-Body-877\n"));
 trace = trace.replace("17-Body-877\n", "");
 Assert.assertTrue(trace.contains("19-Body-1170\n"));


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Additional debug logging after CI test failure

2023-07-27 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 5cd6da7dca Additional debug logging after CI test failure
5cd6da7dca is described below

commit 5cd6da7dca87ddd92ac6be3ee2c0779696f198ab
Author: Mark Thomas 
AuthorDate: Thu Jul 27 20:55:48 2023 +0100

Additional debug logging after CI test failure

Log the full trace before clearing it so the logs have the full picture
of what was received.
---
 test/org/apache/coyote/http2/TestRfc9218.java | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/coyote/http2/TestRfc9218.java 
b/test/org/apache/coyote/http2/TestRfc9218.java
index c42fd6ed7b..6cfd557022 100644
--- a/test/org/apache/coyote/http2/TestRfc9218.java
+++ b/test/org/apache/coyote/http2/TestRfc9218.java
@@ -43,6 +43,10 @@ public class TestRfc9218 extends Http2TestBase {
 readSimpleGetResponse();
 }
 
+String trace = output.getTrace();
+System.out.println(trace);
+output.clearTrace();
+
 // At this point the connection window should be 1k
 
 // Process a request on stream 17. This should consume the connection 
window.
@@ -50,6 +54,8 @@ public class TestRfc9218 extends Http2TestBase {
 // 17-headers, 17-1k-body
 parser.readFrame();
 parser.readFrame();
+trace = output.getTrace();
+System.out.println(trace);
 output.clearTrace();
 
 // Send additional requests. Connection window is empty so only 
headers will be returned.
@@ -59,6 +65,8 @@ public class TestRfc9218 extends Http2TestBase {
 // 19-headers, 21-headers
 parser.readFrame();
 parser.readFrame();
+trace = output.getTrace();
+System.out.println(trace);
 output.clearTrace();
 
 // At this point 17, 19 and 21 are all blocked because the connection 
window is zero.
@@ -102,7 +110,7 @@ public class TestRfc9218 extends Http2TestBase {
 parser.readFrame();
 parser.readFrame();
 
-String trace = output.getTrace();
+trace = output.getTrace();
 Assert.assertTrue(trace.contains("17-Body-877\n"));
 trace = trace.replace("17-Body-877\n", "");
 Assert.assertTrue(trace.contains("19-Body-1170\n"));


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Buildbot failure in on tomcat-10.1.x

2023-07-27 Thread Mark Thomas

This looks to be a valid failure.

https://nightlies.apache.org/tomcat/tomcat-10.1.x/logs/882/TEST-org.apache.coyote.http2.TestRfc9218.NIO.txt

I'm looking into it.

Mark



On 27/07/2023 17:56, build...@apache.org wrote:

Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/882
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch 10.1.x] b6da30e55895cdd0d6d5af02447fdb85e4c326d6


Steps:

   worker_preparation: 0

   git: 0

   shell: 0

   shell_1: 0

   shell_2: 0

   shell_3: 0

   shell_4: 0

   shell_5: 0

   compile: 1

   shell_6: 0

   shell_7: 0

   shell_8: 0

   shell_9: 0

   Rsync docs to nightlies.apache.org: 0

   shell_10: 0

   Rsync RAT to nightlies.apache.org: 0

   compile_1: 2

   shell_11: 0

   Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


-
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



Re: Buildbot failure in on tomcat-11.0.x

2023-07-27 Thread Mark Thomas
This was an APR crash on shutdown. I've see a couple of these recently 
but haven't spotted a pattern. Nor have they bee frequent enough to be 
repeatable.


Mark


On 27/07/2023 17:11, build...@apache.org wrote:

Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/496
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch main] ca06a33bd42af8f0d384802b61be83cbfd48ccc2


Steps:

   worker_preparation: 0

   git: 0

   shell: 0

   shell_1: 0

   shell_2: 0

   shell_3: 0

   shell_4: 0

   shell_5: 0

   compile: 1

   shell_6: 0

   shell_7: 0

   shell_8: 0

   shell_9: 0

   Rsync docs to nightlies.apache.org: 0

   shell_10: 0

   Rsync RAT to nightlies.apache.org: 0

   compile_1: 2

   shell_11: 0

   Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


-
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



Buildbot failure in on tomcat-10.1.x

2023-07-27 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/882
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch 10.1.x] b6da30e55895cdd0d6d5af02447fdb85e4c326d6


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 66706] The name of jar is different with the artifactId in the pom file

2023-07-27 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66706

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Mark Thomas  ---
The JAR names used in build.xml (and hence the standard Tomcat distribution)
aren't going to change.

If there are changes we can make to the POM files (not the artifactId - maybe
finalName?) then we can consider them but a key consideration will be the
impact on existing users.

I've managed to get the mvn_artifact.py script running in a Fedora VM but it
doesn't seem to be doing anything. If you could provide a test case along the
lines of:
- place this Tomcat POM and this Tomcat JAR in a directory
- run this command
- you'll see X result but we'd like to see Y result
then we can experiment to see what is possible.

-- 
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 failure in on tomcat-11.0.x

2023-07-27 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/496
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch main] ca06a33bd42af8f0d384802b61be83cbfd48ccc2


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF 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 comment

2023-07-27 Thread markt
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 3c6115e9b2 Update comment
3c6115e9b2 is described below

commit 3c6115e9b20507af902a2a32d6c7e210a2faeb46
Author: Mark Thomas 
AuthorDate: Thu Jul 27 15:48:59 2023 +0100

Update comment
---
 java/org/apache/coyote/http2/Stream.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index ece430ac6c..091f468a67 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -894,7 +894,7 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 private volatile boolean endOfStreamSent = false;
 
 /*
- * The write methods are synchronized to ensure that only one thread 
at a time is able to access the buffer.
+ * The write methods share a common lock to ensure that only one 
thread at a time is able to access the buffer.
  * Without this protection, a client that performed concurrent writes 
could corrupt the buffer.
  */
 


-
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 comment

2023-07-27 Thread markt
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 5e27393e76 Update comment
5e27393e76 is described below

commit 5e27393e76a7589438f287815391b4babb481f7e
Author: Mark Thomas 
AuthorDate: Thu Jul 27 15:48:59 2023 +0100

Update comment
---
 java/org/apache/coyote/http2/Stream.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index ff920e7536..ec80af2707 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -937,7 +937,7 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 private volatile boolean endOfStreamSent = false;
 
 /*
- * The write methods are synchronized to ensure that only one thread 
at a time is able to access the buffer.
+ * The write methods share a common lock to ensure that only one 
thread at a time is able to access the buffer.
  * Without this protection, a client that performed concurrent writes 
could corrupt the buffer.
  */
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Update comment

2023-07-27 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new b6da30e558 Update comment
b6da30e558 is described below

commit b6da30e55895cdd0d6d5af02447fdb85e4c326d6
Author: Mark Thomas 
AuthorDate: Thu Jul 27 15:48:59 2023 +0100

Update comment
---
 java/org/apache/coyote/http2/Stream.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 6b32049b82..51170e9935 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -939,7 +939,7 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 private volatile boolean endOfStreamSent = false;
 
 /*
- * The write methods are synchronized to ensure that only one thread 
at a time is able to access the buffer.
+ * The write methods share a common lock to ensure that only one 
thread at a time is able to access the buffer.
  * Without this protection, a client that performed concurrent writes 
could corrupt the buffer.
  */
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Update comment

2023-07-27 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new ca06a33bd4 Update comment
ca06a33bd4 is described below

commit ca06a33bd42af8f0d384802b61be83cbfd48ccc2
Author: Mark Thomas 
AuthorDate: Thu Jul 27 15:48:59 2023 +0100

Update comment
---
 java/org/apache/coyote/http2/Stream.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 1a4ab09743..7fa900aced 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -896,7 +896,7 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 private volatile boolean endOfStreamSent = false;
 
 /*
- * The write methods are synchronized to ensure that only one thread 
at a time is able to access the buffer.
+ * The write methods share a common lock to ensure that only one 
thread at a time is able to access the buffer.
  * Without this protection, a client that performed concurrent writes 
could corrupt the buffer.
  */
 


-
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: Refactor to reduce pinning in HTTP/2 code when using virtual threads

2023-07-27 Thread markt
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 10af915c7e Refactor to reduce pinning in HTTP/2 code when using 
virtual threads
10af915c7e is described below

commit 10af915c7e191b7d4a4b3691217f937ee2c4b1a7
Author: Mark Thomas 
AuthorDate: Thu Jul 27 15:37:59 2023 +0100

Refactor to reduce pinning in HTTP/2 code when using virtual threads
---
 java/org/apache/coyote/http2/AbstractStream.java   |  84 ---
 .../apache/coyote/http2/Http2UpgradeHandler.java   | 263 +++--
 java/org/apache/coyote/http2/RecycledStream.java   |   1 -
 java/org/apache/coyote/http2/Stream.java   |  84 ---
 .../coyote/http2/WindowAllocationManager.java  |  27 ++-
 5 files changed, 261 insertions(+), 198 deletions(-)

diff --git a/java/org/apache/coyote/http2/AbstractStream.java 
b/java/org/apache/coyote/http2/AbstractStream.java
index f332b8c593..d6fb8d8280 100644
--- a/java/org/apache/coyote/http2/AbstractStream.java
+++ b/java/org/apache/coyote/http2/AbstractStream.java
@@ -16,6 +16,10 @@
  */
 package org.apache.coyote.http2;
 
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
@@ -33,6 +37,8 @@ abstract class AbstractStream {
 private final String idAsString;
 
 private long windowSize = 
ConnectionSettingsBase.DEFAULT_INITIAL_WINDOW_SIZE;
+protected final Lock windowAllocationLock = new ReentrantLock();
+protected final Condition windowAllocationAvailable = 
windowAllocationLock.newCondition();
 
 private volatile int connectionAllocationRequested = 0;
 private volatile int connectionAllocationMade = 0;
@@ -59,13 +65,23 @@ abstract class AbstractStream {
 }
 
 
-final synchronized void setWindowSize(long windowSize) {
-this.windowSize = windowSize;
+final void setWindowSize(long windowSize) {
+windowAllocationLock.lock();
+try {
+this.windowSize = windowSize;
+} finally {
+windowAllocationLock.unlock();
+}
 }
 
 
-final synchronized long getWindowSize() {
-return windowSize;
+final long getWindowSize() {
+windowAllocationLock.lock();
+try {
+return windowSize;
+} finally {
+windowAllocationLock.unlock();
+}
 }
 
 
@@ -76,37 +92,47 @@ abstract class AbstractStream {
  *
  * @throws Http2Exception If the window size is now higher than the 
maximum allowed
  */
-synchronized void incrementWindowSize(int increment) throws Http2Exception 
{
-// No need for overflow protection here.
-// Increment can't be more than Integer.MAX_VALUE and once windowSize
-// goes beyond 2^31-1 an error is triggered.
-windowSize += increment;
-
-if (log.isDebugEnabled()) {
-log.debug(sm.getString("abstractStream.windowSizeInc", 
getConnectionId(), getIdAsString(),
-Integer.toString(increment), Long.toString(windowSize)));
-}
+void incrementWindowSize(int increment) throws Http2Exception {
+windowAllocationLock.lock();
+try {
+// No need for overflow protection here.
+// Increment can't be more than Integer.MAX_VALUE and once 
windowSize
+// goes beyond 2^31-1 an error is triggered.
+windowSize += increment;
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("abstractStream.windowSizeInc", 
getConnectionId(), getIdAsString(),
+Integer.toString(increment), 
Long.toString(windowSize)));
+}
 
-if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
-String msg = sm.getString("abstractStream.windowSizeTooBig", 
getConnectionId(), identifier,
-Integer.toString(increment), Long.toString(windowSize));
-if (identifier.intValue() == 0) {
-throw new ConnectionException(msg, 
Http2Error.FLOW_CONTROL_ERROR);
-} else {
-throw new StreamException(msg, Http2Error.FLOW_CONTROL_ERROR, 
identifier.intValue());
+if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
+String msg = sm.getString("abstractStream.windowSizeTooBig", 
getConnectionId(), identifier,
+Integer.toString(increment), 
Long.toString(windowSize));
+if (identifier.intValue() == 0) {
+throw new ConnectionException(msg, 
Http2Error.FLOW_CONTROL_ERROR);
+} else {
+throw new StreamException(msg, 
Http2Error.FLOW_CONTROL_ERROR, 

[tomcat] branch 9.0.x updated: Refactor to reduce pinning in HTTP/2 code when using virtual threads

2023-07-27 Thread markt
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 dc8f0d1b3c Refactor to reduce pinning in HTTP/2 code when using 
virtual threads
dc8f0d1b3c is described below

commit dc8f0d1b3c3d50caf84ee60b3a487928216ea432
Author: Mark Thomas 
AuthorDate: Thu Jul 27 15:37:59 2023 +0100

Refactor to reduce pinning in HTTP/2 code when using virtual threads
---
 java/org/apache/coyote/http2/AbstractStream.java   |  84 ---
 .../apache/coyote/http2/Http2UpgradeHandler.java   | 241 +++--
 java/org/apache/coyote/http2/RecycledStream.java   |   1 -
 java/org/apache/coyote/http2/Stream.java   |  84 +++
 .../coyote/http2/WindowAllocationManager.java  |  27 ++-
 5 files changed, 250 insertions(+), 187 deletions(-)

diff --git a/java/org/apache/coyote/http2/AbstractStream.java 
b/java/org/apache/coyote/http2/AbstractStream.java
index f332b8c593..d6fb8d8280 100644
--- a/java/org/apache/coyote/http2/AbstractStream.java
+++ b/java/org/apache/coyote/http2/AbstractStream.java
@@ -16,6 +16,10 @@
  */
 package org.apache.coyote.http2;
 
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
@@ -33,6 +37,8 @@ abstract class AbstractStream {
 private final String idAsString;
 
 private long windowSize = 
ConnectionSettingsBase.DEFAULT_INITIAL_WINDOW_SIZE;
+protected final Lock windowAllocationLock = new ReentrantLock();
+protected final Condition windowAllocationAvailable = 
windowAllocationLock.newCondition();
 
 private volatile int connectionAllocationRequested = 0;
 private volatile int connectionAllocationMade = 0;
@@ -59,13 +65,23 @@ abstract class AbstractStream {
 }
 
 
-final synchronized void setWindowSize(long windowSize) {
-this.windowSize = windowSize;
+final void setWindowSize(long windowSize) {
+windowAllocationLock.lock();
+try {
+this.windowSize = windowSize;
+} finally {
+windowAllocationLock.unlock();
+}
 }
 
 
-final synchronized long getWindowSize() {
-return windowSize;
+final long getWindowSize() {
+windowAllocationLock.lock();
+try {
+return windowSize;
+} finally {
+windowAllocationLock.unlock();
+}
 }
 
 
@@ -76,37 +92,47 @@ abstract class AbstractStream {
  *
  * @throws Http2Exception If the window size is now higher than the 
maximum allowed
  */
-synchronized void incrementWindowSize(int increment) throws Http2Exception 
{
-// No need for overflow protection here.
-// Increment can't be more than Integer.MAX_VALUE and once windowSize
-// goes beyond 2^31-1 an error is triggered.
-windowSize += increment;
-
-if (log.isDebugEnabled()) {
-log.debug(sm.getString("abstractStream.windowSizeInc", 
getConnectionId(), getIdAsString(),
-Integer.toString(increment), Long.toString(windowSize)));
-}
+void incrementWindowSize(int increment) throws Http2Exception {
+windowAllocationLock.lock();
+try {
+// No need for overflow protection here.
+// Increment can't be more than Integer.MAX_VALUE and once 
windowSize
+// goes beyond 2^31-1 an error is triggered.
+windowSize += increment;
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("abstractStream.windowSizeInc", 
getConnectionId(), getIdAsString(),
+Integer.toString(increment), 
Long.toString(windowSize)));
+}
 
-if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
-String msg = sm.getString("abstractStream.windowSizeTooBig", 
getConnectionId(), identifier,
-Integer.toString(increment), Long.toString(windowSize));
-if (identifier.intValue() == 0) {
-throw new ConnectionException(msg, 
Http2Error.FLOW_CONTROL_ERROR);
-} else {
-throw new StreamException(msg, Http2Error.FLOW_CONTROL_ERROR, 
identifier.intValue());
+if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
+String msg = sm.getString("abstractStream.windowSizeTooBig", 
getConnectionId(), identifier,
+Integer.toString(increment), 
Long.toString(windowSize));
+if (identifier.intValue() == 0) {
+throw new ConnectionException(msg, 
Http2Error.FLOW_CONTROL_ERROR);
+} else {
+throw new StreamException(msg, 
Http2Error.FLOW_CONTROL_ERROR, 

[tomcat] branch 10.1.x updated: Refactor to reduce pinning in HTTP/2 code when using virtual threads

2023-07-27 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new e633e73d61 Refactor to reduce pinning in HTTP/2 code when using 
virtual threads
e633e73d61 is described below

commit e633e73d616196fa26da69458fca26b31c5d436a
Author: Mark Thomas 
AuthorDate: Thu Jul 27 15:37:59 2023 +0100

Refactor to reduce pinning in HTTP/2 code when using virtual threads
---
 java/org/apache/coyote/http2/AbstractStream.java   |  84 ---
 .../apache/coyote/http2/Http2UpgradeHandler.java   | 241 +++--
 java/org/apache/coyote/http2/RecycledStream.java   |   1 -
 java/org/apache/coyote/http2/Stream.java   |  84 +++
 .../coyote/http2/WindowAllocationManager.java  |  27 ++-
 5 files changed, 250 insertions(+), 187 deletions(-)

diff --git a/java/org/apache/coyote/http2/AbstractStream.java 
b/java/org/apache/coyote/http2/AbstractStream.java
index f332b8c593..d6fb8d8280 100644
--- a/java/org/apache/coyote/http2/AbstractStream.java
+++ b/java/org/apache/coyote/http2/AbstractStream.java
@@ -16,6 +16,10 @@
  */
 package org.apache.coyote.http2;
 
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
@@ -33,6 +37,8 @@ abstract class AbstractStream {
 private final String idAsString;
 
 private long windowSize = 
ConnectionSettingsBase.DEFAULT_INITIAL_WINDOW_SIZE;
+protected final Lock windowAllocationLock = new ReentrantLock();
+protected final Condition windowAllocationAvailable = 
windowAllocationLock.newCondition();
 
 private volatile int connectionAllocationRequested = 0;
 private volatile int connectionAllocationMade = 0;
@@ -59,13 +65,23 @@ abstract class AbstractStream {
 }
 
 
-final synchronized void setWindowSize(long windowSize) {
-this.windowSize = windowSize;
+final void setWindowSize(long windowSize) {
+windowAllocationLock.lock();
+try {
+this.windowSize = windowSize;
+} finally {
+windowAllocationLock.unlock();
+}
 }
 
 
-final synchronized long getWindowSize() {
-return windowSize;
+final long getWindowSize() {
+windowAllocationLock.lock();
+try {
+return windowSize;
+} finally {
+windowAllocationLock.unlock();
+}
 }
 
 
@@ -76,37 +92,47 @@ abstract class AbstractStream {
  *
  * @throws Http2Exception If the window size is now higher than the 
maximum allowed
  */
-synchronized void incrementWindowSize(int increment) throws Http2Exception 
{
-// No need for overflow protection here.
-// Increment can't be more than Integer.MAX_VALUE and once windowSize
-// goes beyond 2^31-1 an error is triggered.
-windowSize += increment;
-
-if (log.isDebugEnabled()) {
-log.debug(sm.getString("abstractStream.windowSizeInc", 
getConnectionId(), getIdAsString(),
-Integer.toString(increment), Long.toString(windowSize)));
-}
+void incrementWindowSize(int increment) throws Http2Exception {
+windowAllocationLock.lock();
+try {
+// No need for overflow protection here.
+// Increment can't be more than Integer.MAX_VALUE and once 
windowSize
+// goes beyond 2^31-1 an error is triggered.
+windowSize += increment;
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("abstractStream.windowSizeInc", 
getConnectionId(), getIdAsString(),
+Integer.toString(increment), 
Long.toString(windowSize)));
+}
 
-if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
-String msg = sm.getString("abstractStream.windowSizeTooBig", 
getConnectionId(), identifier,
-Integer.toString(increment), Long.toString(windowSize));
-if (identifier.intValue() == 0) {
-throw new ConnectionException(msg, 
Http2Error.FLOW_CONTROL_ERROR);
-} else {
-throw new StreamException(msg, Http2Error.FLOW_CONTROL_ERROR, 
identifier.intValue());
+if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
+String msg = sm.getString("abstractStream.windowSizeTooBig", 
getConnectionId(), identifier,
+Integer.toString(increment), 
Long.toString(windowSize));
+if (identifier.intValue() == 0) {
+throw new ConnectionException(msg, 
Http2Error.FLOW_CONTROL_ERROR);
+} else {
+throw new StreamException(msg, 
Http2Error.FLOW_CONTROL_ERROR, 

[tomcat] branch main updated: Refactor to reduce pinning in HTTP/2 code when using virtual threads

2023-07-27 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 762eb130a8 Refactor to reduce pinning in HTTP/2 code when using 
virtual threads
762eb130a8 is described below

commit 762eb130a8608c18375a84276323f7cb65f7333a
Author: Mark Thomas 
AuthorDate: Thu Jul 27 15:37:59 2023 +0100

Refactor to reduce pinning in HTTP/2 code when using virtual threads
---
 java/org/apache/coyote/http2/AbstractStream.java   |  84 ---
 .../apache/coyote/http2/Http2UpgradeHandler.java   | 241 +++--
 java/org/apache/coyote/http2/RecycledStream.java   |   1 -
 java/org/apache/coyote/http2/Stream.java   |  84 +++
 .../coyote/http2/WindowAllocationManager.java  |  27 ++-
 5 files changed, 250 insertions(+), 187 deletions(-)

diff --git a/java/org/apache/coyote/http2/AbstractStream.java 
b/java/org/apache/coyote/http2/AbstractStream.java
index f332b8c593..d6fb8d8280 100644
--- a/java/org/apache/coyote/http2/AbstractStream.java
+++ b/java/org/apache/coyote/http2/AbstractStream.java
@@ -16,6 +16,10 @@
  */
 package org.apache.coyote.http2;
 
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
@@ -33,6 +37,8 @@ abstract class AbstractStream {
 private final String idAsString;
 
 private long windowSize = 
ConnectionSettingsBase.DEFAULT_INITIAL_WINDOW_SIZE;
+protected final Lock windowAllocationLock = new ReentrantLock();
+protected final Condition windowAllocationAvailable = 
windowAllocationLock.newCondition();
 
 private volatile int connectionAllocationRequested = 0;
 private volatile int connectionAllocationMade = 0;
@@ -59,13 +65,23 @@ abstract class AbstractStream {
 }
 
 
-final synchronized void setWindowSize(long windowSize) {
-this.windowSize = windowSize;
+final void setWindowSize(long windowSize) {
+windowAllocationLock.lock();
+try {
+this.windowSize = windowSize;
+} finally {
+windowAllocationLock.unlock();
+}
 }
 
 
-final synchronized long getWindowSize() {
-return windowSize;
+final long getWindowSize() {
+windowAllocationLock.lock();
+try {
+return windowSize;
+} finally {
+windowAllocationLock.unlock();
+}
 }
 
 
@@ -76,37 +92,47 @@ abstract class AbstractStream {
  *
  * @throws Http2Exception If the window size is now higher than the 
maximum allowed
  */
-synchronized void incrementWindowSize(int increment) throws Http2Exception 
{
-// No need for overflow protection here.
-// Increment can't be more than Integer.MAX_VALUE and once windowSize
-// goes beyond 2^31-1 an error is triggered.
-windowSize += increment;
-
-if (log.isDebugEnabled()) {
-log.debug(sm.getString("abstractStream.windowSizeInc", 
getConnectionId(), getIdAsString(),
-Integer.toString(increment), Long.toString(windowSize)));
-}
+void incrementWindowSize(int increment) throws Http2Exception {
+windowAllocationLock.lock();
+try {
+// No need for overflow protection here.
+// Increment can't be more than Integer.MAX_VALUE and once 
windowSize
+// goes beyond 2^31-1 an error is triggered.
+windowSize += increment;
+
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("abstractStream.windowSizeInc", 
getConnectionId(), getIdAsString(),
+Integer.toString(increment), 
Long.toString(windowSize)));
+}
 
-if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
-String msg = sm.getString("abstractStream.windowSizeTooBig", 
getConnectionId(), identifier,
-Integer.toString(increment), Long.toString(windowSize));
-if (identifier.intValue() == 0) {
-throw new ConnectionException(msg, 
Http2Error.FLOW_CONTROL_ERROR);
-} else {
-throw new StreamException(msg, Http2Error.FLOW_CONTROL_ERROR, 
identifier.intValue());
+if (windowSize > ConnectionSettingsBase.MAX_WINDOW_SIZE) {
+String msg = sm.getString("abstractStream.windowSizeTooBig", 
getConnectionId(), identifier,
+Integer.toString(increment), 
Long.toString(windowSize));
+if (identifier.intValue() == 0) {
+throw new ConnectionException(msg, 
Http2Error.FLOW_CONTROL_ERROR);
+} else {
+throw new StreamException(msg, 
Http2Error.FLOW_CONTROL_ERROR, 

[tomcat] branch 9.0.x updated: Simplify the logic

2023-07-27 Thread markt
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 a4e2a04203 Simplify the logic
a4e2a04203 is described below

commit a4e2a0420304565d5236e394ebb1ae9d6a06039e
Author: Mark Thomas 
AuthorDate: Thu Jul 27 11:42:57 2023 +0100

Simplify the logic
---
 .../org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java 
b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
index f3e763c441..325e0dd15e 100644
--- a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
+++ b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
@@ -115,8 +115,7 @@ public class WsRemoteEndpointImplServer extends 
WsRemoteEndpointImplBase {
 socketWrapperLockCount = 1;
 }
 while (!messagePartInProgress.tryAcquire()) {
-long timeout = timeoutExpiry - System.currentTimeMillis();
-if (timeout < 0) {
+if (timeoutExpiry < System.currentTimeMillis()) {
 return false;
 }
 try {


-
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: Simplify the logic

2023-07-27 Thread markt
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 e0b8faba50 Simplify the logic
e0b8faba50 is described below

commit e0b8faba50b7e6192a271c7110442cc6cd9934b9
Author: Mark Thomas 
AuthorDate: Thu Jul 27 11:42:57 2023 +0100

Simplify the logic
---
 .../org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java 
b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
index bf54fe31c8..67ef75204c 100644
--- a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
+++ b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
@@ -115,8 +115,7 @@ public class WsRemoteEndpointImplServer extends 
WsRemoteEndpointImplBase {
 socketWrapperLockCount = 1;
 }
 while (!messagePartInProgress.tryAcquire()) {
-long timeout = timeoutExpiry - System.currentTimeMillis();
-if (timeout < 0) {
+if (timeoutExpiry < System.currentTimeMillis()) {
 return false;
 }
 try {


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Simplify the logic

2023-07-27 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new e3b5d0567d Simplify the logic
e3b5d0567d is described below

commit e3b5d0567d2c1edb88845dd54e537c9b6d3aaaf5
Author: Mark Thomas 
AuthorDate: Thu Jul 27 11:42:57 2023 +0100

Simplify the logic
---
 .../org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java 
b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
index d68ab42ad3..57fcc97d56 100644
--- a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
+++ b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
@@ -115,8 +115,7 @@ public class WsRemoteEndpointImplServer extends 
WsRemoteEndpointImplBase {
 socketWrapperLockCount = 1;
 }
 while (!messagePartInProgress.tryAcquire()) {
-long timeout = timeoutExpiry - System.currentTimeMillis();
-if (timeout < 0) {
+if (timeoutExpiry < System.currentTimeMillis()) {
 return false;
 }
 try {


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Simplify the logic

2023-07-27 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 35b8e5ba96 Simplify the logic
35b8e5ba96 is described below

commit 35b8e5ba9678d5963a69f0056514305c6c99261d
Author: Mark Thomas 
AuthorDate: Thu Jul 27 11:42:57 2023 +0100

Simplify the logic
---
 .../org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java 
b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
index 396de502e3..b520f394af 100644
--- a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
+++ b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
@@ -110,8 +110,7 @@ public class WsRemoteEndpointImplServer extends 
WsRemoteEndpointImplBase {
 
 int socketWrapperLockCount = socketWrapper.getLock().getHoldCount();
 while (!messagePartInProgress.tryAcquire()) {
-long timeout = timeoutExpiry - System.currentTimeMillis();
-if (timeout < 0) {
+if (timeoutExpiry < System.currentTimeMillis()) {
 return false;
 }
 try {


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] jfclere commented on pull request #641: Add DESTROYED state (if DESTROYED we are already STOPPED).

2023-07-27 Thread via GitHub


jfclere commented on PR #641:
URL: https://github.com/apache/tomcat/pull/641#issuecomment-1653258265

   OK the  lot of times is because of the Thread.sleep(500); in 
checkResources() in HostConfig.


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

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



[Bug 66792] unpacked war application for virtual host fails

2023-07-27 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66792

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|REOPENED|RESOLVED

--- Comment #4 from Mark Thomas  ---
Again, this is a file-permission issue in your environment, not a Tomcat bug.

Please direct your question(s) to the Tomcat users mailing list for community
support.

-- 
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 66792] unpacked war application for virtual host fails

2023-07-27 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66792

--- Comment #3 from olivier.roq...@univ-toulouse.fr ---
I have tried to move the orcidapps folder outside /var/lib/tomcat9 and it works
also perfectly.

It seems there are special rules inside /vr/lib/tomcat9 thatt i don't
understand.

-- 
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 66792] unpacked war application for virtual host fails

2023-07-27 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66792

olivier.roq...@univ-toulouse.fr changed:

   What|Removed |Added

 Resolution|INVALID |---
 Status|RESOLVED|REOPENED

--- Comment #2 from olivier.roq...@univ-toulouse.fr ---
(In reply to Christopher Schultz from comment #1)
> This is a file-permission issue in your environment, not a Tomcat bug.
> 

Thank you for your answer.

The rights, the owner and the group  of the appBase folder are exactly the same
than the webapps folder (in wich unapacking jars works as expected)

drwxrwxr-x 1 tomcat tomcat orcidapps



Is there special grant in Tomcat policy to set ?

-- 
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