[tomcat] branch 9.0.x updated: Avoid most of the thread pool use during NIO2 socket accept

2020-10-29 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 3f2df25  Avoid most of the thread pool use during NIO2 socket accept
3f2df25 is described below

commit 3f2df25b8e5a7a7be595437a2fcea8040ed71fd4
Author: remm 
AuthorDate: Thu Oct 29 22:26:09 2020 +0100

Avoid most of the thread pool use during NIO2 socket accept

When maxConnections is not -1, the socket accept of NIO2 competes with
the other request execution activities. This can be avoided when it is
known that it will not block.
Patch submitted by Anil Gursel.
---
 java/org/apache/tomcat/util/net/Nio2Endpoint.java | 8 
 webapps/docs/changelog.xml| 4 
 2 files changed, 12 insertions(+)

diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java 
b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
index 284f342..15873ec 100644
--- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java
+++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
@@ -434,6 +434,14 @@ public class Nio2Endpoint extends 
AbstractJsseEndpointSocketTimeoutException instances
 that did not have one. (markt)
   
+  
+Avoid most of the thread pool use during NIO2 socket accept. Patch
+submitted by Anil Gursel. (remm)
+  
 
   
   


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



[tomcat] branch master updated: Avoid most of the thread pool use during NIO2 socket accept

2020-10-29 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 7444f1e  Avoid most of the thread pool use during NIO2 socket accept
7444f1e is described below

commit 7444f1e13b091e0c140cf4959c4530e84ef67fdd
Author: remm 
AuthorDate: Thu Oct 29 22:26:09 2020 +0100

Avoid most of the thread pool use during NIO2 socket accept

When maxConnections is not -1, the socket accept of NIO2 competes with
the other request execution activities. This can be avoided when it is
known that it will not block.
Patch submitted by Anil Gursel.
---
 java/org/apache/tomcat/util/net/Nio2Endpoint.java | 8 
 webapps/docs/changelog.xml| 4 
 2 files changed, 12 insertions(+)

diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java 
b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
index 1d218a5..7bd882e 100644
--- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java
+++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
@@ -422,6 +422,14 @@ public class Nio2Endpoint extends 
AbstractJsseEndpointSocketTimeoutException instances
 that did not have one. (markt)
   
+  
+Avoid most of the thread pool use during NIO2 socket accept. Patch
+submitted by Anil Gursel. (remm)
+  
 
   
   


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



Re: JPMS module names

2020-10-29 Thread Mark Thomas
Hi all,

Just a reminder that this is on the radar. I'll likely be looking to
make these changes early next week as part of the prep for the next
release round (I need to sort this to be able to fix BZ 64849 sensibly).

Mark


On 27/10/2020 20:04, Mark Thomas wrote:
> Hi all,
> 
> We are starting to get JPMS related bug reports. Resolving the issues is
> technically simple but depends on us deciding on the names to use for
> the various modules.
> 
> The names we choose for our own modules are easy. Generally we are using
> the same or derivation from the OSGi module name.
> 
> The names we use for the spec API modules are a little more tricky. We
> need to (try and) remain aligned with the RI spec JARs.
> 
> It looks like Jakarta EE 9 onwards is going to have consistent naming
> (at least it does for the modules we use). Java EE 8 / Jakarta EE 8 is a
> bit more inconsistent.
> 
> I have put together a wiki page that documents the current position and
> the naming I propose we use in Tomcat.
> 
> https://cwiki.apache.org/confluence/display/TOMCAT/JPMS+names
> 
> Comments (in this thread ideally) welcome.
> 
> Once we (appear to) have consensus I'll update the builds to use the new
> names and start fixing the associated bugs.
> 
> Mark
> 
> -
> 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: svn/git for website

2020-10-29 Thread Mark Thomas
On 29/10/2020 19:27, Igal Sapir wrote:
> Dave,
> 
> On Wed, Oct 28, 2020 at 9:36 PM Dave Fisher  wrote:
> 
>> Hi -
>>
>> I may have helpful ideas. Tell me where the Tomcst site repository and
>> build are located.
>>
> 
> The SVN repo for the Tomcat site is at
> http://svn.apache.org/repos/asf/tomcat/site/
> 
> I'm not sure where the build scripts are stored or executed from.

There is no automated build. Committers run the scripts locally when the
site needs updating. Details in the read me file in the root of the repo.

Mark


> 
> Thanks,
> 
> Igal
> 
> 
> 
>>
>> Regards,
>> Dave
>>
>> Sent from my iPhone
>>
>>> On Oct 27, 2020, at 12:18 PM, Christopher Schultz <
>> ch...@christopherschultz.net> wrote:
>>>
>>> Konstantin,
>>>
 On 10/26/20 20:47, Konstantin Kolinko wrote:
 пт, 2 окт. 2020 г. в 00:09, Mark Thomas :
>
> Hi all,
>
> The topic came up at the BoF session at the end of the Tomcat track of
> migrating the website from svn to git. There were strong opinions both
> for migrating and for sticking with svn.
>
> As a middle ground I'd like to propose we ask Infra to create a git
> mirror of the svn repo.
>
> For those who favour git:
> The git mirror would be read-only but it would be possible to:
> - clone the git mirror
> - make changes in git
> - use git-svn to commit those changes back to svn
> - then the mirror automatically replicates them back to git
>
> For those who favour svn there would be no change.
>
> If there is agreement on this approach, I volunteer to contact infra to
> get it set up.
 My proposal at BoF was for a partial mirror.
 The issue is that
 1. I think that this mirror is intended as a tool to collect feedback
 / patches from random people, and to lower barriers for contribution.
 2. The full Tomcat site is large. It includes documentation for all
 versions of Tomcat, including javadocs. Those pages are changed rarely
 and are not needed for people who contribute small changes for the
 site. The source code for those pages is elsewhere.
