Re: (tomcat) 09/12: This is a performance test - use correct naming

2024-01-07 Thread Rainer Jung

Am 03.01.24 um 12:29 schrieb ma...@apache.org:

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 8fe3db67fdd69c160367982e85b23bfe01689c5c
Author: Mark Thomas 
AuthorDate: Wed Jan 3 10:43:07 2024 +

 This is a performance test - use correct naming
---
  .../{TestConnectionLimit.java => TestConnectionLimitPerformance.java} | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/test/org/apache/tomcat/websocket/TestConnectionLimit.java 
b/test/org/apache/tomcat/websocket/TestConnectionLimitPerformance.java
similarity index 96%
rename from test/org/apache/tomcat/websocket/TestConnectionLimit.java
rename to test/org/apache/tomcat/websocket/TestConnectionLimitPerformance.java
index 463ee95b01..6fc045622c 100644
--- a/test/org/apache/tomcat/websocket/TestConnectionLimit.java
+++ b/test/org/apache/tomcat/websocket/TestConnectionLimitPerformance.java
@@ -25,7 +25,6 @@ import jakarta.websocket.DeploymentException;
  import jakarta.websocket.WebSocketContainer;
  
  import org.junit.Assert;

-import org.junit.Ignore;
  import org.junit.Test;
  
  import org.apache.catalina.Context;

@@ -34,8 +33,7 @@ import org.apache.catalina.startup.Tomcat;
  import org.apache.catalina.startup.TomcatBaseTest;
  import 
org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint;
  
-@Ignore // Not for use in normal unit test runs

