[Bug 65390] Problem in the code generated by jasper

2021-07-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65390

Mark Thomas  changed:

   What|Removed |Added

 CC||janpier.san...@softwell.com
   ||.br

--- Comment #13 from Mark Thomas  ---
*** Bug 65414 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 65414] Problem compiling JSP using multiple taglib

2021-07-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65414

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #4 from Mark Thomas  ---


*** This bug has been marked as a duplicate of bug 65390 ***

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



Re: Fwd: [Bug 56430] Extension mapping that includes a dot in the extension does not work

2021-07-01 Thread Mark Thomas

On 30/06/2021 23:13, Christopher Schultz wrote:

All,

I don't believe I have any BZ karma at all, but this user has duplicated 
old comments and inserted spam URLs into the comment stream. Can someone 
kill this stuff?


Yes. Felix or I can do it. I've just removed it.

Please don't duplicate the spam by forwarding it to the mailing list.

Mark




-chris

 Forwarded Message 
Subject: [Bug 56430] Extension mapping that includes a dot in the 
extension does not work

Date: Wed, 30 Jun 2021 20:58:16 +
From: bugzi...@apache.org
Reply-To: Tomcat Developers List 
To: dev@tomcat.apache.org

https://bz.apache.org/bugzilla/show_bug.cgi?id=56430

jullieverma  changed:




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



[GitHub] [tomcat-jakartaee-migration] martin-g commented on issue #21: facing issue while migrating the war

2021-07-01 Thread GitBox


martin-g commented on issue #21:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/issues/21#issuecomment-872208372


   I believe this should just work.
   Please create a demo application at Github and share it with us.


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



[tomcat] branch main updated: Add missing message parameters

2021-07-01 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 fed303a  Add missing message parameters
fed303a is described below

commit fed303a36f5e367efc0123fcb2f5dab8c4e909c7
Author: Mark Thomas 
AuthorDate: Thu Jul 1 13:41:40 2021 +0100

Add missing message parameters
---
 java/org/apache/coyote/http2/Stream.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 8d93d98..cad1079 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -662,8 +662,8 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 inputBuffer.swallowUnread();
 }
 } catch (IOException ioe) {
-ConnectionException ce = new ConnectionException(
-sm.getString("stream.reset.fail"), 
Http2Error.PROTOCOL_ERROR, ioe);
+ConnectionException ce = new ConnectionException(sm.getString(
+"stream.reset.fail", getConnectionId(), 
getIdAsString()), Http2Error.PROTOCOL_ERROR, ioe);
 handler.closeConnection(ce);
 }
 } else {

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



[tomcat] branch 10.0.x updated: Add missing message parameters

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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new edb60f3  Add missing message parameters
edb60f3 is described below

commit edb60f3208ccf92e50e84d05823efbb121afe353
Author: Mark Thomas 
AuthorDate: Thu Jul 1 13:41:40 2021 +0100

Add missing message parameters
---
 java/org/apache/coyote/http2/Stream.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 8d93d98..cad1079 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -662,8 +662,8 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 inputBuffer.swallowUnread();
 }
 } catch (IOException ioe) {
-ConnectionException ce = new ConnectionException(
-sm.getString("stream.reset.fail"), 
Http2Error.PROTOCOL_ERROR, ioe);
+ConnectionException ce = new ConnectionException(sm.getString(
+"stream.reset.fail", getConnectionId(), 
getIdAsString()), Http2Error.PROTOCOL_ERROR, ioe);
 handler.closeConnection(ce);
 }
 } else {

-
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 missing message parameters

2021-07-01 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 b9d457f  Add missing message parameters
b9d457f is described below

commit b9d457fc21e2cfc23aa46846626dca2580de9b8e
Author: Mark Thomas 
AuthorDate: Thu Jul 1 13:41:40 2021 +0100

Add missing message parameters
---
 java/org/apache/coyote/http2/Stream.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 63498cd..307d2a9 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -662,8 +662,8 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 inputBuffer.swallowUnread();
 }
 } catch (IOException ioe) {
-ConnectionException ce = new ConnectionException(
-sm.getString("stream.reset.fail"), 
Http2Error.PROTOCOL_ERROR, ioe);
+ConnectionException ce = new ConnectionException(sm.getString(
+"stream.reset.fail", getConnectionId(), 
getIdAsString()), Http2Error.PROTOCOL_ERROR, ioe);
 handler.closeConnection(ce);
 }
 } else {

-
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 missing message parameters

2021-07-01 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 12467e1  Add missing message parameters
12467e1 is described below

commit 12467e1bd1f5097cc42445001b1c98fc9b9c1a2f
Author: Mark Thomas 
AuthorDate: Thu Jul 1 13:41:40 2021 +0100

Add missing message parameters
---
 java/org/apache/coyote/http2/Stream.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index b07b8e2..1c5d6c7 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -621,8 +621,8 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 inputBuffer.swallowUnread();
 }
 } catch (IOException ioe) {
-ConnectionException ce = new ConnectionException(
-sm.getString("stream.reset.fail"), 
Http2Error.PROTOCOL_ERROR, ioe);
+ConnectionException ce = new ConnectionException(sm.getString(
+"stream.reset.fail", getConnectionId(), 
getIdAsString()), Http2Error.PROTOCOL_ERROR, ioe);
 handler.closeConnection(ce);
 }
 } else {

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



[Bug 65410] TestXxxEndpoint testUnixDomainSocket fails with an Error on Windows 10, should be skipped

2021-07-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65410

Remy Maucherat  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #5 from Remy Maucherat  ---
Great !

-- 
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 65408] tomcat8.5.X occurs an AssertionError occationally after running for a period of time

