Buildbot success in on tomcat-8.5.x

2023-05-20 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/36/builds/492
Blamelist: Igal Sapir , ledefe , lihan 

Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 8.5.x] ffb68373ae76a0c4f62e65800b544feba09fdba5


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



Buildbot success in on tomcat-9.0.x

2023-05-20 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/37/builds/561
Blamelist: Igal Sapir , ledefe , lihan 

Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 9.0.x] 02ea99c86923c6ac544a5a9289bdc233c04e08f3


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



Buildbot success in on tomcat-10.1.x

2023-05-20 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/804
Blamelist: Igal Sapir , ledefe , lihan 

Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 10.1.x] 47b57c32acdbe953b8b66b08b62db6416985415e


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



Buildbot success in on tomcat-11.0.x

2023-05-20 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/383
Blamelist: Igal Sapir , lihan 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch main] 2de4a3c337b47bb2654d70a76a7e031ce970f679


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



Re: [tomcat] branch main updated: Clear SocketWrapper reference to help GC

2023-05-20 Thread Han Li


> On May 21, 2023, at 01:19, Mark Thomas  wrote:
> 
> On 19/05/2023 04:24, li...@apache.org  wrote:
>> This is an automated email from the ASF dual-hosted git repository.
>> lihan 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 10492dd22b Clear SocketWrapper reference to help GC
>> 10492dd22b is described below
>> commit 10492dd22bd64ff63cf77786fa67d45cdc2a54b3
>> Author: lihan mailto:li...@apache.org>>
>> AuthorDate: Fri May 19 11:24:27 2023 +0800
>> Clear SocketWrapper reference to help GC
> 
> -1. Veto.
> 
>> ---
>> java/org/apache/coyote/AbstractProcessor.java | 3 +++
>> java/org/apache/coyote/http11/Http11Processor.java | 1 -
>> java/org/apache/coyote/http2/StreamProcessor.java | 6 +-
> 
> The above changes need to be reverted since they break AJP connections. The 
> AJP processor is recycled after CPING MESSAGES and expects processing to 
> continue afterwards. Setting the SocketWrapper to null triggers NPEs when 
> trying to process the request that follows the CPING.

Sigh, I indeed forgot to test the AJP processor.

Have reverted, thanks for the review.

Han

> 
>> java/org/apache/tomcat/util/net/Nio2Channel.java | 1 +
>> java/org/apache/tomcat/util/net/NioChannel.java | 1 +
> 
> The above changes look to be OK although I'll note that they do add some 
> processing overhead.