>>>
>>> The question I have to ask, here is: why do we bother putting all those
>> files in revision-control? The users guide for 4 different versions of
>> Tomcat is not a problem, but the javadocs are just stupid to store.
>>>
>>> Is there some policy we are following by having all those files in
>> there? Or is it just to make sure that website "publication" is as simple
>> as "svn checkout"?
>>>
 3. Subversion has easy commands to cope with such large source trees.
 This feature is called "sparse checkouts".
 For our site the necessary commands are documented in README.txt.
 Essentially, it is done with --depth and --set-depth arguments to "svn
 checkout" and "svn update" commands
 Speaking about Git, there are huge repositories [1] out there, but I
 think that the majority of people are not accustomed to them.
 [1] https://en.wikipedia.org/wiki/Monorepo
 I see that Git developers recently did some work to make dealing with
 such repositories simpler, with addition of "git sparse-checkout"
 command in Git 2.25.0 [2], released in January 2020.
 [2]
>> https://github.com/git/git/blob/v2.25.0/Documentation/RelNotes/2.25.0.txt
 Though I think that support in tools is still lacking. E.g. missing in
 TortoiseGit. [3]
 [3] https://gitlab.com/tortoisegit/tortoisegit/issues/1599
 If we go with a full Git mirror or with migration to Git, then I think
 that somebody has to prepare an update to README.txt.
 If we go with a partial Git mirror, I think it could be named
 "tomcat-site-dev", reserving the name "tomcat-site" for a full mirror
 if we ever make one.
 Ignored paths for git-svn are configured with "--ignore-paths"
 argument or with "svn-remote..ignore-paths" configuration
 option. [4]
 [4] https://git-scm.com/docs/git-svn
 Other notes:
 4. Release managers use Subversion to publish the binaries.
 Thus I expect that they are able to update the published documentation
 with Subversion as well.
 5. Publishing the javadocs generates small changes over a large number
 of files. The script that generates the commit email notes that the
 diff is huge and trims it all to a small summary.
 If we ever migrate to Git, I wonder whether a similar script in Git is
 able to cope with it.
>>>
>>> We might also want to consider complicating the website-building process
>> in order to simplify the repository. Yes, "disk space is cheap" but it's
>> kind of ridiculous that we have all that derivative content in RCS,
>> separate from its canonical source.
>>>
>>> -chris
>>>
>>> -
>>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>>>
>>
>>
>> 

[Bug 64858] Allow to deploy a WAR whose dependencies are on a Maven repository

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64858

--- Comment #5 from Mark Thomas  ---
I have always viewed WebResource and friends as the extension point for things
like this. Easy extensibility rather took a back seat as those interfaces
evolved but I'd be happy to consider changes to them to make it easier to
provide custom extensions (or complete replacement) of Tomcat's resources
implementation.

I think it highly unlikely the necessary extension points to add additional
deployment types identified by file extension will be added.

-- 
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 64762] CoyoteInputStream getInputStream() read (wait after premature end and the rest comes)

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64762

--- Comment #9 from Mark Thomas  ---
This issue has been in the NEEDINFO state for a month now.

Without sufficient information to reproduce the issue this will eventually get
closed.

-- 
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: svn/git for website

2020-10-29 Thread Igal Sapir
Dave,

On Wed, Oct 28, 2020 at 9:36 PM Dave Fisher  wrote:

> Hi -
>
> I may have helpful ideas. Tell me where the Tomcst site repository and
> build are located.
>

The SVN repo for the Tomcat site is at
http://svn.apache.org/repos/asf/tomcat/site/

I'm not sure where the build scripts are stored or executed from.

Thanks,

Igal