2021-07-01 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65408

--- Comment #3 from Christopher Schultz  ---
Is it possible to re-test with JRE 8.latest? Your version is quite old. How
reproducible is 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



[tomcat] branch main updated: Simplify

2021-07-01 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 bd83b29  Simplify
bd83b29 is described below

commit bd83b290f2e94a70c9f59ec55ce5bfd5eaf743e3
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:05:20 2021 +0100

Simplify

The logic used to obtain connectionReservation and streamReservartion
means that streamReservation >= connectionReservation
---
 java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
index 6c5ddde..000d3ab 100644
--- a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
@@ -312,7 +312,9 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 } catch (IOException e) {
 return SendfileState.ERROR;
 }
-// Actually perform the write
+
+// connectionReservation will always be smaller than or the same as
+// streamReservation
 int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
 boolean finished = (frameSize == sendfile.left) && 
sendfile.stream.getCoyoteResponse().getTrailerFields() == null;
 
@@ -374,7 +376,10 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 failed (e, sendfile);
 return;
 }
-int frameSize = Integer.min(getMaxFrameSize(), 
Integer.min(sendfile.streamReservation, sendfile.connectionReservation));
+
+// connectionReservation will always be smaller than or the same as
+// streamReservation
+int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
 boolean finished = (frameSize == sendfile.left) && 
sendfile.stream.getCoyoteResponse().getTrailerFields() == null;
 
 // Need to check this now since sending end of stream will change 
this.

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



[tomcat] branch 10.0.x updated: Simplify

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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 47a27e4  Simplify
47a27e4 is described below

commit 47a27e47e94acc2e66545032fa5a4c5420b204d7
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:05:20 2021 +0100

Simplify

The logic used to obtain connectionReservation and streamReservartion
means that streamReservation >= connectionReservation
---
 java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
index 6c5ddde..000d3ab 100644
--- a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
@@ -312,7 +312,9 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 } catch (IOException e) {
 return SendfileState.ERROR;
 }
-// Actually perform the write
+
+// connectionReservation will always be smaller than or the same as
+// streamReservation
 int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
 boolean finished = (frameSize == sendfile.left) && 
sendfile.stream.getCoyoteResponse().getTrailerFields() == null;
 
@@ -374,7 +376,10 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 failed (e, sendfile);
 return;
 }
-int frameSize = Integer.min(getMaxFrameSize(), 
Integer.min(sendfile.streamReservation, sendfile.connectionReservation));
+
+// connectionReservation will always be smaller than or the same as
+// streamReservation
+int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
 boolean finished = (frameSize == sendfile.left) && 
sendfile.stream.getCoyoteResponse().getTrailerFields() == null;
 
 // Need to check this now since sending end of stream will change 
