Re: [VOTE] Release Apache Tomcat Native 2.0.5

2023-08-07 Thread Rémy Maucherat
On Tue, Aug 1, 2023 at 8:25 PM Mark Thomas  wrote:
>
> The key differences of version 2.0.5 compared to 2.0.4 are:
>
> - Align default pass phrase prompt with HTTPd
> - Update autotools and associated fixes
> - Fix memory leak in SNI processing
> - The windows binaries in this release have been built with OpenSSL
>3.0.10 and APR 1.7.4
>
> The 2.0.x branch is primarily intended for use with Tomcat 10.1.x
> onwards but can be used with earlier versions as long as the APR/native
> connector is not used.
>
> The proposed release artifacts can be found at [1],
> and the build was done using tag [2].
>
> The Apache Tomcat Native 2.0.5 release is
>   [X] Stable, go ahead and release
>   [ ] Broken because of ...

Rémy

> Thanks,
>
> Mark
>
>
> [1]
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/native/2.0.5
> [2]
> https://github.com/apache/tomcat-native/commit/7b3d702481bc9198e958b88a1f6028b9be5de4ff
>
> -
> 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: [VOTE] Release Apache Tomcat Native 1.2.38

2023-08-07 Thread Rémy Maucherat
On Wed, Aug 2, 2023 at 12:08 PM Mark Thomas  wrote:
>
> Version 1.2.38 includes the following changes compared to 1.2.37
>
> - Align default pass phrase prompt with HTTPd
> - The windows binaries in this release have been built with OpenSSL
>1.1.1v and APR 1.7.4
>
> The proposed release artifacts can be found at [1],
> and the build was done using tag [2].
>
> The Apache Tomcat Native 1.2.38 release is
>   [X] Stable, go ahead and release
>   [ ] Broken because of ...

Rémy

> Thanks,
>
> Mark
>
>
> [1]
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/native/1.2.38
> [2]
> https://github.com/apache/tomcat-native/tree/79282a056db1cf624cac11a4f014b4a9e72058bd
>
> -
> 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



[tomcat] branch main updated: Separate Catalina listener code

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

remm 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 bf93413990 Separate Catalina listener code
bf93413990 is described below

commit bf93413990eecdfbe5662a814433f51127c0c488
Author: remm 
AuthorDate: Mon Aug 7 11:53:58 2023 +0200

Separate Catalina listener code
---
 .../ciphers/OpenSSLCipherConfigurationParser.java  |   1 +
 .../util/net/openssl/panama/OpenSSLContext.java|  12 +-
 .../util/net/openssl/panama/OpenSSLEngine.java |   2 +-
 ...LLifecycleListener.java => OpenSSLLibrary.java} | 126 +++
 .../openssl/panama/OpenSSLLifecycleListener.java   | 362 +
 .../net/openssl/panama/LocalStrings.properties |  32 +-
 6 files changed, 76 insertions(+), 459 deletions(-)

diff --git 
a/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
 
b/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
index a32bb33c2d..13be8d5eae 100644
--- 
a/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
+++ 
b/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
@@ -712,6 +712,7 @@ public class OpenSSLCipherConfigurationParser {
 init();
 }
 String[] elements = expression.split(SEPARATOR);
