You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2019/11/13 15:04:10 UTC
[Bug 63922] New: The Native Memory Tracking cannot be activated by
Tomcat 7, 8 or 9 windows service
https://bz.apache.org/bugzilla/show_bug.cgi?id=63922
Bug ID: 63922
Summary: The Native Memory Tracking cannot be activated by
Tomcat 7, 8 or 9 windows service
Product: Tomcat 9
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: major
Priority: P2
Component: Packaging
Assignee: dev@tomcat.apache.org
Reporter: Artur.Linhart@algites.eu
Target Milestone: -----
In the case the user specifies some from the the NativeMemoryTracking
parameters (see
https://docs.oracle.com/en/java/javase/11/vm/native-memory-tracking.html#GUID-0DB3B8D1-8D7D-447F-B6FF-15620103EE47
) like
-XX:NativeMemoryTracking=summary
in Windows service registry, restarts the service, so the option can be seen in
the log file by the startup options, then teh Native memory tracking is still
disabled and does not work. If you try with
jcmd <pid> VM.native_memory summary
to get the information about the native JVM memory in the tomcats JVM, the jcmd
call fails with the message
<pid>:
Native memory tracking is not enabled
and in the Tomcat's log file can be found following error message:
Java HotSpot(TM) 64-Bit Server VM warning: Native Memory Tracking did not setup
properly, using wrong launcher?
The problem seems to be in the JVM launcher Procrun, which dies not initialize
the JVM propertly - as far as I have understood from this blog:
https://blogs.oracle.com/poonam/using-nmt-with-custom-jvm-launcher
The Procrun.exe has to define some environmetn variable before the start of
JVM, etc. to get the native memory tracking to work.
Known workaround is the start of Tomcat from the command line, but this is no
option in the productive environment, where you have to let the service run for
longer time to collect the proper result and maybe also as some different user
because of security concerns, then such option is simply out of possible
scenarios. So the Tomcat service JVM cannot be in such circumstances tracked by
NMT at all, what is the problem in the mission-critical applications.
The Procrun should be modified in the way it enables the NMT in the windows
service by the startup, by setting the environment variable
NMT_LEVEL_<pid> to the value "detail" or "summary" (or "off" if unspecified) in
the dependency on the specified or unspecified option of
-XX:NativeMemoryTracking
like done normally by java.exe
Remark: Also change of the startup mode from "jvm" to "exe" or "java" does not
help,. then the windows service does not start at all.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 63922] The Java NMT (Native Memory Trackingú cannot be activated by Tomcat 7, 8 or 9 windows service
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63922
--- Comment #2 from Artur Linhart <Ar...@algites.eu> ---
OK, thank you for correcting me. See the issue
https://issues.apache.org/jira/browse/DAEMON-412
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 63922] The Java NMT (Native Memory Trackingú cannot be activated by Tomcat 7, 8 or 9 windows service
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63922
Artur Linhart <Ar...@algites.eu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|The Native Memory Tracking |The Java NMT (Native Memory
|cannot be activated by |Trackingú cannot be
|Tomcat 7, 8 or 9 windows |activated by Tomcat 7, 8 or
|service |9 windows service
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 63922] The Java NMT (Native Memory Trackingú cannot be activated by Tomcat 7, 8 or 9 windows service
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63922
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Procrun is part of the Commons Daemon project. Bugs against procrun should be
raised at:
https://issues.apache.org/jira/projects/DAEMON
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org