>
> Regards,
> Dave
>
> Sent from my iPhone
>
> > On Oct 27, 2020, at 12:18 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
> >
> > Konstantin,
> >
> >> On 10/26/20 20:47, Konstantin Kolinko wrote:
> >> пт, 2 окт. 2020 г. в 00:09, Mark Thomas :
> >>>
> >>> Hi all,
> >>>
> >>> The topic came up at the BoF session at the end of the Tomcat track of
> >>> migrating the website from svn to git. There were strong opinions both
> >>> for migrating and for sticking with svn.
> >>>
> >>> As a middle ground I'd like to propose we ask Infra to create a git
> >>> mirror of the svn repo.
> >>>
> >>> For those who favour git:
> >>> The git mirror would be read-only but it would be possible to:
> >>> - clone the git mirror
> >>> - make changes in git
> >>> - use git-svn to commit those changes back to svn
> >>> - then the mirror automatically replicates them back to git
> >>>
> >>> For those who favour svn there would be no change.
> >>>
> >>> If there is agreement on this approach, I volunteer to contact infra to
> >>> get it set up.
> >> My proposal at BoF was for a partial mirror.
> >> The issue is that
> >> 1. I think that this mirror is intended as a tool to collect feedback
> >> / patches from random people, and to lower barriers for contribution.
> >> 2. The full Tomcat site is large. It includes documentation for all
> >> versions of Tomcat, including javadocs. Those pages are changed rarely
> >> and are not needed for people who contribute small changes for the
> >> site. The source code for those pages is elsewhere.
> >
> > The question I have to ask, here is: why do we bother putting all those
> files in revision-control? The users guide for 4 different versions of
> Tomcat is not a problem, but the javadocs are just stupid to store.
> >
> > Is there some policy we are following by having all those files in
> there? Or is it just to make sure that website "publication" is as simple
> as "svn checkout"?
> >
> >> 3. Subversion has easy commands to cope with such large source trees.
> >> This feature is called "sparse checkouts".
> >> For our site the necessary commands are documented in README.txt.
> >> Essentially, it is done with --depth and --set-depth arguments to "svn
> >> checkout" and "svn update" commands
> >> Speaking about Git, there are huge repositories [1] out there, but I
> >> think that the majority of people are not accustomed to them.
> >> [1] https://en.wikipedia.org/wiki/Monorepo
> >> I see that Git developers recently did some work to make dealing with
> >> such repositories simpler, with addition of "git sparse-checkout"
> >> command in Git 2.25.0 [2], released in January 2020.
> >> [2]
> https://github.com/git/git/blob/v2.25.0/Documentation/RelNotes/2.25.0.txt
> >> Though I think that support in tools is still lacking. E.g. missing in
> >> TortoiseGit. [3]
> >> [3] https://gitlab.com/tortoisegit/tortoisegit/issues/1599
> >> If we go with a full Git mirror or with migration to Git, then I think
> >> that somebody has to prepare an update to README.txt.
> >> If we go with a partial Git mirror, I think it could be named
> >> "tomcat-site-dev", reserving the name "tomcat-site" for a full mirror
> >> if we ever make one.
> >> Ignored paths for git-svn are configured with "--ignore-paths"
> >> argument or with "svn-remote..ignore-paths" configuration
> >> option. [4]
> >> [4] https://git-scm.com/docs/git-svn
> >> Other notes:
> >> 4. Release managers use Subversion to publish the binaries.
> >> Thus I expect that they are able to update the published documentation
> >> with Subversion as well.
> >> 5. Publishing the javadocs generates small changes over a large number
> >> of files. The script that generates the commit email notes that the
> >> diff is huge and trims it all to a small summary.
> >> If we ever migrate to Git, I wonder whether a similar script in Git is
> >> able to cope with it.
> >
> > We might also want to consider complicating the website-building process
> in order to simplify the repository. Yes, "disk space is cheap" but it's
> kind of ridiculous that we have all that derivative content in RCS,
> separate from its canonical source.
> >
> > -chris
> >
> > -
> > 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
>
>


[Bug 64859] Assertion errros org.apache.catalina.mapper.Mapper.internalMap(Mapper.java:744)

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64859

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Mark Thomas  ---
This is typically caused by an application or library retaining a reference to
a request, response, InputStream, OutputStream etc. beyond the lifetime of the
original request (Tomcat recycles these objects and you end up with two threads
trying to use the same object).

The users list is usually the best place to debug issues such as these.

If you are sure a reference is not being retained and you are able to reproduce
this issue feel free to re-open this report and provide the necessary steps to
recreate the issue from a clean install of the latest release of a currently
supported Tomcat major version (e.g. 9.0.x).

-- 
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 63690] [HTTP/2] The socket [*] associated with this connection has been closed.

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63690

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #25 from Mark Thomas  ---
The provided stack trace is unrelated to the original issue.

It looks like the connection is being closed as a result of a stream reset
being received. That may be normal behaviour.

If you consider this a bug you'll need to open a new issue and provide a
minimal test case that reproduces the issue.

-- 
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 64830] HTTP2 : GOAWAY sent with Protocol Error and Frame Size Error

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64830

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #10 from Mark Thomas  ---
Moving to NEEDINFO as more information about the provided test case is required
to reproduce the issue.

-- 
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 64830] HTTP2 : GOAWAY sent with Protocol Error and Frame Size Error

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64830

--- Comment #9 from Mark Thomas  ---
What hardware are you running this on? I've been running the test case locally
for 15+ mins and I haven't seen a single error reported. Details are hardware
used, memory allocated to Tomcat and JMeter, network between client and server
would likely be helpful. If we can't recreate the issue, we can't debug 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



[GitHub] [tomcat] rmaucher commented on pull request #371: NIO2: Call `accept` immediately if connection count is not close to max con…

2020-10-29 Thread GitBox


rmaucher commented on pull request #371:
URL: https://github.com/apache/tomcat/pull/371#issuecomment-718885690


   Hum, ok, since incrementing is not done in parallel, then it's something 
that can be tried.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[tomcat] 02/02: Add bug ID after an issue was opened against an older version

2020-10-29 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

commit a9e4c87db38ac347e3d4f6158fd859db0156997e
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:45:22 2020 +

Add bug ID after an issue was opened against an older version
---
 webapps/docs/changelog.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7f7caf8..9d1e1da 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -398,8 +398,9 @@
 provided by Ronny Perinke. (markt)
   
   
-Fix a potential issue where the write lock for a WebSocket connection
-may not be released if an exception occurs during the write. (markt)
+64848: Fix a potential issue where the write lock for a
+WebSocket connection may not be released if an exception occurs during
+the write. (markt)
   
   
 64644: Add support for a read idle timeout and a write idle


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



[tomcat] 01/02: Provide exception messages for SocketTimeoutException

2020-10-29 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

commit 18cfff56a0ca945c0bc43b033deb8f2480f03301
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:44:23 2020 +