+// TODO: Handle PROFILE= using OpenSSL (if present, otherwise warn), 
then replace elements with that
 LinkedHashSet ciphers = new LinkedHashSet<>();
 Set removedCiphers = new HashSet<>();
 for (String element : elements) {
diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
index 5030c04bb7..c482025a79 100644
--- 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
+++ 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
@@ -197,7 +197,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 // Check that OpenSSL was initialized
 if (!OpenSSLStatus.isInitialized()) {
 try {
-OpenSSLLifecycleListener.init();
+OpenSSLLibrary.init();
 } catch (Exception e) {
 throw new SSLException(e);
 }
@@ -775,9 +775,9 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 if ((type == EVP_PKEY_RSA()) || (type == EVP_PKEY_DSA())) {
 keylen = (OPENSSL_3 ? EVP_PKEY_get_bits(pkey) : 
EVP_PKEY_bits(pkey));
 }
-for (int i = 0; i < OpenSSLLifecycleListener.dhParameters.length; i++) 
{
-if (keylen >= OpenSSLLifecycleListener.dhParameters[i].min) {
-return OpenSSLLifecycleListener.dhParameters[i].dh;
+for (int i = 0; i < OpenSSLLibrary.dhParameters.length; i++) {
+if (keylen >= OpenSSLLibrary.dhParameters[i].min) {
+return OpenSSLLibrary.dhParameters[i].dh;
 }
 }
 return MemorySegment.NULL;
@@ -1053,8 +1053,8 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 }
 BIO_free(bio);
 if (MemorySegment.NULL.equals(key)) {
-if 
(!MemorySegment.NULL.equals(OpenSSLLifecycleListener.enginePointer)) {
-key = 
ENGINE_load_private_key(OpenSSLLifecycleListener.enginePointer, 
certificateKeyFileNative,
+if 
(!MemorySegment.NULL.equals(OpenSSLLibrary.enginePointer)) {
+key = 
ENGINE_load_private_key(OpenSSLLibrary.enginePointer, certificateKeyFileNative,
 MemorySegment.NULL, MemorySegment.NULL);
 }
 }
diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
index e64dee7409..3b4073d833 100644
--- 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
+++ 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
@@ -102,7 +102,7 @@ public final class OpenSSLEngine extends SSLEngine 
implements SSLUtil.ProtocolIn
 throw new IllegalStateException(e);
 }
 
-OpenSSLLifecycleListener.initLibrary();
+OpenSSLLibrary.initLibrary();
 
 final Set availableCipherSuites = new LinkedHashSet<>(128);
 try (var localArena = Arena.ofConfined()) {
diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomca

Re: [VOTE] Release Apache Tomcat Native 1.2.38

2023-08-07 Thread Mladen Turk




On 8/2/23 12:08, Mark Thomas wrote:

Version 1.2.38 includes the following changes compared to 1.2.37

The Apache Tomcat Native 1.2.38 release is
  [x] Stable, go ahead and release
  [ ] Broken because of ...




Regards
--
^TM

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



Re: [VOTE] Release Apache Tomcat Native 2.0.5

2023-08-07 Thread Mladen Turk




On 8/1/23 20:24, Mark Thomas wrote:

The key differences of version 2.0.5 compared to 2.0.4 are:

The Apache Tomcat Native 2.0.5 release is
  [x] Stable, go ahead and release
  [ ] Broken because of ...



Regards
--
^TM

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



[VOTE][RESULT] Release Apache Tomcat Native 2.0.5

2023-08-07 Thread Mark Thomas

The following votes were cast:

Binding:
+1: markt, lihan, remm, mturk

No other votes were cast.

The vote therefore passes.

Thanks to everyone who contributed to this release.

Mark

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



[VOTE][RESULT] Release Apache Tomcat Native 1.2.38

2023-08-07 Thread Mark Thomas

The following votes were cast:

Binding:
+1: markt, lihan, remm, mturk

No other votes were cast.

The vote therefore passes.

Thanks to everyone who contributed to this release.

Mark

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



svn commit: r63378 - /dev/tomcat/tomcat-connectors/native/2.0.5/ /release/tomcat/tomcat-connectors/native/2.0.5/

2023-08-07 Thread markt
Author: markt
Date: Mon Aug  7 11:53:08 2023
New Revision: 63378

Log:
Release Tomcat Native 2.0.5

Added:
release/tomcat/tomcat-connectors/native/2.0.5/
  - copied from r63377, dev/tomcat/tomcat-connectors/native/2.0.5/
Removed:
dev/tomcat/tomcat-connectors/native/2.0.5/


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



svn commit: r63379 - /dev/tomcat/tomcat-connectors/native/1.2.38/ /release/tomcat/tomcat-connectors/native/1.2.38/

2023-08-07 Thread markt
Author: markt
Date: Mon Aug  7 11:53:52 2023
New Revision: 63379

Log:
Release Tomcat Native 1.2.38

Added:
release/tomcat/tomcat-connectors/native/1.2.38/
  - copied from r63378, dev/tomcat/tomcat-connectors/native/1.2.38/
Removed:
dev/tomcat/tomcat-connectors/native/1.2.38/


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



[tomcat] branch main updated (bf93413990 -> 9c1006254b)

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

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


from bf93413990 Separate Catalina listener code
 new 30badcb628 Update Tomcat Native to 2.0.5
 new 9c1006254b Increment recommended version to 2.0.5

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:
 build.properties.default| 8 
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 +-
 webapps/docs/changelog.xml  | 3 +++
 3 files changed, 8 insertions(+), 5 deletions(-)


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



[tomcat] 02/02: Increment recommended version to 2.0.5

2023-08-07 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

commit 9c1006254bd33efb0ad931258bb6569273d7e222
Author: Mark Thomas 
AuthorDate: Mon Aug 7 13:13:51 2023 +0100

Increment recommended version to 2.0.5
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 6dad242a2c..e35538bf36 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -67,7 +67,7 @@ public class AprLifecycleListener implements 
LifecycleListener {
 protected static final int TCN_REQUIRED_PATCH = 34;
 protected static final int TCN_RECOMMENDED_MAJOR = 2;
 protected static final int TCN_RECOMMENDED_MINOR = 0;
-protected static final int TCN_RECOMMENDED_PV = 1;
+protected static final int TCN_RECOMMENDED_PV = 5;
 
 
 // -- Properties


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



[tomcat] 01/02: Update Tomcat Native to 2.0.5

2023-08-07 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

commit 30badcb62894a2347fbc12d331b87e46c69ed090
Author: Mark Thomas 
AuthorDate: Mon Aug 7 13:13:36 2023 +0100

Update Tomcat Native to 2.0.5
---
 build.properties.default   | 8 
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 4c30876a74..224bac5948 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -139,14 +139,14 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=2.0.4
-tomcat-native-openssl.version=3.0.9
+tomcat-native.version=2.0.5
+tomcat-native-openssl.version=3.0.10
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=276133e44ae9f9d3e853b66120937865c675eed6dd6b5b7d8a94ef741f037c0b3d99a6c065a1303c0ca42b65c109aef35b6bd370a2af0b7b2752eadf85b1d880
+tomcat-native.src.checksum.value=03ed1951597bb6a6ade8d715546a0d635d261381737abd27b63aa552c69f9ca49405d0252b6bc2d878bfd64e87439f146ecd84ccbfc82661ba16379c493615a4
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=307d42bda3517fd549cfbfca3c62eb063379df707f763da9f1e27deeb5919e3b0414e581fb14e2a3c623325ada7f849a791ff56ea95e4e87b6670b58918a2d79
+tomcat-native.win.checksum.value=3c599d4da5c26b3dd1ddce7add5b8126e98f0068515f8bb942cc349716ea5f88519b9a1f76b3ba9badda79955f88eaf7940a78713064ccc547a232b921c0f05b
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7491ef84c1..f3515ba866 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -220,6 +220,9 @@
 files to refer to the Jakarta EE contract names rather than the Java EE
 contract names. (markt)
   
+  
+Update Tomcat Native to 2.0.5. (markt)
+  
 
   
 


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



[tomcat] branch 10.1.x updated (62db193a4d -> 2533cdb22e)

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

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


from 62db193a4d Tighter validation to debug Gump failure
 new 791cd687e4 Update Tomcat Native to 2.0.5
 new 2533cdb22e Increment recommended version to 2.0.5

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:
 build.properties.default| 8 
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 +-
 webapps/docs/changelog.xml  | 3 +++
 3 files changed, 8 insertions(+), 5 deletions(-)


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



[tomcat] 02/02: Increment recommended version to 2.0.5

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

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

commit 2533cdb22e327251de373712104ff51c45b25cce
Author: Mark Thomas 
AuthorDate: Mon Aug 7 13:13:51 2023 +0100

Increment recommended version to 2.0.5
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 6dad242a2c..e35538bf36 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -67,7 +67,7 @@ public class AprLifecycleListener implements 
LifecycleListener {
 protected static final int TCN_REQUIRED_PATCH = 34;
 protected static final int TCN_RECOMMENDED_MAJOR = 2;
 protected static final int TCN_RECOMMENDED_MINOR = 0;
-protected static final int TCN_RECOMMENDED_PV = 1;
+protected static final int TCN_RECOMMENDED_PV = 5;
 
 
 // -- Properties


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



[tomcat] 01/02: Update Tomcat Native to 2.0.5

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

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

commit 791cd687e4523948c84fc685dc8bdaa454a74b5a
Author: Mark Thomas 
AuthorDate: Mon Aug 7 13:13:36 2023 +0100

Update Tomcat Native to 2.0.5
---
 build.properties.default   | 8 
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 7214f4b52f..15b3cb2ad0 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -160,14 +160,14 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=2.0.4
-tomcat-native-openssl.version=3.0.9
+tomcat-native.version=2.0.5
+tomcat-native-openssl.version=3.0.10
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=276133e44ae9f9d3e853b66120937865c675eed6dd6b5b7d8a94ef741f037c0b3d99a6c065a1303c0ca42b65c109aef35b6bd370a2af0b7b2752eadf85b1d880
+tomcat-native.src.checksum.value=03ed1951597bb6a6ade8d715546a0d635d261381737abd27b63aa552c69f9ca49405d0252b6bc2d878bfd64e87439f146ecd84ccbfc82661ba16379c493615a4
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=307d42bda3517fd549cfbfca3c62eb063379df707f763da9f1e27deeb5919e3b0414e581fb14e2a3c623325ada7f849a791ff56ea95e4e87b6670b58918a2d79
+tomcat-native.win.checksum.value=3c599d4da5c26b3dd1ddce7add5b8126e98f0068515f8bb942cc349716ea5f88519b9a1f76b3ba9badda79955f88eaf7940a78713064ccc547a232b921c0f05b
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c446f608db..76f18f82c5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -199,6 +199,9 @@
 files to refer to the Jakarta EE contract names rather than the Java EE
 contract names. (markt)
   
+  
+Update Tomcat Native to 2.0.5. (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 (bfd87b1214 -> 36d242fb79)

2023-08-07 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 bfd87b1214 Tighter validation to debug Gump failure
 new e42a763693 Update Tomcat Native to 1.2.38
 new 36d242fb79 Update minimum recommended version to 1.2.38

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:
 build.properties.default| 8 
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 +-
 webapps/docs/changelog.xml  | 4 
 3 files changed, 9 insertions(+), 5 deletions(-)


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



[tomcat] 02/02: Update minimum recommended version to 1.2.38

2023-08-07 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

commit 36d242fb79e84c6ff2e35b2d302f935d65eab7fe
Author: Mark Thomas 
AuthorDate: Mon Aug 7 13:20:37 2023 +0100

Update minimum recommended version to 1.2.38
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 0771d89e8f..5543194084 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -67,7 +67,7 @@ public class AprLifecycleListener implements 
LifecycleListener {
 protected static final int TCN_REQUIRED_PATCH = 14;
 protected static final int TCN_RECOMMENDED_MAJOR = 1;
 protected static final int TCN_RECOMMENDED_MINOR = 2;
-protected static final int TCN_RECOMMENDED_PV = 30;
+protected static final int TCN_RECOMMENDED_PV = 38;
 
 
 // -- Properties


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



[tomcat] 01/02: Update Tomcat Native to 1.2.38

2023-08-07 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

commit e42a76369399622b0fb3c6e2b331e678c9e4b0fb
Author: Mark Thomas 
AuthorDate: Mon Aug 7 13:20:04 2023 +0100

Update Tomcat Native to 1.2.38
---
 build.properties.default   | 8 
 webapps/docs/changelog.xml | 4 
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index bbbc9c33c4..9018216a40 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -162,14 +162,14 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=1.2.37
-tomcat-native-openssl.version=1.1.1u
+tomcat-native.version=1.2.38
+tomcat-native-openssl.version=1.1.1v
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=e845239f1b6a1dab22885d39f4fd131e464c38b0d52faca0d960f99fe3e8b7d732c0112f25e5eb81ff8dc71a5e3c6799bfdf867e617d8f934068ed107036fd0b
+tomcat-native.src.checksum.value=973c0dc8d241827aa98f72026d4de67928344c221570abbb7f97380fe56a9ad602b159a5448c6048d88d73fa0ade8c1ab12df293fee513d0e4896847b16206e6
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=02649ad04b839153cf6957fcefa0301bc343a51e44d551185b3797c3fcfbb7b08359d182f3870058d2894ac57609c235bed580f6c37de5573e0e582efab834ef
+tomcat-native.win.checksum.value=3c5f44e3cb7ace5378d6af9d1d1bb08129e68de7ec65f5e1d77c15d93fccd8637d3eafe93f4e0d50ef38d1026e9e54c478cb0c4872fda2d87df0b7579f5bae9e
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index abb82adbaa..a8e6e3c224 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -219,6 +219,10 @@
 environment variable as intended on Windows when the path to the Java
 executable contains spaces. (markt)
   
+  
+Update Tomcat Native to 1.2.38 to pick up Windows binaries built with
+OpenSSL 1.1.1v. (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 (8ebf1f455d -> c660bf7072)

2023-08-07 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 8ebf1f455d Tighter validation to debug Gump failure
 new 246255 Update Tomcat Native to 1.2.38
 new c660bf7072 Update minimum recommended version to 1.2.38

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:
 build.properties.default| 8 
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 +-
 webapps/docs/changelog.xml  | 4 
 3 files changed, 9 insertions(+), 5 deletions(-)


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



[tomcat] 02/02: Update minimum recommended version to 1.2.38

2023-08-07 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 c660bf70722496d68d12b78ddd6722caab5ffb87
Author: Mark Thomas 
AuthorDate: Mon Aug 7 13:20:37 2023 +0100

Update minimum recommended version to 1.2.38
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 26970ecd21..5a0882fa18 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -69,7 +69,7 @@ public class AprLifecycleListener implements 
LifecycleListener {
 protected static final int TCN_REQUIRED_PATCH = 14;
 protected static final int TCN_RECOMMENDED_MAJOR = 1;
 protected static final int TCN_RECOMMENDED_MINOR = 2;
-protected static final int TCN_RECOMMENDED_PV = 30;
+protected static final int TCN_RECOMMENDED_PV = 38;
 
 
 // -- Properties


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



[tomcat] 01/02: Update Tomcat Native to 1.2.38

2023-08-07 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 246255b5f78bea4156dca59734c56e426ea7
Author: Mark Thomas 
AuthorDate: Mon Aug 7 13:20:04 2023 +0100

Update Tomcat Native to 1.2.38
---
 build.properties.default   | 8 
 webapps/docs/changelog.xml | 4 
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 0d1c70f641..ac6031ab7d 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -166,14 +166,14 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=1.2.37
-tomcat-native-openssl.version=1.1.1u
+tomcat-native.version=1.2.38
+tomcat-native-openssl.version=1.1.1v
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=e845239f1b6a1dab22885d39f4fd131e464c38b0d52faca0d960f99fe3e8b7d732c0112f25e5eb81ff8dc71a5e3c6799bfdf867e617d8f934068ed107036fd0b
+tomcat-native.src.checksum.value=973c0dc8d241827aa98f72026d4de67928344c221570abbb7f97380fe56a9ad602b159a5448c6048d88d73fa0ade8c1ab12df293fee513d0e4896847b16206e6
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=02649ad04b839153cf6957fcefa0301bc343a51e44d551185b3797c3fcfbb7b08359d182f3870058d2894ac57609c235bed580f6c37de5573e0e582efab834ef
+tomcat-native.win.checksum.value=3c5f44e3cb7ace5378d6af9d1d1bb08129e68de7ec65f5e1d77c15d93fccd8637d3eafe93f4e0d50ef38d1026e9e54c478cb0c4872fda2d87df0b7579f5bae9e
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 19251eed03..e689d18d40 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -188,6 +188,10 @@
 environment variable as intended on Windows when the path to the Java
 executable contains spaces. (markt)
   
+  
+Update Tomcat Native to 1.2.38 to pick up Windows binaries built with
+OpenSSL 1.1.1v. (markt)
+  
 
   
 


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



[tomcat] branch main updated: Remove useless methods

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

remm 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 772761b100 Remove useless methods
772761b100 is described below

commit 772761b100eff6476a82eb5655f62c8a93b20024
Author: remm 
AuthorDate: Mon Aug 7 15:05:44 2023 +0200

Remove useless methods
---
 .../tomcat/util/net/openssl/panama/OpenSSLLibrary.java  | 13 -
 .../util/net/openssl/panama/OpenSSLLifecycleListener.java   |  8 
 2 files changed, 21 deletions(-)

diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
index 97ab8f452d..18a4915681 100644
--- 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
+++ 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
@@ -71,15 +71,6 @@ public class OpenSSLLibrary {
 
 protected static final Object lock = new Object();
 
-public static boolean isAvailable() {
-if (OpenSSLStatus.isInstanceCreated()) {
-synchronized (lock) {
-init();
-}
-}
-return OpenSSLStatus.isAvailable();
-}
-
 public OpenSSLLibrary() {
 OpenSSLStatus.setInstanceCreated(true);
 }
@@ -405,8 +396,4 @@ public class OpenSSLLibrary {
 return fipsModeActive;
 }
 
-public static boolean isInstanceCreated() {
-return OpenSSLStatus.isInstanceCreated();
-}
-
 }
diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLifecycleListener.java
 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLifecycleListener.java
index d2c8368e3c..dd43b456f2 100644
--- 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLifecycleListener.java
+++ 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLifecycleListener.java
@@ -45,10 +45,6 @@ public class OpenSSLLifecycleListener implements 
LifecycleListener {
 protected static final StringManager sm = 
StringManager.getManager(OpenSSLLifecycleListener.class);
 
 
-public static boolean isAvailable() {
-return OpenSSLLibrary.isAvailable();
-}
-
 // -- LifecycleListener Methods
 
 /**
@@ -123,8 +119,4 @@ public class OpenSSLLifecycleListener implements 
LifecycleListener {
 return OpenSSLLibrary.isFIPSModeActive();
 }
 
-public static boolean isInstanceCreated() {
-return OpenSSLStatus.isInstanceCreated();
-}
-
 }


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



[tomcat] branch main updated: Move ciphers finder

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

remm 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 a5180e740d Move ciphers finder
a5180e740d is described below

commit a5180e740d4dfc39431d55f05fbb36a4fa816dfb
Author: remm 
AuthorDate: Mon Aug 7 16:33:37 2023 +0200

Move ciphers finder

It would need to be used by OpenSSLCipherConfigurationParser.parse to
resolve PROFILE=, eventually, so prepare for that
---
 .../util/net/openssl/panama/OpenSSLEngine.java | 44 +---
 .../util/net/openssl/panama/OpenSSLLibrary.java| 48 ++
 .../net/openssl/panama/LocalStrings.properties |  2 +-
 3 files changed, 51 insertions(+), 43 deletions(-)

diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
index 3b4073d833..aa4fb1d2b8 100644
--- 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
+++ 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
@@ -102,33 +102,8 @@ public final class OpenSSLEngine extends SSLEngine 
implements SSLUtil.ProtocolIn
 throw new IllegalStateException(e);
 }
 
-OpenSSLLibrary.initLibrary();
-
 final Set availableCipherSuites = new LinkedHashSet<>(128);
-try (var localArena = Arena.ofConfined()) {
-var sslCtx = SSL_CTX_new(TLS_server_method());
-try {
-SSL_CTX_set_options(sslCtx, SSL_OP_ALL());
-SSL_CTX_set_cipher_list(sslCtx, 
localArena.allocateFrom("ALL"));
-var ssl = SSL_new(sslCtx);
-SSL_set_accept_state(ssl);
-try {
-for (String c : getCiphers(ssl)) {
-// Filter out bad input.
-if (c == null || c.length() == 0 || 
availableCipherSuites.contains(c)) {
-continue;
-}
-
availableCipherSuites.add(OpenSSLCipherConfigurationParser.openSSLToJsse(c));
-}
-} finally {
-SSL_free(ssl);
-}
-} finally {
-SSL_CTX_free(sslCtx);
-}
-} catch (Exception e) {
-log.warn(sm.getString("engine.ciphersFailure"), e);
-}
+availableCipherSuites.addAll(OpenSSLLibrary.findCiphers("ALL"));
 AVAILABLE_CIPHER_SUITES = 
Collections.unmodifiableSet(availableCipherSuites);
 
 HashSet protocols = new HashSet<>();
@@ -142,21 +117,6 @@ public final class OpenSSLEngine extends SSLEngine 
implements SSLUtil.ProtocolIn
 IMPLEMENTED_PROTOCOLS_SET = Collections.unmodifiableSet(protocols);
 }
 
-private static String[] getCiphers(MemorySegment ssl) {
-MemorySegment sk = SSL_get_ciphers(ssl);
-int len = OPENSSL_sk_num(sk);
-if (len <= 0) {
-return null;
-}
-ArrayList ciphers = new ArrayList<>(len);
-for (int i = 0; i < len; i++) {
-MemorySegment cipher = OPENSSL_sk_value(sk, i);
-MemorySegment cipherName = SSL_CIPHER_get_name(cipher);
-ciphers.add(cipherName.getString(0));
-}
-return ciphers.toArray(new String[0]);
-}
-
 private static final int MAX_PLAINTEXT_LENGTH = 16 * 1024; // 2^14
 private static final int MAX_COMPRESSED_LENGTH = MAX_PLAINTEXT_LENGTH + 
1024;
 private static final int MAX_CIPHERTEXT_LENGTH = MAX_COMPRESSED_LENGTH + 
1024;
@@ -718,7 +678,7 @@ public final class OpenSSLEngine extends SSLEngine 
implements SSLUtil.ProtocolIn
 if (destroyed) {
 return new String[0];
 }
-String[] enabled = getCiphers(state.ssl);
+String[] enabled = OpenSSLLibrary.getCiphers(state.ssl);
 if (enabled == null) {
 return new String[0];
 } else {
diff --git 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
index 18a4915681..9ed7f76f2d 100644
--- 
a/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
+++ 
b/modules/openssl-foreign/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
@@ -21,12 +21,15 @@ import java.lang.foreign.Arena;
 import java.lang.foreign.MemorySegment;
 import java.lang.foreign.ValueLayout;
 import java.security.SecureRandom;
+import java.util.ArrayList;
+import java.util.List;
 
 import static org.apache.tomcat.util.openssl.openssl_compat_h.FIPS_mode;
 import static org.apache.

Buildbot failure in on tomcat-11.0.x

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


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



[tomcat] branch main updated: Fix race condition that was causing intermittent CI failures

2023-08-07 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 d3f3359d2b Fix race condition that was causing intermittent CI failures
d3f3359d2b is described below

commit d3f3359d2ba3abdd8b9719ab9e3c45c51610305d
Author: Mark Thomas 
AuthorDate: Mon Aug 7 17:13:55 2023 +0100

Fix race condition that was causing intermittent CI failures

Ensure that, if there is no request body, the stream is notified that
end-of-stream has been received before passing processing of the request
to a container thread.
---
 java/org/apache/coyote/http2/Http2Parser.java  |  5 +--
 .../apache/coyote/http2/Http2UpgradeHandler.java   | 50 +++---
 test/org/apache/coyote/http2/Http2TestBase.java| 19 
 webapps/docs/changelog.xml |  4 ++
 4 files changed, 51 insertions(+), 27 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index 1eb0def3f6..c5f7f16ad5 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -626,10 +626,9 @@ class Http2Parser {
 hpackDecoder.getHeaderEmitter().validateHeaders();
 
 synchronized (output) {
-output.headersEnd(streamId);
+output.headersEnd(streamId, headersEndStream);
 
 if (headersEndStream) {
-output.receivedEndOfStream(streamId);
 headersEndStream = false;
 }
 }
@@ -777,7 +776,7 @@ class Http2Parser {
 
 void headersContinue(int payloadSize, boolean endOfHeaders);
 
-void headersEnd(int streamId) throws Http2Exception;
+void headersEnd(int streamId, boolean endOfStream) throws 
Http2Exception;
 
 // Reset frames
 void reset(int streamId, long errorCode) throws Http2Exception;
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 8b6c53bad5..389c2273a5 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -1547,20 +1547,6 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 }
 
 
-@Override
-public void receivedEndOfStream(int streamId) throws ConnectionException {
-AbstractNonZeroStream abstractNonZeroStream =
-getAbstractNonZeroStream(streamId, 
connectionState.get().isNewStreamAllowed());
-if (abstractNonZeroStream instanceof Stream) {
-Stream stream = (Stream) abstractNonZeroStream;
-stream.receivedEndOfStream();
-if (!stream.isActive()) {
-
setConnectionTimeoutForStreamCount(activeRemoteStreamCount.decrementAndGet());
-}
-}
-}
-
-
 @Override
 public void onSwallowedDataFramePayload(int streamId, int 
swallowedDataBytesCount) throws IOException {
 AbstractNonZeroStream abstractNonZeroStream = 
getAbstractNonZeroStream(streamId);
@@ -1631,10 +1617,11 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 
 
 @Override
-public void headersEnd(int streamId) throws Http2Exception {
+public void headersEnd(int streamId, boolean endOfStream) throws 
Http2Exception {
 AbstractNonZeroStream abstractNonZeroStream =
 getAbstractNonZeroStream(streamId, 
connectionState.get().isNewStreamAllowed());
 if (abstractNonZeroStream instanceof Stream) {
+boolean processStream = false;
 setMaxProcessedStream(streamId);
 Stream stream = (Stream) abstractNonZeroStream;
 if (stream.isActive()) {
@@ -1652,9 +1639,40 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 // Valid new stream reduces the overhead count
 reduceOverheadCount(FrameType.HEADERS);
 
-processStreamOnContainerThread(stream);
+processStream = true;
 }
 }
+/*
+ *  Need to process end of stream before calling 
processStreamOnContainerThread to avoid a race condition
+ *  where the container thread finishes before end of stream is 
processed, thinks the request hasn't been
+ *  fully read so issues a RST with error code 0 (NO_ERROR) to 
tell the client not to send the request body,
+ *  if any. This breaks tests and generates unnecessary RST 
messages for standard clients.
+ */
+if (endOfStream) {
+receivedEndOfStream(stream);
+}
+if (processStream) {
+processStreamOnContainerThread(stream);
+}
+}
+

[tomcat] branch 10.1.x updated: Fix race condition that was causing intermittent CI failures

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new b2e1f5b0bb Fix race condition that was causing intermittent CI failures
b2e1f5b0bb is described below

commit b2e1f5b0bb0b6646efaf875cd45b9eb65a103a28
Author: Mark Thomas 
AuthorDate: Mon Aug 7 17:13:55 2023 +0100

Fix race condition that was causing intermittent CI failures

Ensure that, if there is no request body, the stream is notified that
end-of-stream has been received before passing processing of the request
to a container thread.
---
 java/org/apache/coyote/http2/Http2Parser.java  |  5 +--
 .../apache/coyote/http2/Http2UpgradeHandler.java   | 50 +++---
 test/org/apache/coyote/http2/Http2TestBase.java| 19 
 webapps/docs/changelog.xml |  4 ++
 4 files changed, 51 insertions(+), 27 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index 0c9cea062e..384a5baf00 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -643,10 +643,9 @@ class Http2Parser {
 hpackDecoder.getHeaderEmitter().validateHeaders();
 
 synchronized (output) {
-output.headersEnd(streamId);
+output.headersEnd(streamId, headersEndStream);
 
 if (headersEndStream) {
-output.receivedEndOfStream(streamId);
 headersEndStream = false;
 }
 }
@@ -794,7 +793,7 @@ class Http2Parser {
 
 void headersContinue(int payloadSize, boolean endOfHeaders);
 
-void headersEnd(int streamId) throws Http2Exception;
+void headersEnd(int streamId, boolean endOfStream) throws 
Http2Exception;
 
 // Reset frames
 void reset(int streamId, long errorCode) throws Http2Exception;
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 137d009fd6..53b75b5457 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -1547,20 +1547,6 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 }
 
 
-@Override
-public void receivedEndOfStream(int streamId) throws ConnectionException {
-AbstractNonZeroStream abstractNonZeroStream =
-getAbstractNonZeroStream(streamId, 
connectionState.get().isNewStreamAllowed());
-if (abstractNonZeroStream instanceof Stream) {
-Stream stream = (Stream) abstractNonZeroStream;
-stream.receivedEndOfStream();
-if (!stream.isActive()) {
-
setConnectionTimeoutForStreamCount(activeRemoteStreamCount.decrementAndGet());
-}
-}
-}
-
-
 @Override
 public void onSwallowedDataFramePayload(int streamId, int 
swallowedDataBytesCount) throws IOException {
 AbstractNonZeroStream abstractNonZeroStream = 
getAbstractNonZeroStream(streamId);
@@ -1648,10 +1634,11 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 
 
 @Override
-public void headersEnd(int streamId) throws Http2Exception {
+public void headersEnd(int streamId, boolean endOfStream) throws 
Http2Exception {
 AbstractNonZeroStream abstractNonZeroStream =
 getAbstractNonZeroStream(streamId, 
connectionState.get().isNewStreamAllowed());
 if (abstractNonZeroStream instanceof Stream) {
+boolean processStream = false;
 setMaxProcessedStream(streamId);
 Stream stream = (Stream) abstractNonZeroStream;
 if (stream.isActive()) {
@@ -1669,9 +1656,40 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 // Valid new stream reduces the overhead count
 reduceOverheadCount(FrameType.HEADERS);
 
-processStreamOnContainerThread(stream);
+processStream = true;
 }
 }
+/*
+ *  Need to process end of stream before calling 
processStreamOnContainerThread to avoid a race condition
+ *  where the container thread finishes before end of stream is 
processed, thinks the request hasn't been
+ *  fully read so issues a RST with error code 0 (NO_ERROR) to 
tell the client not to send the request body,
+ *  if any. This breaks tests and generates unnecessary RST 
messages for standard clients.
+ */
+if (endOfStream) {
+receivedEndOfStream(stream);
+}
+if (processStream) {
+processStreamOnContainerThread(stream);
+}
+   

[tomcat] branch 9.0.x updated: Fix race condition that was causing intermittent CI failures

2023-08-07 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 c7fb31ccb0 Fix race condition that was causing intermittent CI failures
c7fb31ccb0 is described below

commit c7fb31ccb0a1154ac7ad2d7e4696e2b1cf226796
Author: Mark Thomas 
AuthorDate: Mon Aug 7 17:13:55 2023 +0100

Fix race condition that was causing intermittent CI failures

Ensure that, if there is no request body, the stream is notified that
end-of-stream has been received before passing processing of the request
to a container thread.
---
 java/org/apache/coyote/http2/Http2Parser.java  |  5 +--
 .../apache/coyote/http2/Http2UpgradeHandler.java   | 50 +++---
 test/org/apache/coyote/http2/Http2TestBase.java| 19 
 webapps/docs/changelog.xml |  4 ++
 4 files changed, 51 insertions(+), 27 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index da61589c93..ee84cc17c8 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -643,10 +643,9 @@ class Http2Parser {
 hpackDecoder.getHeaderEmitter().validateHeaders();
 
 synchronized (output) {
-output.headersEnd(streamId);
+output.headersEnd(streamId, headersEndStream);
 
 if (headersEndStream) {
-output.receivedEndOfStream(streamId);
 headersEndStream = false;
 }
 }
@@ -794,7 +793,7 @@ class Http2Parser {
 
 void headersContinue(int payloadSize, boolean endOfHeaders);
 
-void headersEnd(int streamId) throws Http2Exception;
+void headersEnd(int streamId, boolean endOfStream) throws 
Http2Exception;
 
 // Reset frames
 void reset(int streamId, long errorCode) throws Http2Exception;
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index d8e04d04da..22472e87d5 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -1541,20 +1541,6 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 }
 
 
-@Override
-public void receivedEndOfStream(int streamId) throws ConnectionException {
-AbstractNonZeroStream abstractNonZeroStream =
-getAbstractNonZeroStream(streamId, 
connectionState.get().isNewStreamAllowed());
-if (abstractNonZeroStream instanceof Stream) {
-Stream stream = (Stream) abstractNonZeroStream;
-stream.receivedEndOfStream();
-if (!stream.isActive()) {
-
setConnectionTimeoutForStreamCount(activeRemoteStreamCount.decrementAndGet());
-}
-}
-}
-
-
 @Override
 public void onSwallowedDataFramePayload(int streamId, int 
swallowedDataBytesCount) throws IOException {
 AbstractNonZeroStream abstractNonZeroStream = 
getAbstractNonZeroStream(streamId);
@@ -1642,10 +1628,11 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 
 
 @Override
-public void headersEnd(int streamId) throws Http2Exception {
+public void headersEnd(int streamId, boolean endOfStream) throws 
Http2Exception {
 AbstractNonZeroStream abstractNonZeroStream =
 getAbstractNonZeroStream(streamId, 
connectionState.get().isNewStreamAllowed());
 if (abstractNonZeroStream instanceof Stream) {
+boolean processStream = false;
 setMaxProcessedStream(streamId);
 Stream stream = (Stream) abstractNonZeroStream;
 if (stream.isActive()) {
@@ -1663,9 +1650,40 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 // Valid new stream reduces the overhead count
 reduceOverheadCount(FrameType.HEADERS);
 
-processStreamOnContainerThread(stream);
+processStream = true;
 }
 }
+/*
+ *  Need to process end of stream before calling 
processStreamOnContainerThread to avoid a race condition
+ *  where the container thread finishes before end of stream is 
processed, thinks the request hasn't been
+ *  fully read so issues a RST with error code 0 (NO_ERROR) to 
tell the client not to send the request body,
+ *  if any. This breaks tests and generates unnecessary RST 
messages for standard clients.
+ */
+if (endOfStream) {
+receivedEndOfStream(stream);
+}
+if (processStream) {
+processStreamOnContainerThread(stream);
+}
+}

[tomcat] branch 8.5.x updated: Fix race condition that was causing intermittent CI failures

2023-08-07 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 5e5d14e772 Fix race condition that was causing intermittent CI failures
5e5d14e772 is described below

commit 5e5d14e7729fdea7dc5faa439b48fc18740370e1
Author: Mark Thomas 
AuthorDate: Mon Aug 7 17:13:55 2023 +0100

Fix race condition that was causing intermittent CI failures

Ensure that, if there is no request body, the stream is notified that
end-of-stream has been received before passing processing of the request
to a container thread.
---
 java/org/apache/coyote/http2/Http2Parser.java  |  5 +--
 .../apache/coyote/http2/Http2UpgradeHandler.java   | 50 +++---
 test/org/apache/coyote/http2/Http2TestBase.java| 19 
 webapps/docs/changelog.xml |  4 ++
 4 files changed, 51 insertions(+), 27 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2Parser.java 
b/java/org/apache/coyote/http2/Http2Parser.java
index 2962c0699e..d8a3ce1b6c 100644
--- a/java/org/apache/coyote/http2/Http2Parser.java
+++ b/java/org/apache/coyote/http2/Http2Parser.java
@@ -581,10 +581,9 @@ class Http2Parser {
 // going to be thrown.
 hpackDecoder.getHeaderEmitter().validateHeaders();
 
-output.headersEnd(streamId);
+output.headersEnd(streamId, headersEndStream);
 
 if (headersEndStream) {
-output.receivedEndOfStream(streamId);
 headersEndStream = false;
 }
 
@@ -720,7 +719,7 @@ class Http2Parser {
 
 void headersContinue(int payloadSize, boolean endOfHeaders);
 
-void headersEnd(int streamId) throws Http2Exception;
+void headersEnd(int streamId, boolean endOfStream) throws 
Http2Exception;
 
 // Reset frames
 void reset(int streamId, long errorCode) throws Http2Exception;
diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 925e43e0d7..b5e5d5ce08 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -1652,20 +1652,6 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 }
 
 
-@Override
-public void receivedEndOfStream(int streamId) throws ConnectionException {
-AbstractNonZeroStream abstractNonZeroStream =
-getAbstractNonZeroStream(streamId, 
connectionState.get().isNewStreamAllowed());
-if (abstractNonZeroStream instanceof Stream) {
-Stream stream = (Stream) abstractNonZeroStream;
-stream.receivedEndOfStream();
-if (!stream.isActive()) {
-
setConnectionTimeoutForStreamCount(activeRemoteStreamCount.decrementAndGet());
-}
-}
-}
-
-
 @Override
 public void onSwallowedDataFramePayload(int streamId, int 
swallowedDataBytesCount) throws IOException {
 AbstractNonZeroStream abstractNonZeroStream = 
getAbstractNonZeroStream(streamId);
@@ -1753,10 +1739,11 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 
 
 @Override
-public void headersEnd(int streamId) throws Http2Exception {
+public void headersEnd(int streamId, boolean endOfStream) throws 
Http2Exception {
 AbstractNonZeroStream abstractNonZeroStream =
 getAbstractNonZeroStream(streamId, 
connectionState.get().isNewStreamAllowed());
 if (abstractNonZeroStream instanceof Stream) {
+boolean processStream = false;
 setMaxProcessedStream(streamId);
 Stream stream = (Stream) abstractNonZeroStream;
 if (stream.isActive()) {
@@ -1774,9 +1761,40 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 // Valid new stream reduces the overhead count
 reduceOverheadCount(FrameType.HEADERS);
 
-processStreamOnContainerThread(stream);
+processStream = true;
 }
 }
+/*
+ *  Need to process end of stream before calling 
processStreamOnContainerThread to avoid a race condition
+ *  where the container thread finishes before end of stream is 
processed, thinks the request hasn't been
+ *  fully read so issues a RST with error code 0 (NO_ERROR) to 
tell the client not to send the request body,
+ *  if any. This breaks tests and generates unnecessary RST 
messages for standard clients.
+ */
+if (endOfStream) {
+receivedEndOfStream(stream);
+}
+if (processStream) {
+processStreamOnContainerThread(stream);
+}
+}
+}
+
+
+@Override
+pu

Buildbot success in on tomcat-11.0.x

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


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



Buildbot failure in on tomcat-9.0.x

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


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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