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

--- Comment #9 from Konstantin Kolinko <knst.koli...@gmail.com> ---
1. First, I should apologize for a quick rant. I guess that I reacted on "Can
you help..." plea, as it is not something that I expect in a bug report. As I
and Mark wrote previously, help is provided elsewhere.

2. This is still no a valid bug report for Tomcat, as the service wrapper is a
third party component, provided by the Apache Commons Daemon project.

See:
https://tomcat.apache.org/bugreport.html#Third_party_components

3. Investigating further, my results are:

TLDR, overall it seems like the -Xss option is ignored when launching Java via
JNI API. Maybe Mark uses different version of Java.


(1) I am able to reproduce the issue using the web application provided by the
OP in comment 5, when using Apache Tomcat 9.0.68.

I am using July 2022 versions of Java. E.g. 1.8.0u345 from Eclipse Adoptium.
I have not updated to the October 2022 versions yet.

Expected result: when I change the stack size, I expect the iteration numbers
as printed in tomcat9-stdout.2022-10-27.log to change.

Actual result: the numbers go up to around 15300, no more.


(2) API used by Commons Daemon Procrun to launch JVM is JNI_CreateJavaVM.

https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/invocation.html#creating_the_vm

In the source code the call is
https://github.com/apache/commons-daemon/blob/master/src/native/windows/src/javajni.c#L817

As you can see the stack size is printed as a "-Xss" option for the command
line:

wsprintfA(iB[2], "-Xss%dk", dwSs);

(3) If I enable "debug" log level on the "Logging" tab of the configuration
dialog, I see the "-Xss" value being logged in commons-daemon.2022-10-27.log

[2022-10-27 18:43:41] [debug] ( javajni.c:419 ) [11416]
JNI_GetCreatedJavaVMs...
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[0]
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[1]
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 9.0
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[2]
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[3]
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[4]
-Djava.util.logging.config.file=C:\Program Files\Apache Software
Foundation\Tomcat 9.0\conf\logging.properties
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[5]
-Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat
9.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat
9.0\bin\tomcat-juli.jar
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[6] exit
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[7] abort
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[8] -Xms128m
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[9] -Xmx256m
[2022-10-27 18:43:41] [debug] ( javajni.c:817 ) [15152] JVM Option[10]
-Xss3072k
[2022-10-27 18:43:41] [debug] ( javajni.c:1003) [15152] argv[0] = start


As such, I think that the value is just being ignored by Java Runtime.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to