this.

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

2021-07-01 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 0c7ad6f  Simplify
0c7ad6f is described below

commit 0c7ad6fd40d903cae8464e923c10da51764b7254
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:05:20 2021 +0100

Simplify

The logic used to obtain connectionReservation and streamReservartion
means that streamReservation >= connectionReservation
---
 java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
index 13b6300..08ee177 100644
--- a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
@@ -312,7 +312,9 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 } catch (IOException e) {
 return SendfileState.ERROR;
 }
-// Actually perform the write
+
+// connectionReservation will always be smaller than or the same as
+// streamReservation
 int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
 boolean finished = (frameSize == sendfile.left) && 
sendfile.stream.getCoyoteResponse().getTrailerFields() == null;
 
@@ -374,7 +376,10 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 failed (e, sendfile);
 return;
 }
-int frameSize = Integer.min(getMaxFrameSize(), 
Integer.min(sendfile.streamReservation, sendfile.connectionReservation));
+
+// connectionReservation will always be smaller than or the same as
+// streamReservation
+int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
 boolean finished = (frameSize == sendfile.left) && 
sendfile.stream.getCoyoteResponse().getTrailerFields() == null;
 
 // Need to check this now since sending end of stream will change 
this.

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



[tomcat] branch main updated: Add debug logging to sendfile writes

2021-07-01 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 234ca05  Add debug logging to sendfile writes
234ca05 is described below

commit 234ca05eb4071a0b3c64e876f58e3c248b5b75fb
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:12:55 2021 +0100

Add debug logging to sendfile writes
---
 .../apache/coyote/http2/Http2AsyncUpgradeHandler.java  | 18 ++
 java/org/apache/coyote/http2/LocalStrings.properties   |  1 +
 webapps/docs/changelog.xml |  3 +++
 3 files changed, 22 insertions(+)

diff --git a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
index 000d3ab..2ff351a 100644
--- a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
@@ -313,6 +313,11 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 return SendfileState.ERROR;
 }
 
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.sendfile.reservation", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.valueOf(sendfile.connectionReservation), 
Integer.valueOf(sendfile.streamReservation)));
+}
+
 // connectionReservation will always be smaller than or the same as
 // streamReservation
 int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
@@ -331,6 +336,10 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 }
 }
 if (writeable) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.writeBody", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.toString(frameSize), 
Boolean.valueOf(finished)));
+}
 ByteUtil.set31Bits(header, 5, sendfile.stream.getIdAsInt());
 sendfile.mappedBuffer.limit(sendfile.mappedBuffer.position() + 
frameSize);
 socketWrapper.write(BlockingMode.SEMI_BLOCK, 
protocol.getWriteTimeout(),
@@ -377,6 +386,11 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 return;
 }
 
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.sendfile.reservation", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.valueOf(sendfile.connectionReservation), 
Integer.valueOf(sendfile.streamReservation)));
+}
+
 // connectionReservation will always be smaller than or the same as
 // streamReservation
 int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
@@ -395,6 +409,10 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 }
 }
 if (writeable) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.writeBody", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.toString(frameSize), 