Provide exception messages for SocketTimeoutException
---
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  4 
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/LocalStrings.properties 
b/java/org/apache/tomcat/util/net/LocalStrings.properties
index b6d7861..17c3309 100644
--- a/java/org/apache/tomcat/util/net/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/net/LocalStrings.properties
@@ -132,6 +132,9 @@ socket.apr.write.error=Unexpected error [{0}] writing data 
to the APR/native soc
 socket.closed=The socket associated with this connection has been closed.
 socket.sslreneg=Exception re-negotiating SSL connection
 
+socketWrapper.readTimeout=Read timeout
+socketWrapper.writeTimeout=Write timeout
+
 sslHostConfig.certificate.notype=Multiple certificates were specified and at 
least one is missing the required attribute type
 sslHostConfig.certificateVerificationInvalid=The certificate verification 
value [{0}] is not recognised
 sslHostConfig.fileNotFound=Configured file [{0}] does not exist
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java 
b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index d044a47..dd1da55 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -1407,13 +1407,13 @@ public abstract class SocketWrapperBase {
 state.wait(unit.toMillis(timeout));
 if (state.state == CompletionState.PENDING) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
 } catch (InterruptedException e) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
@@ -1423,12 +1423,23 @@ public abstract class SocketWrapperBase {
 return state.state;
 }
 
+
+private String getTimeoutMsg(boolean read) {
+if (read) {
+return sm.getString("socketWrapper.readTimeout");
+} else {
+return sm.getString("socketWrapper.writeTimeout");
+}
+}
+
+
 protected abstract  OperationState newOperationState(boolean read,
 ByteBuffer[] buffers, int offset, int length,
 BlockingMode block, long timeout, TimeUnit unit, A attachment,
 CompletionCheck check, CompletionHandler handler,
 Semaphore semaphore, VectoredIOCompletionHandler completion);
 
+
 // - Utility 
methods
 
 protected static int transfer(byte[] from, int offset, int length, 
ByteBuffer to) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 606603d..7f7caf8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -91,6 +91,10 @@
 63362: Add collection of statistics for HTTP/2, WebSocket 
and
 connections upgraded via the HTTP upgrade mechanism. (markt)
   