> 
> Mark
> 
> 
>> 5 files changed, 6 insertions(+), 6 deletions(-)
>> diff --git a/java/org/apache/coyote/AbstractProcessor.java 
>> b/java/org/apache/coyote/AbstractProcessor.java
>> index 3ee6898fbd..8965dab62b 100644
>> --- a/java/org/apache/coyote/AbstractProcessor.java
>> +++ b/java/org/apache/coyote/AbstractProcessor.java
>> @@ -721,6 +721,9 @@ public abstract class AbstractProcessor extends 
>> AbstractProcessorLight implement
>> public void recycle() {
>> errorState = ErrorState.NONE;
>> asyncStateMachine.recycle();
>> + // Clear fields that can be cleared to aid GC and trigger NPEs if this
>> + // is reused
>> + socketWrapper = null;
>> }
>> diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
>> b/java/org/apache/coyote/http11/Http11Processor.java
>> index 9e2e74914c..85dfd34f3c 100644
>> --- a/java/org/apache/coyote/http11/Http11Processor.java
>> +++ b/java/org/apache/coyote/http11/Http11Processor.java
>> @@ -1418,7 +1418,6 @@ public class Http11Processor extends AbstractProcessor 
>> {
>> inputBuffer.recycle();
>> outputBuffer.recycle();
>> upgradeToken = null;
>> - socketWrapper = null;
>> sendfileData = null;
>> sslSupport = null;
>> }
>> diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
>> b/java/org/apache/coyote/http2/StreamProcessor.java
>> index 78cb770649..3b1c03ac38 100644
>> --- a/java/org/apache/coyote/http2/StreamProcessor.java
>> +++ b/java/org/apache/coyote/http2/StreamProcessor.java
>> @@ -392,8 +392,8 @@ class StreamProcessor extends AbstractProcessor {
>> @Override
>> public final void recycle() {
>> + super.recycle();
>> // StreamProcessor instances are not re-used.
>> -
>> // Calling removeRequestProcessor even though the RequestProcesser was
>> // never added will add the values from the RequestProcessor to the
>> // running total for the GlobalRequestProcessor
>> @@ -401,10 +401,6 @@ class StreamProcessor extends AbstractProcessor {
>> if (global != null) {
>> global.removeRequestProcessor(request.getRequestProcessor());
>> }
>> -
>> - // Clear fields that can be cleared to aid GC and trigger NPEs if this
>> - // is reused
>> - setSocketWrapper(null);
>> }
>> diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java 
>> b/java/org/apache/tomcat/util/net/Nio2Channel.java
>> index 603c43f416..9d65266374 100644
>> --- a/java/org/apache/tomcat/util/net/Nio2Channel.java
>> +++ b/java/org/apache/tomcat/util/net/Nio2Channel.java
>> @@ -79,6 +79,7 @@ public class Nio2Channel implements 
>> AsynchronousByteChannel {
>> @Override
>> public void close() throws IOException {
>> sc.close();
>> + reset(this.sc, null);
>> }
>> diff --git a/java/org/apache/tomcat/util/net/NioChannel.java 
>> b/java/org/apache/tomcat/util/net/NioChannel.java
>> index d263ce9ae6..eae3f51171 100644
>> --- a/java/org/apache/tomcat/util/net/NioChannel.java
>> +++ b/java/org/apache/tomcat/util/net/NioChannel.java
>> @@ -81,6 +81,7 @@ public class NioChannel implements ByteChannel, 
>> ScatteringByteChannel, Gathering
>> @Override
>> public void close() throws IOException {
>> sc.close();
>> + reset(this.sc,null);
>> }
>> /**
>> -
>> 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 
> 

[tomcat] branch 8.5.x updated: Revert "Clear SocketWrapper reference to help GC"

2023-05-20 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan 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 ffb68373ae Revert "Clear SocketWrapper reference to help GC"
ffb68373ae is described below

commit ffb68373ae76a0c4f62e65800b544feba09fdba5
Author: lihan 
AuthorDate: Sun May 21 09:30:02 2023 +0800

Revert "Clear SocketWrapper reference to help GC"

This reverts commit 2a084c266e09b048c1a49c749cb8ab1e8feedbfc.
---
 java/org/apache/coyote/AbstractProcessor.java  | 3 ---
 java/org/apache/coyote/http11/Http11Processor.java | 1 +
 java/org/apache/tomcat/util/net/Nio2Channel.java   | 1 -
 java/org/apache/tomcat/util/net/NioChannel.java| 1 -
 4 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/java/org/apache/coyote/AbstractProcessor.java 
b/java/org/apache/coyote/AbstractProcessor.java
index 0295396112..2a28d683ed 100644
--- a/java/org/apache/coyote/AbstractProcessor.java
+++ b/java/org/apache/coyote/AbstractProcessor.java
@@ -709,9 +709,6 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 public void recycle() {
 errorState = ErrorState.NONE;
 asyncStateMachine.recycle();
-// Clear fields that can be cleared to aid GC and trigger NPEs if this
-// is reused
-socketWrapper = null;
 }
 
 
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 5cc2ecc752..b8705441e8 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1612,6 +1612,7 @@ public class Http11Processor extends AbstractProcessor {
 inputBuffer.recycle();
 outputBuffer.recycle();
 upgradeToken = null;
+socketWrapper = null;
 sendfileData = null;
 }
 
diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java 
b/java/org/apache/tomcat/util/net/Nio2Channel.java
index 6040b8855e..a2612fd0c1 100644
--- a/java/org/apache/tomcat/util/net/Nio2Channel.java
+++ b/java/org/apache/tomcat/util/net/Nio2Channel.java
@@ -79,7 +79,6 @@ public class Nio2Channel implements AsynchronousByteChannel {
 @Override
 public void close() throws IOException {
 sc.close();
-reset(this.sc, null);
 }
 
 
diff --git a/java/org/apache/tomcat/util/net/NioChannel.java 
b/java/org/apache/tomcat/util/net/NioChannel.java
index 777880d67d..8e3cb4f0e1 100644
--- a/java/org/apache/tomcat/util/net/NioChannel.java
+++ b/java/org/apache/tomcat/util/net/NioChannel.java
@@ -99,7 +99,6 @@ public class NioChannel implements ByteChannel, 
ScatteringByteChannel, Gathering
 @Override
 public void close() throws IOException {
 sc.close();
-reset(this.sc,null);
 }
 
 /**


-
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: Revert "Clear SocketWrapper reference to help GC"

2023-05-20 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan 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 02ea99c869 Revert "Clear SocketWrapper reference to help GC"
02ea99c869 is described below

commit 02ea99c86923c6ac544a5a9289bdc233c04e08f3
Author: lihan 
AuthorDate: Sun May 21 09:29:32 2023 +0800

Revert "Clear SocketWrapper reference to help GC"

This reverts commit 2cb6f8e4681359087a2a52b6950a315383a8d422.
---
 java/org/apache/coyote/AbstractProcessor.java  | 3 ---
 java/org/apache/coyote/http11/Http11Processor.java | 1 +
 java/org/apache/coyote/http2/StreamProcessor.java  | 6 +-
 java/org/apache/tomcat/util/net/Nio2Channel.java   | 1 -
 java/org/apache/tomcat/util/net/NioChannel.java| 1 -
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/AbstractProcessor.java 
b/java/org/apache/coyote/AbstractProcessor.java
index 0230a5d442..a49bc921cf 100644
--- a/java/org/apache/coyote/AbstractProcessor.java
+++ b/java/org/apache/coyote/AbstractProcessor.java
@@ -716,9 +716,6 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 public void recycle() {
 errorState = ErrorState.NONE;
 asyncStateMachine.recycle();
-// Clear fields that can be cleared to aid GC and trigger NPEs if this
-// is reused
-socketWrapper = null;
 }
 
 
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 9070b9727c..aab2290407 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1419,6 +1419,7 @@ public class Http11Processor extends AbstractProcessor {
 inputBuffer.recycle();
 outputBuffer.recycle();
 upgradeToken = null;
+socketWrapper = null;
 sendfileData = null;
 sslSupport = null;
 }
diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index e1ed635e8d..fd1e011bea 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -391,8 +391,8 @@ class StreamProcessor extends AbstractProcessor {
 
 @Override
 public final void recycle() {
-super.recycle();
 // StreamProcessor instances are not re-used.
+
 // Calling removeRequestProcessor even though the RequestProcesser was
 // never added will add the values from the RequestProcessor to the
 // running total for the GlobalRequestProcessor
@@ -400,6 +400,10 @@ class StreamProcessor extends AbstractProcessor {
 if (global != null) {
 global.removeRequestProcessor(request.getRequestProcessor());
 }
+
+// Clear fields that can be cleared to aid GC and trigger NPEs if this
+// is reused
+setSocketWrapper(null);
 }
 
 
diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java 
b/java/org/apache/tomcat/util/net/Nio2Channel.java
index 6040b8855e..a2612fd0c1 100644
--- a/java/org/apache/tomcat/util/net/Nio2Channel.java
+++ b/java/org/apache/tomcat/util/net/Nio2Channel.java
@@ -79,7 +79,6 @@ public class Nio2Channel implements AsynchronousByteChannel {
 @Override
 public void close() throws IOException {
 sc.close();
-reset(this.sc, null);
 }
 
 
diff --git a/java/org/apache/tomcat/util/net/NioChannel.java 
b/java/org/apache/tomcat/util/net/NioChannel.java
index 777880d67d..8e3cb4f0e1 100644
--- a/java/org/apache/tomcat/util/net/NioChannel.java
+++ b/java/org/apache/tomcat/util/net/NioChannel.java
@@ -99,7 +99,6 @@ public class NioChannel implements ByteChannel, 
ScatteringByteChannel, Gathering
 @Override
 public void close() throws IOException {
 sc.close();
-reset(this.sc,null);
 }
 
 /**


-
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: Revert "Clear SocketWrapper reference to help GC"

2023-05-20 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan 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 47b57c32ac Revert "Clear SocketWrapper reference to help GC"
47b57c32ac is described below

commit 47b57c32acdbe953b8b66b08b62db6416985415e
Author: lihan 
AuthorDate: Sun May 21 09:28:59 2023 +0800

Revert "Clear SocketWrapper reference to help GC"

This reverts commit 2b65532cafe4b9eedb588b45aa8570cfc03c165e.
---
 java/org/apache/coyote/AbstractProcessor.java  | 3 ---
 java/org/apache/coyote/http11/Http11Processor.java | 1 +
 java/org/apache/coyote/http2/StreamProcessor.java  | 6 +-
 java/org/apache/tomcat/util/net/Nio2Channel.java   | 1 -
 java/org/apache/tomcat/util/net/NioChannel.java| 1 -
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/AbstractProcessor.java 
b/java/org/apache/coyote/AbstractProcessor.java
index d14224702c..ece5a6abda 100644
--- a/java/org/apache/coyote/AbstractProcessor.java
+++ b/java/org/apache/coyote/AbstractProcessor.java
@@ -717,9 +717,6 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 public void recycle() {
 errorState = ErrorState.NONE;
 asyncStateMachine.recycle();
-// Clear fields that can be cleared to aid GC and trigger NPEs if this
-// is reused
-socketWrapper = null;
 }
 
 
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index cb03b4fa41..db2286d2b0 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1420,6 +1420,7 @@ public class Http11Processor extends AbstractProcessor {
 inputBuffer.recycle();
 outputBuffer.recycle();
 upgradeToken = null;
+socketWrapper = null;
 sendfileData = null;
 sslSupport = null;
 }
diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index f76fbfa788..d08c875cbd 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -385,8 +385,8 @@ class StreamProcessor extends AbstractProcessor {
 
 @Override
 public final void recycle() {
-super.recycle();
 // StreamProcessor instances are not re-used.
+
 // Calling removeRequestProcessor even though the RequestProcesser was
 // never added will add the values from the RequestProcessor to the
 // running total for the GlobalRequestProcessor
@@ -394,6 +394,10 @@ class StreamProcessor extends AbstractProcessor {
 if (global != null) {
 global.removeRequestProcessor(request.getRequestProcessor());
 }
+
+// Clear fields that can be cleared to aid GC and trigger NPEs if this
+// is reused
+setSocketWrapper(null);
 }
 
 
diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java 
b/java/org/apache/tomcat/util/net/Nio2Channel.java
index 9d65266374..603c43f416 100644
--- a/java/org/apache/tomcat/util/net/Nio2Channel.java
+++ b/java/org/apache/tomcat/util/net/Nio2Channel.java
@@ -79,7 +79,6 @@ public class Nio2Channel implements AsynchronousByteChannel {
 @Override
 public void close() throws IOException {
 sc.close();
-reset(this.sc, null);
 }
 
 
diff --git a/java/org/apache/tomcat/util/net/NioChannel.java 
b/java/org/apache/tomcat/util/net/NioChannel.java
index eae3f51171..d263ce9ae6 100644
--- a/java/org/apache/tomcat/util/net/NioChannel.java
+++ b/java/org/apache/tomcat/util/net/NioChannel.java
@@ -81,7 +81,6 @@ public class NioChannel implements ByteChannel, 
ScatteringByteChannel, Gathering
 @Override
 public void close() throws IOException {
 sc.close();
-reset(this.sc,null);
 }
 
 /**


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



[tomcat] branch main updated: Revert "Clear SocketWrapper reference to help GC"

2023-05-20 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan 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 2de4a3c337 Revert "Clear SocketWrapper reference to help GC"
2de4a3c337 is described below

commit 2de4a3c337b47bb2654d70a76a7e031ce970f679
Author: lihan 
AuthorDate: Sun May 21 09:27:51 2023 +0800

Revert "Clear SocketWrapper reference to help GC"

This reverts commit 10492dd22bd64ff63cf77786fa67d45cdc2a54b3.
---
 java/org/apache/coyote/AbstractProcessor.java  | 3 ---
 java/org/apache/coyote/http11/Http11Processor.java | 1 +
 java/org/apache/coyote/http2/StreamProcessor.java  | 6 +-
 java/org/apache/tomcat/util/net/Nio2Channel.java   | 1 -
 java/org/apache/tomcat/util/net/NioChannel.java| 1 -
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/AbstractProcessor.java 
b/java/org/apache/coyote/AbstractProcessor.java
index 8965dab62b..3ee6898fbd 100644
--- a/java/org/apache/coyote/AbstractProcessor.java
+++ b/java/org/apache/coyote/AbstractProcessor.java
@@ -721,9 +721,6 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 public void recycle() {
 errorState = ErrorState.NONE;
 asyncStateMachine.recycle();
-// Clear fields that can be cleared to aid GC and trigger NPEs if this
-// is reused
-socketWrapper = null;
 }
 
 
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 85dfd34f3c..9e2e74914c 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1418,6 +1418,7 @@ public class Http11Processor extends AbstractProcessor {
 inputBuffer.recycle();
 outputBuffer.recycle();
 upgradeToken = null;
+socketWrapper = null;
 sendfileData = null;
 sslSupport = null;
 }
diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index 3b1c03ac38..78cb770649 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -392,8 +392,8 @@ class StreamProcessor extends AbstractProcessor {
 
 @Override
 public final void recycle() {
-super.recycle();
 // StreamProcessor instances are not re-used.
+
 // Calling removeRequestProcessor even though the RequestProcesser was
 // never added will add the values from the RequestProcessor to the
 // running total for the GlobalRequestProcessor
@@ -401,6 +401,10 @@ class StreamProcessor extends AbstractProcessor {
 if (global != null) {
 global.removeRequestProcessor(request.getRequestProcessor());
 }
+
+// Clear fields that can be cleared to aid GC and trigger NPEs if this
+// is reused
+setSocketWrapper(null);
 }
 
 
diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java 
b/java/org/apache/tomcat/util/net/Nio2Channel.java
index 9d65266374..603c43f416 100644
--- a/java/org/apache/tomcat/util/net/Nio2Channel.java
+++ b/java/org/apache/tomcat/util/net/Nio2Channel.java
@@ -79,7 +79,6 @@ public class Nio2Channel implements AsynchronousByteChannel {
 @Override
 public void close() throws IOException {
 sc.close();
-reset(this.sc, null);
 }
 
 
diff --git a/java/org/apache/tomcat/util/net/NioChannel.java 
b/java/org/apache/tomcat/util/net/NioChannel.java
index eae3f51171..d263ce9ae6 100644
--- a/java/org/apache/tomcat/util/net/NioChannel.java
+++ b/java/org/apache/tomcat/util/net/NioChannel.java
@@ -81,7 +81,6 @@ public class NioChannel implements ByteChannel, 
ScatteringByteChannel, Gathering
 @Override
 public void close() throws IOException {
 sc.close();
-reset(this.sc,null);
 }
 
 /**


-
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: Format doc example

2023-05-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 af27d43ec7 Format doc example
af27d43ec7 is described below

commit af27d43ec795941c575006434e26612764ecd1cc
Author: Igal Sapir 
AuthorDate: Sat May 20 18:06:52 2023 -0700

Format doc example
---
 webapps/docs/config/filter.xml | 29 ++---
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/webapps/docs/config/filter.xml b/webapps/docs/config/filter.xml
index 1c25e15adb..617167d3e4 100644
--- a/webapps/docs/config/filter.xml
+++ b/webapps/docs/config/filter.xml
@@ -1325,21 +1325,20 @@ FINE: Request "/docs/config/manager.html" with response 
status "200"
   
 
   
-To allow access only for the clients connecting from localhost:
-
-  
-  Remote CIDR Filter
-  
org.apache.catalina.filters.RemoteCIDRFilter
-  
-  allow
-  127.0.0.0/8, ::1
-  
-  
-  
-  Remote CIDR Filter
-  /*
-  
-
+To allow access only for the clients connecting from localhost and from 
local network 192.68.0.*:
+
   
 
 


-
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: Format doc example

2023-05-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 409761f78d Format doc example
409761f78d is described below

commit 409761f78d6be2deebf1a180ad19096c13f6cc98
Author: Igal Sapir 
AuthorDate: Sat May 20 18:05:35 2023 -0700

Format doc example
---
 webapps/docs/config/filter.xml | 29 ++---
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/webapps/docs/config/filter.xml b/webapps/docs/config/filter.xml
index 1c25e15adb..617167d3e4 100644
--- a/webapps/docs/config/filter.xml
+++ b/webapps/docs/config/filter.xml
@@ -1325,21 +1325,20 @@ FINE: Request "/docs/config/manager.html" with response 
status "200"
   
 
   
-To allow access only for the clients connecting from localhost:
-
-  
-  Remote CIDR Filter
-  
org.apache.catalina.filters.RemoteCIDRFilter
-  
-  allow
-  127.0.0.0/8, ::1
-  
-  
-  
-  Remote CIDR Filter
-  /*
-  
-
+To allow access only for the clients connecting from localhost and from 
local network 192.68.0.*:
+
   
 
 


-
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: Format doc example

2023-05-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 b25b660ecd Format doc example
b25b660ecd is described below

commit b25b660ecd9f2e67793e506d853916d2c3330c48
Author: Igal Sapir 
AuthorDate: Sat May 20 17:54:00 2023 -0700

Format doc example
---
 webapps/docs/config/filter.xml | 29 ++---
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/webapps/docs/config/filter.xml b/webapps/docs/config/filter.xml
index 1c25e15adb..617167d3e4 100644
--- a/webapps/docs/config/filter.xml
+++ b/webapps/docs/config/filter.xml
@@ -1325,21 +1325,20 @@ FINE: Request "/docs/config/manager.html" with response 
status "200"
   
 
   
-To allow access only for the clients connecting from localhost:
-
-  
-  Remote CIDR Filter
-  
org.apache.catalina.filters.RemoteCIDRFilter
-  
-  allow
-  127.0.0.0/8, ::1
-  
-  
-  
-  Remote CIDR Filter
-  /*
-  
-
+To allow access only for the clients connecting from localhost and from 
local network 192.68.0.*:
+
   
 
 


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



[tomcat] branch main updated: Format doc example

2023-05-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 8ab5174afe Format doc example
8ab5174afe is described below

commit 8ab5174afe10e28f5f7fd85887a6f21881bd8e85
Author: Igal Sapir 
AuthorDate: Sat May 20 17:49:21 2023 -0700

Format doc example
---
 webapps/docs/config/filter.xml | 29 ++---
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/webapps/docs/config/filter.xml b/webapps/docs/config/filter.xml
index 1c25e15adb..617167d3e4 100644
--- a/webapps/docs/config/filter.xml
+++ b/webapps/docs/config/filter.xml
@@ -1325,21 +1325,20 @@ FINE: Request "/docs/config/manager.html" with response 
status "200"
   
 
   
-To allow access only for the clients connecting from localhost:
-
-  
-  Remote CIDR Filter
-  
org.apache.catalina.filters.RemoteCIDRFilter
-  
-  allow
-  127.0.0.0/8, ::1
-  
-  
-  
-  Remote CIDR Filter
-  /*
-  
-
+To allow access only for the clients connecting from localhost and from 
local network 192.68.0.*:
+
   
 
 


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



Re: [tomcat] branch main updated: Clear SocketWrapper reference to help GC

2023-05-20 Thread Rémy Maucherat
On Sat, May 20, 2023 at 7:19 PM Mark Thomas  wrote:
>
> On 19/05/2023 04:24, li...@apache.org wrote:
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > lihan 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 10492dd22b Clear SocketWrapper reference to help GC
> > 10492dd22b is described below
> >
> > commit 10492dd22bd64ff63cf77786fa67d45cdc2a54b3
> > Author: lihan 
> > AuthorDate: Fri May 19 11:24:27 2023 +0800
> >
> >  Clear SocketWrapper reference to help GC
>
> -1. Veto.

Seconded since the test failures caught this.

> > ---
> >   java/org/apache/coyote/AbstractProcessor.java  | 3 +++
> >   java/org/apache/coyote/http11/Http11Processor.java | 1 -
> >   java/org/apache/coyote/http2/StreamProcessor.java  | 6 +-
>
> The above changes need to be reverted since they break AJP connections.
> The AJP processor is recycled after CPING MESSAGES and expects
> processing to continue afterwards. Setting the SocketWrapper to null
> triggers NPEs when trying to process the request that follows the CPING.
>
> >   java/org/apache/tomcat/util/net/Nio2Channel.java   | 1 +
> >   java/org/apache/tomcat/util/net/NioChannel.java| 1 +
>
> The above changes look to be OK although I'll note that they do add some
> processing overhead.

I never did it on purpose since it seemed useless. However, I don't
think it really makes any difference.

Rémy

>
> Mark
>
>
> >   5 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/java/org/apache/coyote/AbstractProcessor.java 
> > b/java/org/apache/coyote/AbstractProcessor.java
> > index 3ee6898fbd..8965dab62b 100644
> > --- a/java/org/apache/coyote/AbstractProcessor.java
> > +++ b/java/org/apache/coyote/AbstractProcessor.java
> > @@ -721,6 +721,9 @@ public abstract class AbstractProcessor extends 
> > AbstractProcessorLight implement
> >   public void recycle() {
> >   errorState = ErrorState.NONE;
> >   asyncStateMachine.recycle();
> > +// Clear fields that can be cleared to aid GC and trigger NPEs if 
> > this
> > +// is reused
> > +socketWrapper = null;
> >   }
> >
> >
> > diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
> > b/java/org/apache/coyote/http11/Http11Processor.java
> > index 9e2e74914c..85dfd34f3c 100644
> > --- a/java/org/apache/coyote/http11/Http11Processor.java
> > +++ b/java/org/apache/coyote/http11/Http11Processor.java
> > @@ -1418,7 +1418,6 @@ public class Http11Processor extends 
> > AbstractProcessor {
> >   inputBuffer.recycle();
> >   outputBuffer.recycle();
> >   upgradeToken = null;
> > -socketWrapper = null;
> >   sendfileData = null;
> >   sslSupport = null;
> >   }
> > diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
> > b/java/org/apache/coyote/http2/StreamProcessor.java
> > index 78cb770649..3b1c03ac38 100644
> > --- a/java/org/apache/coyote/http2/StreamProcessor.java
> > +++ b/java/org/apache/coyote/http2/StreamProcessor.java
> > @@ -392,8 +392,8 @@ class StreamProcessor extends AbstractProcessor {
> >
> >   @Override
> >   public final void recycle() {
> > +super.recycle();
> >   // StreamProcessor instances are not re-used.
> > -
> >   // Calling removeRequestProcessor even though the 
> > RequestProcesser was
> >   // never added will add the values from the RequestProcessor to 
> > the
> >   // running total for the GlobalRequestProcessor
> > @@ -401,10 +401,6 @@ class StreamProcessor extends AbstractProcessor {
> >   if (global != null) {
> >   global.removeRequestProcessor(request.getRequestProcessor());
> >   }
> > -
> > -// Clear fields that can be cleared to aid GC and trigger NPEs if 
> > this
> > -// is reused
> > -setSocketWrapper(null);
> >   }
> >
> >
> > diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java 
> > b/java/org/apache/tomcat/util/net/Nio2Channel.java
> > index 603c43f416..9d65266374 100644
> > --- a/java/org/apache/tomcat/util/net/Nio2Channel.java
> > +++ b/java/org/apache/tomcat/util/net/Nio2Channel.java
> > @@ -79,6 +79,7 @@ public class Nio2Channel implements 
> > AsynchronousByteChannel {
> >   @Override
> >   public void close() throws IOException {
> >   sc.close();
> > +reset(this.sc, null);
> >   }
> >
> >
> > diff --git a/java/org/apache/tomcat/util/net/NioChannel.java 
> > b/java/org/apache/tomcat/util/net/NioChannel.java
> > index d263ce9ae6..eae3f51171 100644
> > --- a/java/org/apache/tomcat/util/net/NioChannel.java
> > +++ b/java/org/apache/tomcat/util/net/NioChannel.java
> > @@ -81,6 +81,7 @@ public class NioChannel implements ByteChannel, 
> > ScatteringByteChannel, Gathering
> >   @Override
> >   public void close() throws IOException {
> >  

Re: [tomcat] branch main updated: Clear SocketWrapper reference to help GC

2023-05-20 Thread Mark Thomas

On 19/05/2023 04:24, li...@apache.org wrote:

This is an automated email from the ASF dual-hosted git repository.

lihan 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 10492dd22b Clear SocketWrapper reference to help GC
10492dd22b is described below

commit 10492dd22bd64ff63cf77786fa67d45cdc2a54b3
Author: lihan 
AuthorDate: Fri May 19 11:24:27 2023 +0800

 Clear SocketWrapper reference to help GC


-1. Veto.


---
  java/org/apache/coyote/AbstractProcessor.java  | 3 +++
  java/org/apache/coyote/http11/Http11Processor.java | 1 -
  java/org/apache/coyote/http2/StreamProcessor.java  | 6 +-


The above changes need to be reverted since they break AJP connections. 
The AJP processor is recycled after CPING MESSAGES and expects 
processing to continue afterwards. Setting the SocketWrapper to null 
triggers NPEs when trying to process the request that follows the CPING.



  java/org/apache/tomcat/util/net/Nio2Channel.java   | 1 +
  java/org/apache/tomcat/util/net/NioChannel.java| 1 +


The above changes look to be OK although I'll note that they do add some 
processing overhead.


Mark



  5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/AbstractProcessor.java 
b/java/org/apache/coyote/AbstractProcessor.java
index 3ee6898fbd..8965dab62b 100644
--- a/java/org/apache/coyote/AbstractProcessor.java
+++ b/java/org/apache/coyote/AbstractProcessor.java
@@ -721,6 +721,9 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
  public void recycle() {
  errorState = ErrorState.NONE;
  asyncStateMachine.recycle();
+// Clear fields that can be cleared to aid GC and trigger NPEs if this
+// is reused
+socketWrapper = null;
  }
  
  
diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java

index 9e2e74914c..85dfd34f3c 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1418,7 +1418,6 @@ public class Http11Processor extends AbstractProcessor {
  inputBuffer.recycle();
  outputBuffer.recycle();
  upgradeToken = null;
-socketWrapper = null;
  sendfileData = null;
  sslSupport = null;
  }
diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index 78cb770649..3b1c03ac38 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -392,8 +392,8 @@ class StreamProcessor extends AbstractProcessor {
  
  @Override

  public final void recycle() {
+super.recycle();
  // StreamProcessor instances are not re-used.
-
  // Calling removeRequestProcessor even though the RequestProcesser was
  // never added will add the values from the RequestProcessor to the
  // running total for the GlobalRequestProcessor
@@ -401,10 +401,6 @@ class StreamProcessor extends AbstractProcessor {
  if (global != null) {
  global.removeRequestProcessor(request.getRequestProcessor());
  }
-
-// Clear fields that can be cleared to aid GC and trigger NPEs if this
-// is reused
-setSocketWrapper(null);
  }
  
  
diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java b/java/org/apache/tomcat/util/net/Nio2Channel.java

index 603c43f416..9d65266374 100644
--- a/java/org/apache/tomcat/util/net/Nio2Channel.java
+++ b/java/org/apache/tomcat/util/net/Nio2Channel.java
@@ -79,6 +79,7 @@ public class Nio2Channel implements AsynchronousByteChannel {
  @Override
  public void close() throws IOException {
  sc.close();
+reset(this.sc, null);
  }
  
  
diff --git a/java/org/apache/tomcat/util/net/NioChannel.java b/java/org/apache/tomcat/util/net/NioChannel.java

index d263ce9ae6..eae3f51171 100644
--- a/java/org/apache/tomcat/util/net/NioChannel.java
+++ b/java/org/apache/tomcat/util/net/NioChannel.java
@@ -81,6 +81,7 @@ public class NioChannel implements ByteChannel, 
ScatteringByteChannel, Gathering
  @Override
  public void close() throws IOException {
  sc.close();
+reset(this.sc,null);
  }
  
  /**



-
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