-public class TestConnectionLimit extends TomcatBaseTest {
+public class TestConnectionLimitPerformance extends TomcatBaseTest {
  
  /*

   * Simple test to see how many outgoing connections can be created on a 
single machine.


This test - which probably wasn't executed before - now fails frequently 
for me. The failure is with java.lang.NoClassDefFoundError in various 
places. An example:


Testcase: testSingleMachine took 9.285 sec
Caused an ERROR
org/apache/catalina/startup/ExpandWar
java.lang.NoClassDefFoundError: org/apache/catalina/startup/ExpandWar
at 
org.apache.catalina.startup.LoggingBaseTest.tearDown(LoggingBaseTest.java:138)
at 
org.apache.catalina.startup.TomcatBaseTest.tearDown(TomcatBaseTest.java:243)
at 
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Caused by: java.lang.ClassNotFoundException: 
org.apache.catalina.startup.ExpandWar
at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)

Testcase: org.apache.tomcat.websocket.TestConnectionLimitPerformance 
took 0 sec

Caused an ERROR
org/apache/catalina/startup/ExpandWar
java.lang.NoClassDefFoundError: org/apache/catalina/startup/ExpandWar
at 
org.apache.catalina.startup.LoggingBaseTest.tearDownPerTestClass(LoggingBaseTest.java:154)
at 
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Caused by: java.lang.ClassNotFoundException: 
org.apache.catalina.startup.ExpandWar



The stacks can differ and also the classes in the 
java.lang.NoClassDefFoundError:


jakarta/websocket/SendResult
org/apache/catalina/Lifecycle$SingleUse
org/apache/catalina/startup/ExpandWar
org/apache/tomcat/PeriodicEventListener
org/apache/tomcat/util/net/SocketWrapperBase$BlockingMode
org/apache/tomcat/util/net/SocketWrapperBase$CompletionState
org/apache/tomcat/websocket/MessagePart
org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer$1
org/apache/tomcat/websocket/WsRemoteEndpointImplBase$BlockingSendHandler


Wild guess: it might be, because the tested process runs out of file 
descriptors before:


06-Jan-2024 09:59:21.358 SEVERE [http-nio-127.0.0.1-auto-1-Acceptor] 
org.apache.tomcat.util.net.Acceptor.run Socket accept failed

java.io.IOException: Too many open files
at java.base/sun.nio.ch.Net.accept(Native Method)
		at 
java.base/sun.nio.ch.ServerSocketChannelImpl.implAccept(ServerSocketChannelImpl.java:433)
		at 
java.base/sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:399)
		at 
org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:518)
		at 
org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:80)

at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:128)
at java.base/java.lang.Thread.run(Thread.java:1583)


Best regards,

Rainer

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



Re: (tomcat) 11/12: Results depend on timing so group this with the performance tests

2024-01-07 Thread Rainer Jung

Am 03.01.24 um 12:29 schrieb ma...@apache.org:

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 9c5f303e9aea86564c15ed83491d9a4b6beff829
Author: Mark Thomas 
AuthorDate: Wed Jan 3 10:46:46 2024 +

 Results depend on timing so group this with the performance tests
---
  .../{TestAsyncMessages.java => TestAsyncMessagesPerformance.java} | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/test/org/apache/tomcat/websocket/server/TestAsyncMessages.java 
b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java
similarity index 97%
rename from test/org/apache/tomcat/websocket/server/TestAsyncMessages.java
rename to 
test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java
index 4a2ef86b39..c169f61a60 100644
--- a/test/org/apache/tomcat/websocket/server/TestAsyncMessages.java
+++ b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java
@@ -27,7 +27,6 @@ import jakarta.websocket.Session;
  import jakarta.websocket.WebSocketContainer;
  
  import org.junit.Assert;

-import org.junit.Ignore;
  import org.junit.Test;
  
  import org.apache.catalina.Context;

@@ -37,8 +36,7 @@ import org.apache.catalina.startup.TomcatBaseTest;
  import org.apache.tomcat.websocket.TesterAsyncTiming;
  import 
org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint;
  
-@Ignore // Test passes but GC delays can introduce false failures.

-public class TestAsyncMessages extends TomcatBaseTest {
+public class TestAsyncMessagesPerformance extends TomcatBaseTest {
  
  @Test

  public void testAsyncTiming() throws Exception {


This test - which was probably not executed before - now fails for me 
always. Most of the times it complains about times longer than the 500 
microsecs limit (going up to a few milliseconds in a few cases), but 
sometimes it even hangs. I can try to get a stack dump when it hangs again.


Best regards,

Rainer

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



Re: [VOTE] Release Apache Tomcat 11.0.0-M16

2024-01-07 Thread Igal Sapir
Have there been any recent changes that might
affect org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance
using NIO2? I ran it a few times and it fails on Linux with Azul Java
21.0.1+12-LTS -
org.apache.tomcat.util.net.AbstractEndpoint.processSocket Executor rejected
sock
et [org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper@54bff557:Closed
Nio2Channel] for processing
   java.util.concurrent.RejectedExecutionException: Executor not
running, can't force a command into the queue

Full output below.

Igal

❯ cat
/workspace/build/tomcat/main/build/logs/TEST-org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance.NIO2.txt

Testsuite: org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 26.312 sec
- Standard Output ---
Sent Hello message, waiting for data
Expected diff < 500,000 but was [567099], count [56]
Expected diff < 500,000 but was [709569], count [65]
Expected diff < 500,000 but was [537496], count [110]
Expected diff < 500,000 but was [502372], count [116]
Expected diff < 500,000 but was [595551], count [152]
Expected diff < 500,000 but was [533207], count [164]
Expected diff < 500,000 but was [534436], count [176]
Expected diff < 500,000 but was [600551], count [179]
Expected diff < 500,000 but was [523944], count [182]
Expected diff < 500,000 but was [532614], count [185]
Expected diff < 500,000 but was [657567], count [188]
Expected diff < 500,000 but was [846194], count [191]
Expected diff < 500,000 but was [532466], count [194]
Expected diff < 500,000 but was [514685], count [224]
Expected diff < 500,000 but was [519522], count [230]
Expected diff < 500,000 but was [554426], count [239]
Expected diff < 500,000 but was [527420], count [245]
Expected diff < 500,000 but was [610897], count [269]
Expected diff < 500,000 but was [624163], count [281]
Expected diff < 500,000 but was [841963], count [287]
Expected diff < 500,000 but was [519565], count [293]
Expected diff < 500,000 but was [635134], count [302]
Expected diff < 500,000 but was [660258], count [305]
Expected diff < 500,000 but was [501776], count [311]
Expected diff < 500,000 but was [56], count [314]
Expected diff < 500,000 but was [581086], count [323]
Expected diff < 500,000 but was [609751], count [326]
Expected diff < 500,000 but was [645257], count [332]
Expected diff < 500,000 but was [688288], count [335]
Expected diff < 500,000 but was [554412], count [338]
Expected diff < 500,000 but was [563938], count [359]
Expected diff < 500,000 but was [562841], count [362]
Expected diff < 500,000 but was [673779], count [365]
Expected diff < 500,000 but was [546897], count [371]
Expected diff < 500,000 but was [643343], count [374]
Expected diff < 500,000 but was [723508], count [383]
Expected diff < 500,000 but was [594315], count [392]
Expected diff < 500,000 but was [752402], count [395]
Expected diff < 500,000 but was [500642], count [401]
Expected diff < 500,000 but was [544715], count [410]
Expected diff < 500,000 but was [547439], count [413]
Expected diff < 500,000 but was [529557], count [416]
Expected diff < 500,000 but was [504613], count [428]
Expected diff < 500,000 but was [509866], count [434]
Expected diff < 500,000 but was [550444], count [440]
Expected diff < 500,000 but was [550533], count [455]
Expected diff < 500,000 but was [506029], count [467]
Expected diff < 500,000 but was [637453], count [470]
Expected diff < 500,000 but was [640345], count [479]
Expected diff < 500,000 but was [716690], count [485]
Expected diff < 500,000 but was [17129814], count [488]
Expected diff > 40ms but was [33748798], count [489]
Expected diff < 500,000 but was [1130429], count [490]
Expected diff < 500,000 but was [517541], count [491]
Expected diff < 500,000 but was [501639], count [497]
Expected diff < 500,000 but was [593562], count [500]
Expected diff < 500,000 but was [681615], count [503]
Expected diff < 500,000 but was [532502], count [524]
Expected diff < 500,000 but was [598957], count [527]
Expected diff < 500,000 but was [611344], count [539]
Expected diff < 500,000 but was [627601], count [554]
Expected diff < 500,000 but was [574242], count [557]
Expected diff < 500,000 but was [548632], count [566]
Expected diff < 500,000 but was [542409], count [578]
Expected diff < 500,000 but was [538701], count [584]
Expected diff < 500,000 but was [500443], count [602]
Expected diff < 500,000 but was [582018], count [608]
Expected diff < 500,000 but was [567923], count [635]
Expected diff < 500,000 but was [512395], count [656]
Expected diff < 500,000 but was [647834], count [662]
Expected diff < 500,000 but was [532620], count [665]
Expected diff < 500,000 but was [506794], count [668]
Expected diff < 500,000 but was [578525], count [689]
Expected diff < 500,000 but was [509293], count [695]
Expected diff < 500,000 but was [689391], count [716]
Expected diff < 500,000 but was [678806], count [743]
Expec

Re: [VOTE] Release Apache Tomcat 10.1.18

2024-01-07 Thread Igal Sapir
I get a failing test
for org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance.NIO2 -
same as in the main branch and I posted more details in the thread for the
Vote on 11.0.0-M16

Igal


On Fri, Jan 5, 2024 at 7:25 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> The proposed Apache Tomcat 10.1.18 release is now available for
> voting.
>
> The notable changes compared to 10.1.17 are:
>
> - Fix virtual thread support for the NIO2 connector.
>
> - Correct a regression in the fix for 67675 that broke TLS key file
>parsing for PKCS#8 format keys that do not specify an explicit
>pseudo-random function and rely on the default. This typically affects
>keys generated by OpenSSL 1.0.2.
>
> - Allow multiple operations with the same name on introspected mbeans,
>fixing a regression caused by the introduction of a second
>addSslHostConfig() method.
>
> For full details, see the change log:
> https://nightlies.apache.org/tomcat/tomcat-10.1.x/docs/changelog.html
>
> Applications that run on Tomcat 9 and earlier will not run on Tomcat 10
> without changes. Java EE applications designed for Tomcat 9 and earlier
> may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat
> will automatically convert them to Jakarta EE and copy them to the
> webapps directory.
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-10/v10.1.18/
>
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1476
>
> The tag is:
> https://github.com/apache/tomcat/tree/10.1.18
> dd75fed1ae949455531e6a1aae55fb6ea7615786
>
> The proposed 10.1.18 release is:
> [ ] Broken - do not release
> [ ] Stable - go ahead and release as 10.1.18
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


(tomcat) branch main updated: Add Run Configuration for IntelliJ IDEA

2024-01-07 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 2d9f42aea5 Add Run Configuration for IntelliJ IDEA
2d9f42aea5 is described below

commit 2d9f42aea59e734225e13cf17b46ab52a63744ac
Author: Igal Sapir 
AuthorDate: Sun Jan 7 23:02:12 2024 -0800

Add Run Configuration for IntelliJ IDEA
---
 build.xml  |  9 +++--
 res/ide-support/idea/compiler.xml  | 14 ++
 res/ide-support/idea/tomcat.iml| 10 ++
 res/ide-support/idea/workspace.xml | 18 ++
 4 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/build.xml b/build.xml
index 806c47d4b9..2daf02fe1c 100644
--- a/build.xml
+++ b/build.xml
@@ -264,6 +264,7 @@
 
 
 
+
   
 
   
@@ -3818,7 +3819,7 @@ Read the Building page on the Apache Tomcat documentation 
site for details on ho
   
 
   
 
 
@@ -3827,7 +3828,11 @@ Read the Building page on the Apache Tomcat 
documentation site for details on ho
   
 
 
-IntelliJ IDEA project directory created.
+
+
+IntelliJ IDEA project directory created.
+The SDK was set to "${build.java.version}" so make sure that your 
IDE has an SDK with that name,
+or update the Project Settings accordingly.
   
 
   
diff --git a/res/ide-support/idea/compiler.xml 
b/res/ide-support/idea/compiler.xml
new file mode 100644
index 00..dc73b5a101
--- /dev/null
+++ b/res/ide-support/idea/compiler.xml
@@ -0,0 +1,14 @@
+
+
+  
+
+  
+
+
+  
+
+  
+
\ No newline at end of file
diff --git a/res/ide-support/idea/tomcat.iml b/res/ide-support/idea/tomcat.iml
index 08e6c05f7a..b4bc5870fd 100644
--- a/res/ide-support/idea/tomcat.iml
+++ b/res/ide-support/idea/tomcat.iml
@@ -120,5 +120,15 @@
   
 
 
+
+  
+
+  
+
+
+
+
+  
+
   
 
diff --git a/res/ide-support/idea/workspace.xml 
b/res/ide-support/idea/workspace.xml
new file mode 100644
index 00..761caf13ad
--- /dev/null
+++ b/res/ide-support/idea/workspace.xml
@@ -0,0 +1,18 @@
+
+
+  
+
+  
+  
+
+  
+  
+  
+  
+  
+  
+
+  
+
+  
+
\ No newline at end of file


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