+  
+Provide messages for some SocketTimeoutException instances
+that did not have one. (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 (f0b2ace -> a9e4c87)

2020-10-29 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from f0b2ace  Revert "Restore try catch around Poller.events"
 new 18cfff5  Provide exception messages for SocketTimeoutException
 new a9e4c87  Add bug ID after an issue was opened against an older version

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  9 +++--
 3 files changed, 23 insertions(+), 4 deletions(-)


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



[tomcat] 01/02: Provide exception messages for SocketTimeoutException

2020-10-29 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

commit 18cfff56a0ca945c0bc43b033deb8f2480f03301
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:44:23 2020 +

Provide exception messages for SocketTimeoutException
---
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  4 
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/LocalStrings.properties 
b/java/org/apache/tomcat/util/net/LocalStrings.properties
index b6d7861..17c3309 100644
--- a/java/org/apache/tomcat/util/net/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/net/LocalStrings.properties
@@ -132,6 +132,9 @@ socket.apr.write.error=Unexpected error [{0}] writing data 
to the APR/native soc
 socket.closed=The socket associated with this connection has been closed.
 socket.sslreneg=Exception re-negotiating SSL connection
 
+socketWrapper.readTimeout=Read timeout
+socketWrapper.writeTimeout=Write timeout
+
 sslHostConfig.certificate.notype=Multiple certificates were specified and at 
least one is missing the required attribute type
 sslHostConfig.certificateVerificationInvalid=The certificate verification 
value [{0}] is not recognised
 sslHostConfig.fileNotFound=Configured file [{0}] does not exist
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java 
b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index d044a47..dd1da55 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -1407,13 +1407,13 @@ public abstract class SocketWrapperBase {
 state.wait(unit.toMillis(timeout));
 if (state.state == CompletionState.PENDING) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
 } catch (InterruptedException e) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
@@ -1423,12 +1423,23 @@ public abstract class SocketWrapperBase {
 return state.state;
 }
 
+
+private String getTimeoutMsg(boolean read) {
+if (read) {
+return sm.getString("socketWrapper.readTimeout");
+} else {
+return sm.getString("socketWrapper.writeTimeout");
+}
+}
+
+
 protected abstract  OperationState newOperationState(boolean read,
 ByteBuffer[] buffers, int offset, int length,
 BlockingMode block, long timeout, TimeUnit unit, A attachment,
 CompletionCheck check, CompletionHandler handler,
 Semaphore semaphore, VectoredIOCompletionHandler completion);
 
+
 // - Utility 
methods
 
 protected static int transfer(byte[] from, int offset, int length, 
ByteBuffer to) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 606603d..7f7caf8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -91,6 +91,10 @@
 63362: Add collection of statistics for HTTP/2, WebSocket 
and
 connections upgraded via the HTTP upgrade mechanism. (markt)
   
+  
+Provide messages for some SocketTimeoutException instances
+that did not have one. (markt)
+  
 
   
   


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



[tomcat] 02/02: Add bug ID after an issue was opened against an older version

2020-10-29 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

commit a9e4c87db38ac347e3d4f6158fd859db0156997e
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:45:22 2020 +

Add bug ID after an issue was opened against an older version
---
 webapps/docs/changelog.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7f7caf8..9d1e1da 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -398,8 +398,9 @@
 provided by Ronny Perinke. (markt)
   
   
-Fix a potential issue where the write lock for a WebSocket connection
-may not be released if an exception occurs during the write. (markt)
+64848: Fix a potential issue where the write lock for a
+WebSocket connection may not be released if an exception occurs during
+the write. (markt)
   
   
 64644: Add support for a read idle timeout and a write idle


-
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 (f0b2ace -> a9e4c87)

2020-10-29 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from f0b2ace  Revert "Restore try catch around Poller.events"
 new 18cfff5  Provide exception messages for SocketTimeoutException
 new a9e4c87  Add bug ID after an issue was opened against an older version

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  9 +++--
 3 files changed, 23 insertions(+), 4 deletions(-)


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



[tomcat] 02/02: Add bug ID after an issue was opened against an older version

2020-10-29 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

commit a9e4c87db38ac347e3d4f6158fd859db0156997e
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:45:22 2020 +

Add bug ID after an issue was opened against an older version
---
 webapps/docs/changelog.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7f7caf8..9d1e1da 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -398,8 +398,9 @@
 provided by Ronny Perinke. (markt)
   
   
-Fix a potential issue where the write lock for a WebSocket connection
-may not be released if an exception occurs during the write. (markt)
+64848: Fix a potential issue where the write lock for a
+WebSocket connection may not be released if an exception occurs during
+the write. (markt)
   
   
 64644: Add support for a read idle timeout and a write idle


-
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 (f0b2ace -> a9e4c87)

2020-10-29 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from f0b2ace  Revert "Restore try catch around Poller.events"
 new 18cfff5  Provide exception messages for SocketTimeoutException
 new a9e4c87  Add bug ID after an issue was opened against an older version

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  9 +++--
 3 files changed, 23 insertions(+), 4 deletions(-)


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



[tomcat] 01/02: Provide exception messages for SocketTimeoutException

2020-10-29 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

commit 18cfff56a0ca945c0bc43b033deb8f2480f03301
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:44:23 2020 +

Provide exception messages for SocketTimeoutException
---
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  4 
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/LocalStrings.properties 
b/java/org/apache/tomcat/util/net/LocalStrings.properties
index b6d7861..17c3309 100644
--- a/java/org/apache/tomcat/util/net/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/net/LocalStrings.properties
@@ -132,6 +132,9 @@ socket.apr.write.error=Unexpected error [{0}] writing data 
to the APR/native soc
 socket.closed=The socket associated with this connection has been closed.
 socket.sslreneg=Exception re-negotiating SSL connection
 
+socketWrapper.readTimeout=Read timeout
+socketWrapper.writeTimeout=Write timeout
+
 sslHostConfig.certificate.notype=Multiple certificates were specified and at 
least one is missing the required attribute type
 sslHostConfig.certificateVerificationInvalid=The certificate verification 
value [{0}] is not recognised
 sslHostConfig.fileNotFound=Configured file [{0}] does not exist
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java 
b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index d044a47..dd1da55 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -1407,13 +1407,13 @@ public abstract class SocketWrapperBase {
 state.wait(unit.toMillis(timeout));
 if (state.state == CompletionState.PENDING) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
 } catch (InterruptedException e) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
@@ -1423,12 +1423,23 @@ public abstract class SocketWrapperBase {
 return state.state;
 }
 
+
+private String getTimeoutMsg(boolean read) {
+if (read) {
+return sm.getString("socketWrapper.readTimeout");
+} else {
+return sm.getString("socketWrapper.writeTimeout");
+}
+}
+
+
 protected abstract  OperationState newOperationState(boolean read,
 ByteBuffer[] buffers, int offset, int length,
 BlockingMode block, long timeout, TimeUnit unit, A attachment,
 CompletionCheck check, CompletionHandler handler,
 Semaphore semaphore, VectoredIOCompletionHandler completion);
 
+
 // - Utility 
methods
 
 protected static int transfer(byte[] from, int offset, int length, 
ByteBuffer to) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 606603d..7f7caf8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -91,6 +91,10 @@
 63362: Add collection of statistics for HTTP/2, WebSocket 
and
 connections upgraded via the HTTP upgrade mechanism. (markt)
   
+  
+Provide messages for some SocketTimeoutException instances
+that did not have one. (markt)
+  
 
   
   


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



[tomcat] 01/02: Provide exception messages for SocketTimeoutException

2020-10-29 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

commit 18cfff56a0ca945c0bc43b033deb8f2480f03301
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:44:23 2020 +

Provide exception messages for SocketTimeoutException
---
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  4 
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/LocalStrings.properties 
b/java/org/apache/tomcat/util/net/LocalStrings.properties
index b6d7861..17c3309 100644
--- a/java/org/apache/tomcat/util/net/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/net/LocalStrings.properties
@@ -132,6 +132,9 @@ socket.apr.write.error=Unexpected error [{0}] writing data 
to the APR/native soc
 socket.closed=The socket associated with this connection has been closed.
 socket.sslreneg=Exception re-negotiating SSL connection
 
+socketWrapper.readTimeout=Read timeout
+socketWrapper.writeTimeout=Write timeout
+
 sslHostConfig.certificate.notype=Multiple certificates were specified and at 
least one is missing the required attribute type
 sslHostConfig.certificateVerificationInvalid=The certificate verification 
value [{0}] is not recognised
 sslHostConfig.fileNotFound=Configured file [{0}] does not exist
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java 
b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index d044a47..dd1da55 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -1407,13 +1407,13 @@ public abstract class SocketWrapperBase {
 state.wait(unit.toMillis(timeout));
 if (state.state == CompletionState.PENDING) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
 } catch (InterruptedException e) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
@@ -1423,12 +1423,23 @@ public abstract class SocketWrapperBase {
 return state.state;
 }
 
+
+private String getTimeoutMsg(boolean read) {
+if (read) {
+return sm.getString("socketWrapper.readTimeout");
+} else {
+return sm.getString("socketWrapper.writeTimeout");
+}
+}
+
+
 protected abstract  OperationState newOperationState(boolean read,
 ByteBuffer[] buffers, int offset, int length,
 BlockingMode block, long timeout, TimeUnit unit, A attachment,
 CompletionCheck check, CompletionHandler handler,
 Semaphore semaphore, VectoredIOCompletionHandler completion);
 
+
 // - Utility 
methods
 
 protected static int transfer(byte[] from, int offset, int length, 
ByteBuffer to) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 606603d..7f7caf8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -91,6 +91,10 @@
 63362: Add collection of statistics for HTTP/2, WebSocket 
and
 connections upgraded via the HTTP upgrade mechanism. (markt)
   
+  
+Provide messages for some SocketTimeoutException instances
+that did not have one. (markt)
+  
 
   
   


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



[tomcat] 02/02: Add bug ID after an issue was opened against an older version

2020-10-29 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

commit a9e4c87db38ac347e3d4f6158fd859db0156997e
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:45:22 2020 +

Add bug ID after an issue was opened against an older version
---
 webapps/docs/changelog.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7f7caf8..9d1e1da 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -398,8 +398,9 @@
 provided by Ronny Perinke. (markt)
   
   
-Fix a potential issue where the write lock for a WebSocket connection
-may not be released if an exception occurs during the write. (markt)
+64848: Fix a potential issue where the write lock for a
+WebSocket connection may not be released if an exception occurs during
+the write. (markt)
   
   
 64644: Add support for a read idle timeout and a write idle


-
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 (f0b2ace -> a9e4c87)

2020-10-29 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from f0b2ace  Revert "Restore try catch around Poller.events"
 new 18cfff5  Provide exception messages for SocketTimeoutException
 new a9e4c87  Add bug ID after an issue was opened against an older version

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  9 +++--
 3 files changed, 23 insertions(+), 4 deletions(-)


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



[tomcat] 02/02: Add bug ID after an issue was opened against an older version

2020-10-29 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

commit a9e4c87db38ac347e3d4f6158fd859db0156997e
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:45:22 2020 +

Add bug ID after an issue was opened against an older version
---
 webapps/docs/changelog.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7f7caf8..9d1e1da 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -398,8 +398,9 @@
 provided by Ronny Perinke. (markt)
   
   
-Fix a potential issue where the write lock for a WebSocket connection
-may not be released if an exception occurs during the write. (markt)
+64848: Fix a potential issue where the write lock for a
+WebSocket connection may not be released if an exception occurs during
+the write. (markt)
   
   
 64644: Add support for a read idle timeout and a write idle


-
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 (f0b2ace -> a9e4c87)

2020-10-29 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from f0b2ace  Revert "Restore try catch around Poller.events"
 new 18cfff5  Provide exception messages for SocketTimeoutException
 new a9e4c87  Add bug ID after an issue was opened against an older version

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  9 +++--
 3 files changed, 23 insertions(+), 4 deletions(-)


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



[tomcat] 01/02: Provide exception messages for SocketTimeoutException

2020-10-29 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

commit 18cfff56a0ca945c0bc43b033deb8f2480f03301
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:44:23 2020 +

Provide exception messages for SocketTimeoutException
---
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  4 
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/LocalStrings.properties 
b/java/org/apache/tomcat/util/net/LocalStrings.properties
index b6d7861..17c3309 100644
--- a/java/org/apache/tomcat/util/net/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/net/LocalStrings.properties
@@ -132,6 +132,9 @@ socket.apr.write.error=Unexpected error [{0}] writing data 
to the APR/native soc
 socket.closed=The socket associated with this connection has been closed.
 socket.sslreneg=Exception re-negotiating SSL connection
 
+socketWrapper.readTimeout=Read timeout
+socketWrapper.writeTimeout=Write timeout
+
 sslHostConfig.certificate.notype=Multiple certificates were specified and at 
least one is missing the required attribute type
 sslHostConfig.certificateVerificationInvalid=The certificate verification 
value [{0}] is not recognised
 sslHostConfig.fileNotFound=Configured file [{0}] does not exist
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java 
b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index d044a47..dd1da55 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -1407,13 +1407,13 @@ public abstract class SocketWrapperBase {
 state.wait(unit.toMillis(timeout));
 if (state.state == CompletionState.PENDING) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
 } catch (InterruptedException e) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
@@ -1423,12 +1423,23 @@ public abstract class SocketWrapperBase {
 return state.state;
 }
 
+
+private String getTimeoutMsg(boolean read) {
+if (read) {
+return sm.getString("socketWrapper.readTimeout");
+} else {
+return sm.getString("socketWrapper.writeTimeout");
+}
+}
+
+
 protected abstract  OperationState newOperationState(boolean read,
 ByteBuffer[] buffers, int offset, int length,
 BlockingMode block, long timeout, TimeUnit unit, A attachment,
 CompletionCheck check, CompletionHandler handler,
 Semaphore semaphore, VectoredIOCompletionHandler completion);
 
+
 // - Utility 
methods
 
 protected static int transfer(byte[] from, int offset, int length, 
ByteBuffer to) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 606603d..7f7caf8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -91,6 +91,10 @@
 63362: Add collection of statistics for HTTP/2, WebSocket 
and
 connections upgraded via the HTTP upgrade mechanism. (markt)
   
+  
+Provide messages for some SocketTimeoutException instances
+that did not have one. (markt)
+  
 
   
   


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



[tomcat] 02/02: Add bug ID after an issue was opened against an older version

2020-10-29 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 9db8adbb3da30173c26c55b83c00cd65b6d2aa34
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:45:22 2020 +

Add bug ID after an issue was opened against an older version
---
 webapps/docs/changelog.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a2414ab..68031ff 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -511,8 +511,9 @@
 provided by Ronny Perinke. (markt)
   
   
-Fix a potential issue where the write lock for a WebSocket connection
-may not be released if an exception occurs during the write. (markt)
+64848: Fix a potential issue where the write lock for a
+WebSocket connection may not be released if an exception occurs during
+the write. (markt)
   
   
 64644: Add support for a read idle timeout and a write idle


-
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 (99c52a2 -> efaeff3)

2020-10-29 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 99c52a2  Add dedicated handling and warn for a null socket channel
 add aca2226  Provide exception messages for SocketTimeoutException
 add efaeff3  Add bug ID after an issue was opened against an older version

No new revisions were added by this update.

Summary of changes:
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  9 +++--
 3 files changed, 23 insertions(+), 4 deletions(-)


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



[tomcat] branch master updated (717387f -> 9db8adb)

2020-10-29 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 717387f  Add dedicated handling and warn for a null socket channel
 new 3ecb663  Provide exception messages for SocketTimeoutException
 new 9db8adb  Add bug ID after an issue was opened against an older version

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  9 +++--
 3 files changed, 23 insertions(+), 4 deletions(-)


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



[tomcat] 01/02: Provide exception messages for SocketTimeoutException

2020-10-29 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 3ecb6633ff958812635f36a0d1274adba5b0ef1b
Author: Mark Thomas 
AuthorDate: Thu Oct 29 14:44:23 2020 +

Provide exception messages for SocketTimeoutException
---
 java/org/apache/tomcat/util/net/LocalStrings.properties |  3 +++
 java/org/apache/tomcat/util/net/SocketWrapperBase.java  | 15 +--
 webapps/docs/changelog.xml  |  4 
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/LocalStrings.properties 
b/java/org/apache/tomcat/util/net/LocalStrings.properties
index a6a376a..1de8916 100644
--- a/java/org/apache/tomcat/util/net/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/net/LocalStrings.properties
@@ -154,6 +154,9 @@ socket.apr.write.error=Unexpected error [{0}] writing data 
to the APR/native soc
 socket.closed=The socket associated with this connection has been closed.
 socket.sslreneg=Exception re-negotiating SSL connection
 
+socketWrapper.readTimeout=Read timeout
+socketWrapper.writeTimeout=Write timeout
+
 sslHostConfig.certificate.notype=Multiple certificates were specified and at 
least one is missing the required attribute type
 sslHostConfig.certificateVerificationInvalid=The certificate verification 
value [{0}] is not recognised
 sslHostConfig.fileNotFound=Configured file [{0}] does not exist
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java 
b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index ad7d1e3..06fea5f 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -1395,13 +1395,13 @@ public abstract class SocketWrapperBase {
 state.wait(unit.toMillis(timeout));
 if (state.state == CompletionState.PENDING) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
 } catch (InterruptedException e) {
 if (handler != null && 
state.callHandler.compareAndSet(true, false)) {
-handler.failed(new SocketTimeoutException(), 
attachment);
+handler.failed(new 
SocketTimeoutException(getTimeoutMsg(read)), attachment);
 }
 return CompletionState.ERROR;
 }
@@ -1411,12 +1411,23 @@ public abstract class SocketWrapperBase {
 return state.state;
 }
 
+
+private String getTimeoutMsg(boolean read) {
+if (read) {
+return sm.getString("socketWrapper.readTimeout");
+} else {
+return sm.getString("socketWrapper.writeTimeout");
+}
+}
+
+
 protected abstract  OperationState newOperationState(boolean read,
 ByteBuffer[] buffers, int offset, int length,
 BlockingMode block, long timeout, TimeUnit unit, A attachment,
 CompletionCheck check, CompletionHandler handler,
 Semaphore semaphore, VectoredIOCompletionHandler completion);
 
+
 // - Utility 
methods
 
 protected static int transfer(byte[] from, int offset, int length, 
ByteBuffer to) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f5adf81..a2414ab 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -112,6 +112,10 @@
 the NIO poller thread to exit. This is a regression caused when
 the Poller.events method was refactored. (remm)
   
+  
+Provide messages for some SocketTimeoutException instances
+that did not have one. (markt)
+  
 
   
   


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



[GitHub] [tomcat] anilgursel commented on pull request #371: NIO2: Call `accept` immediately if connection count is not close to max con…

2020-10-29 Thread GitBox


anilgursel commented on pull request #371:
URL: https://github.com/apache/tomcat/pull/371#issuecomment-718799285


   I updated the PR to have it as `getMaxConnections() / 2`.  I agree it is 
just a heuristic and not clean.  We can potentially make it configurable?
   
   If my understanding is correct, one reason to schedule the `accept` is to 
prevent blocking the thread.  The reason behind blocking (via `LimitLatch`) is 
to have a hard limit on the `maxConnections`.  Is there any possibility to 
relax this a bit?  Something like:
   
   ```java
   else if (getConnectionCount() < getMaxConnections()) {
   increment();
   serverSock.accept(null, this);
   }
   
   ```
   
   With this, there is possibility of number of connections to go over 
`maxConnections` little bit (which I think the expectation can be managed in 
documentation).  Actually, I believe there will only be one thread doing 
`accept` logic at any given time.  Because, a new `accept` is scheduled only 
when the previous one is `completed`.   Is this true?  If so,  it would not go 
beyond maxConnections.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[Bug 64848] WsSession objects in OUTPUT_CLOSED state are implicitly held by waitingProcessors and GC cannot purge them from the JVM heap

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64848

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEEDINFO|RESOLVED

--- Comment #5 from Mark Thomas  ---
This bug has already been fixed in the 9.0.38 onwards.

https://github.com/apache/tomcat/commit/5707895bafa38c1443460356a268932a967b79e9

-- 
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 64848] WsSession objects in OUTPUT_CLOSED state are implicitly held by waitingProcessors and GC cannot purge them from the JVM heap

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64848