Boolean.valueOf(finished)));
+}
 ByteUtil.set31Bits(header, 5, sendfile.stream.getIdAsInt());
 sendfile.mappedBuffer.limit(sendfile.mappedBuffer.position() + 
frameSize);
 socketWrapper.write(BlockingMode.SEMI_BLOCK, 
protocol.getWriteTimeout(),
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 3b971a7..cf36ded 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -143,6 +143,7 @@ upgradeHandler.prunedPriority=Connection [{0}] Pruned 
unused stream [{1}] that m
 upgradeHandler.releaseBacklog=Connection [{0}], Stream [{1}] released from 
backlog
 upgradeHandler.reset.receive=Connection [{0}], Stream [{1}], Reset received 
due to [{2}]
 upgradeHandler.rst.debug=Connection [{0}], Stream [{1}], Error [{2}], Message 
[{3}],  RST (closing stream)
+upgradeHandler.sendfile.reservation=Connection [{0}], Stream [{1}], Connection 
reservation [{2}], Stream reservation [{3}] prior to sendfile write
 upgradeHandler.sendPrefaceFail=Connection [{0}], Failed to send preface to 
client
 upgradeHandler.socketCloseFailed=Error closing socket
 upgradeHandler.startRequestBodyFrame.result=Connection [{0}], Stream [{1}] 
startRequestBodyFrame returned [{2}]
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index dce18b3..6272e52 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -123,6 +123,9 @@
 checks both the stream and connection f

[tomcat] branch 10.0.x updated: Add debug logging to sendfile writes

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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 9f68585  Add debug logging to sendfile writes
9f68585 is described below

commit 9f68585f7910e4e131055a7c04f6cc37f022d7c7
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:12:55 2021 +0100

Add debug logging to sendfile writes
---
 .../apache/coyote/http2/Http2AsyncUpgradeHandler.java  | 18 ++
 java/org/apache/coyote/http2/LocalStrings.properties   |  1 +
 webapps/docs/changelog.xml |  3 +++
 3 files changed, 22 insertions(+)

diff --git a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
index 000d3ab..2ff351a 100644
--- a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
@@ -313,6 +313,11 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 return SendfileState.ERROR;
 }
 
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.sendfile.reservation", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.valueOf(sendfile.connectionReservation), 
Integer.valueOf(sendfile.streamReservation)));
+}
+
 // connectionReservation will always be smaller than or the same as
 // streamReservation
 int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
@@ -331,6 +336,10 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 }
 }
 if (writeable) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.writeBody", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.toString(frameSize), 
Boolean.valueOf(finished)));
+}
 ByteUtil.set31Bits(header, 5, sendfile.stream.getIdAsInt());
 sendfile.mappedBuffer.limit(sendfile.mappedBuffer.position() + 
frameSize);
 socketWrapper.write(BlockingMode.SEMI_BLOCK, 
protocol.getWriteTimeout(),
@@ -377,6 +386,11 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 return;
 }
 
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.sendfile.reservation", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.valueOf(sendfile.connectionReservation), 
Integer.valueOf(sendfile.streamReservation)));
+}
+
 // connectionReservation will always be smaller than or the same as
 // streamReservation
 int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
@@ -395,6 +409,10 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 }
 }
 if (writeable) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.writeBody", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.toString(frameSize), 
Boolean.valueOf(finished)));
+}
 ByteUtil.set31Bits(header, 5, sendfile.stream.getIdAsInt());
 sendfile.mappedBuffer.limit(sendfile.mappedBuffer.position() + 
frameSize);
 socketWrapper.write(BlockingMode.SEMI_BLOCK, 
protocol.getWriteTimeout(),
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 3b971a7..cf36ded 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -143,6 +143,7 @@ upgradeHandler.prunedPriority=Connection [{0}] Pruned 
unused stream [{1}] that m
 upgradeHandler.releaseBacklog=Connection [{0}], Stream [{1}] released from 
backlog
 upgradeHandler.reset.receive=Connection [{0}], Stream [{1}], Reset received 
due to [{2}]
 upgradeHandler.rst.debug=Connection [{0}], Stream [{1}], Error [{2}], Message 
[{3}],  RST (closing stream)
+upgradeHandler.sendfile.reservation=Connection [{0}], Stream [{1}], Connection 
reservation [{2}], Stream reservation [{3}] prior to sendfile write
 upgradeHandler.sendPrefaceFail=Connection [{0}], Failed to send preface to 
client
 upgradeHandler.socketCloseFailed=Error closing socket
 upgradeHandler.startRequestBodyFrame.result=Connection [{0}], Stream [{1}] 
startRequestBodyFrame returned [{2}]
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 48e95c8..05a923e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -123,6 +123,9 @@
 checks both the stream and connecti

[tomcat] branch 9.0.x updated: Add debug logging to sendfile writes

2021-07-01 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 4371325  Add debug logging to sendfile writes
4371325 is described below

commit 4371325966350c938d206a1a3b085759fa99c7a3
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:12:55 2021 +0100

Add debug logging to sendfile writes
---
 .../apache/coyote/http2/Http2AsyncUpgradeHandler.java  | 18 ++
 java/org/apache/coyote/http2/LocalStrings.properties   |  1 +
 webapps/docs/changelog.xml |  3 +++
 3 files changed, 22 insertions(+)

diff --git a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
index 08ee177..a79a7a8 100644
--- a/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
@@ -313,6 +313,11 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 return SendfileState.ERROR;
 }
 
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.sendfile.reservation", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.valueOf(sendfile.connectionReservation), 
Integer.valueOf(sendfile.streamReservation)));
+}
+
 // connectionReservation will always be smaller than or the same as
 // streamReservation
 int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