--- Comment #4 from Mark Thomas  ---
I'm able to recreate this with the 3 provided Maven projects.

I ran the client on a local VM with VMware Workstation configured to limit the
network connection to 10Mbps with 20ms latency inbound and outbound.

Next step is to update to the latest Tomcat 9 code and see if the issue
persists.

-- 
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 64859] Assertion errros org.apache.catalina.mapper.Mapper.internalMap(Mapper.java:744)

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64859

marcin borcz  changed:

   What|Removed |Added

 CC||marcin.bo...@asseco.pl

-- 
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 64859] New: Assertion errros org.apache.catalina.mapper.Mapper.internalMap(Mapper.java:744)

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64859

Bug ID: 64859
   Summary: Assertion errros
org.apache.catalina.mapper.Mapper.internalMap(Mapper.j
ava:744)
   Product: Tomcat 9
   Version: 9.0.34
  Hardware: All
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: marcin.bo...@asseco.pl
  Target Milestone: -

Created attachment 37538
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37538=edit
Full stacktraces for mentioned log entries

We had observed the following assertion errors, total 356 cases.

"java.lang.AssertionError
   at org.apache.catalina.mapper.Mapper.internalMap(Mapper.java:744)"

Above errors were preceded by the two log info entries

"org.apache.catalina.connector.CoyoteAdapter.checkRecycled 
Encountered a non-recycled request and recycled it forcedly.
org.apache.catalina.connector.CoyoteAdapter$RecycleRequiredException"

"org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request
header
 Note: further occurrences of HTTP request parsing errors will be logged at
DEBUG level.
java.lang.IllegalStateException: Unexpected state: headers already parsed.
Buffer not recycled?"

Full log entries are in the attachment.

Assertion errors had occurred for 2 hours and then the problem disappeared.
After a few hours, we had noticed another two cases this time not preceded by
any connected log entries. After that, we restarted the problematic instance
and the situation has not repeated anymore.

Almost the same configuration and application are in use for weeks so it's
rather not an issue.

Application and installation:
Spring Boot 2.0 + Vaadin 8 
The application running in Kubernetes based on image
tomcat:9.0.34-jdk8-openjdk-slim

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



[GitHub] [tomcat] rmaucher commented on pull request #371: NIO2: Call `accept` immediately if connection count is not close to max con…

2020-10-29 Thread GitBox


rmaucher commented on pull request #371:
URL: https://github.com/apache/tomcat/pull/371#issuecomment-718632321


   maxConnections overall is a bad design for NIO2, that is a bit obvious. It 
started with connections not being counted accurately then after some iterative 
refactorings of close it remains a bad idea. For the longest time the default 
was fixed to -1 (still there in 8.5).
   
   I guess all you're doing is add a heuristic that works for you [but actually 
no guarantee]. Also about accept, I refactored it NIO2 style to save one thread 
and it seems more efficient overall, before it was a much more classical NIO1 
style accept using the same dedicated thread (so one extra thread, and likely 
less efficient). The downside of the strategy is that the accept is just like 
the other processing threads when maxConnections is used. If there's a heavy 
thread starvation, then accept will get delayed. I don't think it's the end of 
the world, the server will actually be slow for everyone, but I understand. 
OTOH, if your app is as you say using non blocking IO and is saving on threads, 
then there's no downside to the strategy [even with full use of the thread 
pool, the threads become available very frequently and accept stays responsive].
   
   So I'm ok with adding some heuristic, but maxThreads can be too low. Maybe 
maxConnections/2 would be good enough, with another heuristic on a minimal 
number ... Not very clean ...



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[Bug 64858] Allow to deploy a WAR whose dependencies are on a Maven repository

2020-10-29 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64858

--- Comment #4 from Gael Lalire  ---
There is nothing proprietary, all my code is open source.

And by extension point I mean a Tomcat extension point.

So for example in Tomcat :

interface MainResourceSetLoader {
  String getExtension();
  DirResourceSet load(File file);
}

in Tomcat-vestige :

class VestigeMainResourceSetLoader implements MainResourceSetLoader {
  String getExtension() { return ".vwar" }
  DirResourceSet load(File file) { /* read the vwar and create the resourceset
*/ }
}


So in StandardRoot.java you can do

private MainResourceSetLoader externalMainResourceSetLoader;
...
  if (externalMainResourceSetLoader != null && 
file.endsWith(externalMainResourceSetLoader.getExtension())) {
mainResourceSet = externalMainResourceSetLoader.load(file);
  }

That is what I mean by extension point.

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