@@ -331,6 +336,10 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 }
 }
 if (writeable) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.writeBody", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.toString(frameSize), 
Boolean.valueOf(finished)));
+}
 ByteUtil.set31Bits(header, 5, sendfile.stream.getIdAsInt());
 sendfile.mappedBuffer.limit(sendfile.mappedBuffer.position() + 
frameSize);
 socketWrapper.write(BlockingMode.SEMI_BLOCK, 
protocol.getWriteTimeout(),
@@ -377,6 +386,11 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 return;
 }
 
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.sendfile.reservation", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.valueOf(sendfile.connectionReservation), 
Integer.valueOf(sendfile.streamReservation)));
+}
+
 // connectionReservation will always be smaller than or the same as
 // streamReservation
 int frameSize = Integer.min(getMaxFrameSize(), 
sendfile.connectionReservation);
@@ -395,6 +409,10 @@ public class Http2AsyncUpgradeHandler extends 
Http2UpgradeHandler {
 }
 }
 if (writeable) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("upgradeHandler.writeBody", 
connectionId, sendfile.stream.getIdAsString(),
+Integer.toString(frameSize), 
Boolean.valueOf(finished)));
+}
 ByteUtil.set31Bits(header, 5, sendfile.stream.getIdAsInt());
 sendfile.mappedBuffer.limit(sendfile.mappedBuffer.position() + 
frameSize);
 socketWrapper.write(BlockingMode.SEMI_BLOCK, 
protocol.getWriteTimeout(),
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 3b971a7..cf36ded 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -143,6 +143,7 @@ upgradeHandler.prunedPriority=Connection [{0}] Pruned 
unused stream [{1}] that m
 upgradeHandler.releaseBacklog=Connection [{0}], Stream [{1}] released from 
backlog
 upgradeHandler.reset.receive=Connection [{0}], Stream [{1}], Reset received 
due to [{2}]
 upgradeHandler.rst.debug=Connection [{0}], Stream [{1}], Error [{2}], Message 
[{3}],  RST (closing stream)
+upgradeHandler.sendfile.reservation=Connection [{0}], Stream [{1}], Connection 
reservation [{2}], Stream reservation [{3}] prior to sendfile write
 upgradeHandler.sendPrefaceFail=Connection [{0}], Failed to send preface to 
client
 upgradeHandler.socketCloseFailed=Error closing socket
 upgradeHandler.startRequestBodyFrame.result=Connection [{0}], Stream [{1}] 
startRequestBodyFrame returned [{2}]
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9c19ee9..7538ad1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -123,6 +123,9 @@
 checks both the stream and connection

[tomcat] branch main updated: Fix a possible connection stall during concurrent stream write

2021-07-01 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 5dcc5aa  Fix a possible connection stall during concurrent stream write
5dcc5aa is described below

commit 5dcc5aa726f6b39b2a74d4d914375b65c9c9fc5d
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:24:06 2021 +0100

Fix a possible connection stall during concurrent stream write

The stall could occur in the following circumstances:
- all current streams were in the backlog and received partial
  allocations
- not all streams have acted on their allocation (i.e. the connection
  window size is currently >0)
- one or more window updates arrive for the connection before the
  connection window size reaches zero
- no further window updates are received after the window size reaches
  zero

This could be recreated with a simple HTML page that loaded three large
(1MB) images when called with "nghttp -vnsay
https://localhost:8443/test/index.html";
---
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 14 +-
 webapps/docs/changelog.xml|  7 +++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 045d95e..807980a 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -980,7 +980,17 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 synchronized (this) {
 long windowSize = getWindowSize();
 if (windowSize < 1 && windowSize + increment > 0) {
+//  Connection window is completed exhausted. Assume there will
+// be streams to notify. The overhead is minimal if there are
+// none.
 streamsToNotify = releaseBackLog((int) (windowSize 
+increment));
+} else if (backLogSize > 0) {
+// While windowSize is greater than zero, all of it has already
+// been allocated to streams in the backlog (or just about to
+// exit the backlog). If any of windowSize was unallocated or
+// 'spare', backLogSize would be zero. Therefore, apply this
+// addition allocation to the backlog.
+streamsToNotify = releaseBackLog(increment);
 }
 super.incrementWindowSize(increment);
 }
@@ -1070,7 +1080,9 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 // Loop until we run out of allocation or recipients
 while (leftToAllocate > 0) {
 if (recipients.size() == 0) {
-backLogStreams.remove(stream);
+if (tracker.getUnusedAllocation() == 0) {
+backLogStreams.remove(stream);
+}
 return leftToAllocate;
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6272e52..ae7b61f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -126,6 +126,13 @@
   
 Add debug logging for writing an HTTP/2 response via sendfile. (markt)
   
+  
+Correct bugs in the HTTP/2 connection flow control management that 
meant
+it was possible for a connection to stall waiting for a connection flow
+control window update that had already arrived. Any streams on that
+connection that were trying to write when this happened would time out.
+(markt)
+  
 
   
   

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



[tomcat] branch 10.0.x updated: Fix a possible connection stall during concurrent stream write

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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 469c6f1  Fix a possible connection stall during concurrent stream write
469c6f1 is described below

commit 469c6f13f598381d7b48de2b8229949956475720
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:24:06 2021 +0100

Fix a possible connection stall during concurrent stream write

The stall could occur in the following circumstances:
- all current streams were in the backlog and received partial
  allocations
- not all streams have acted on their allocation (i.e. the connection
  window size is currently >0)
- one or more window updates arrive for the connection before the
  connection window size reaches zero
- no further window updates are received after the window size reaches
  zero

This could be recreated with a simple HTML page that loaded three large
(1MB) images when called with "nghttp -vnsay
https://localhost:8443/test/index.html";
---
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 14 +-
 webapps/docs/changelog.xml|  7 +++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 045d95e..807980a 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -980,7 +980,17 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 synchronized (this) {
 long windowSize = getWindowSize();
 if (windowSize < 1 && windowSize + increment > 0) {
+//  Connection window is completed exhausted. Assume there will
+// be streams to notify. The overhead is minimal if there are
+// none.
 streamsToNotify = releaseBackLog((int) (windowSize 
+increment));
+} else if (backLogSize > 0) {
+// While windowSize is greater than zero, all of it has already
+// been allocated to streams in the backlog (or just about to
+// exit the backlog). If any of windowSize was unallocated or
+// 'spare', backLogSize would be zero. Therefore, apply this
+// addition allocation to the backlog.
+streamsToNotify = releaseBackLog(increment);
 }
 super.incrementWindowSize(increment);
 }
@@ -1070,7 +1080,9 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 // Loop until we run out of allocation or recipients
 while (leftToAllocate > 0) {
 if (recipients.size() == 0) {
-backLogStreams.remove(stream);
+if (tracker.getUnusedAllocation() == 0) {
+backLogStreams.remove(stream);
+}
 return leftToAllocate;
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 05a923e..5e38a55 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -126,6 +126,13 @@
   
 Add debug logging for writing an HTTP/2 response via sendfile. (markt)
   
+  
+Correct bugs in the HTTP/2 connection flow control management that 
meant
+it was possible for a connection to stall waiting for a connection flow
+control window update that had already arrived. Any streams on that
+connection that were trying to write when this happened would time out.
+(markt)
+  
 
   
   

-
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: Fix a possible connection stall during concurrent stream write

2021-07-01 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 50015e6  Fix a possible connection stall during concurrent stream write
50015e6 is described below

commit 50015e6946ca2d4bd3384aa1106bfc5d0fff6c19
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:24:06 2021 +0100

Fix a possible connection stall during concurrent stream write

The stall could occur in the following circumstances:
- all current streams were in the backlog and received partial
  allocations
- not all streams have acted on their allocation (i.e. the connection
  window size is currently >0)
- one or more window updates arrive for the connection before the
  connection window size reaches zero
- no further window updates are received after the window size reaches
  zero

This could be recreated with a simple HTML page that loaded three large
(1MB) images when called with "nghttp -vnsay
https://localhost:8443/test/index.html";
---
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 14 +-
 webapps/docs/changelog.xml|  7 +++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index dbdac14..add82e7 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -980,7 +980,17 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 synchronized (this) {
 long windowSize = getWindowSize();
 if (windowSize < 1 && windowSize + increment > 0) {
+//  Connection window is completed exhausted. Assume there will
+// be streams to notify. The overhead is minimal if there are
+// none.
 streamsToNotify = releaseBackLog((int) (windowSize 
+increment));
+} else if (backLogSize > 0) {
+// While windowSize is greater than zero, all of it has already
+// been allocated to streams in the backlog (or just about to
+// exit the backlog). If any of windowSize was unallocated or
+// 'spare', backLogSize would be zero. Therefore, apply this
+// addition allocation to the backlog.
+streamsToNotify = releaseBackLog(increment);
 }
 super.incrementWindowSize(increment);
 }
@@ -1070,7 +1080,9 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 // Loop until we run out of allocation or recipients
 while (leftToAllocate > 0) {
 if (recipients.size() == 0) {
-backLogStreams.remove(stream);
+if (tracker.getUnusedAllocation() == 0) {
+backLogStreams.remove(stream);
+}
 return leftToAllocate;
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7538ad1..709b40d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -126,6 +126,13 @@
   
 Add debug logging for writing an HTTP/2 response via sendfile. (markt)
   
+  
+Correct bugs in the HTTP/2 connection flow control management that 
meant
+it was possible for a connection to stall waiting for a connection flow
+control window update that had already arrived. Any streams on that
+connection that were trying to write when this happened would time out.
+(markt)
+  
 
   
   

-
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: Fix a possible connection stall during concurrent stream write

2021-07-01 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 7ecbffd  Fix a possible connection stall during concurrent stream write
7ecbffd is described below

commit 7ecbffdc8c391f78af3570dd22e64c93aabd8f8b
Author: Mark Thomas 
AuthorDate: Thu Jul 1 19:24:06 2021 +0100

Fix a possible connection stall during concurrent stream write

The stall could occur in the following circumstances:
- all current streams were in the backlog and received partial
  allocations
- not all streams have acted on their allocation (i.e. the connection
  window size is currently >0)
- one or more window updates arrive for the connection before the
  connection window size reaches zero
- no further window updates are received after the window size reaches
  zero

This could be recreated with a simple HTML page that loaded three large
(1MB) images when called with "nghttp -vnsay
https://localhost:8443/test/index.html";
---
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 14 +-
 webapps/docs/changelog.xml| 11 +++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index e990f41..b994e92 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -983,7 +983,17 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 synchronized (this) {
 long windowSize = getWindowSize();
 if (windowSize < 1 && windowSize + increment > 0) {
+//  Connection window is completed exhausted. Assume there will
+// be streams to notify. The overhead is minimal if there are
+// none.
 streamsToNotify = releaseBackLog((int) (windowSize 
+increment));
+} else if (backLogSize > 0) {
+// While windowSize is greater than zero, all of it has already
+// been allocated to streams in the backlog (or just about to
+// exit the backlog). If any of windowSize was unallocated or
+// 'spare', backLogSize would be zero. Therefore, apply this
+// addition allocation to the backlog.
+streamsToNotify = releaseBackLog(increment);
 }
 super.incrementWindowSize(increment);
 }
@@ -1061,7 +1071,9 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 // Loop until we run out of allocation or recipients
 while (leftToAllocate > 0) {
 if (recipients.size() == 0) {
-backLogStreams.remove(stream);
+if (tracker.getUnusedAllocation() == 0) {
+backLogStreams.remove(stream);
+}
 return leftToAllocate;
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ad85d11..7445db5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -114,6 +114,17 @@
   
 
   
+  
+
+  
+Correct bugs in the HTTP/2 connection flow control management that 
meant
+it was possible for a connection to stall waiting for a connection flow
+control window update that had already arrived. Any streams on that
+connection that were trying to write when this happened would time out.
+(markt)
+  
+
+  
 
 
   

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