jstack | JavaScript implementation of OpenStack API | REST library
kandi X-RAY | jstack Summary
kandi X-RAY | jstack Summary
JavaScript implementation of OpenStack API
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- step 44 4
jstack Key Features
jstack Examples and Code Snippets
Community Discussions
Trending Discussions on jstack
QUESTION
I am running Tomcat 9 on an Ubuntu 20.04 OS using OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode). When I try to gather diagnostics info using jstat, jstack, etc, I see PID not found. jps also cannot identify the Tomcat process id.
I have checked several posts like one, two, three, four, etc, but none of the answers given in these helped me to solve my problem!
Even though I am passing the username with which the Tomcat process is running, jstat cannot find that process: sudo -u tomcat jstat -gc 476174 5000
In case it matters:
- I can see that the Tomcat process is started with
-Djava.io.tmpdir=/tmp
This folder is owned by root user but has full permissions(777) enabled. - When the Tomcat process is started, I can see a folder with name
systemd-private-e6d8b5dc224848f8a64a3e943ac2e9c4-tomcat9.service-UH5knj
(the last few chars after service- change every time the process is restarted) getting created with owner as root (probably because I start tomcat service usingsudo service tomcat9 start
) and this folder has permission ofrwx------
.
Any hints on how to solve this issue?
Thanks, Shobhana
...ANSWER
Answered 2021-Feb-09 at 20:58All these tools (jstack, jmap, jstat...) rely on the communication with the target JVM through /tmp
directory.
Apparently Tomcat runs in a different mount namespace, so that its /tmp
directory is not the same as /tmp
of the current shell. To verify this, run
QUESTION
I've been trying to find ways to obtain the Thread Dump from a Java Application on my Windows server running on jre 1.8.0_144.
Non of the monitoring utilities like jcmd jstack jconsole are available in either the bin or lib folders of the Java environment directory.
I have come across several applications online that claim to perform the same task but haven't found a reliable one yet.
Appreciate it anyone has a recommendation or a suggestion. (Changing the JRE version, unfortunately, has been ruled out as an option)
...ANSWER
Answered 2020-Nov-05 at 18:08There is a way if you are running with tools.jar available, that is running from a JDK instead of a stock JRE. However given that you don't have the jcmd, jstack, jconsole tools available, this is unlikely.
QUESTION
By going to the Amazon EMR summary page, I can only see command for how to connect to the master node with hadoop
user:
ANSWER
Answered 2020-Oct-18 at 17:59Apparently Presto service is run as presto
OS user.
Thus, you need to invoke jstack
as that user too.
For example
QUESTION
Does anyone know what the * following a filename in macOS terminal means?
All the file names in the folder:
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands
have a * trailing them and I'm not sure why.
For example:
...ANSWER
Answered 2020-Sep-28 at 01:30As for the executable-looking emulator that you can't actually execute, this can happen when the dynamic loader requested by emulator doesn't exist. You can check what kind of file emulator is with the command file emulator, and check what dynamic loader and libraries it needs with ldd emulator (any line showing “not found” is something you need to install). Given the name of the directory and the size of the file, emulator is probably a Linux x86 binary. I suspect you have an amd64 system. If so, you need to install a runtime environment for 32-bit applications; on Ubuntu, you need the ia32-libs package (and perhaps also ia32-libs-gtk). You could also get this error message for a script whose interpreter as indicated in the #! line doesn't exist.
same question here.
QUESTION
The GC time is too long in my spark streaming programme. In the GC log, I found that Someone called System.gc()
in the programme. I do not call System.gc()
in my code. So the caller should be the api I used.
I add -XX:-DisableExplicitGC
to JVM and fix this problem. However, I want to know who call the System.gc()
.
I tried some methods.
- Use
jstack
. But the GC is not so frequent, it is difficult to dump the thread that call the method. - I add trigger that add thread dump when invoke method
java.lang.System.gc()
in JProfiler. But it doesn't seem to work.
How can I know who call System.gc() in spark streaming program?
...ANSWER
Answered 2020-May-17 at 11:16You will not catch System.gc
with jstack
, because during stop-the-world pauses JVM does not accept connections from Dynamic Attach tools, including jstack
, jmap
, jcmd
and similar.
It's possible to trace System.gc
callers with async-profiler:
Start profiling beforehand:
QUESTION
Sometimes I have maven surefire tests that get hung, due to either races or deadlocks.
When this happens I have to discover what slave is being used, and then I have to log on that slave, sudo to jenkins account and execute either jstack or kill -3
I am looking for a simple solution like doing jstack / kill -3 when someone presses abort button on the jenkins.
Can someone suggest how can I automate this or some better way of handling this?
...ANSWER
Answered 2020-Apr-19 at 17:37This has been discussed in detail in maven email group. In the end I went with the below suggestion and added a timeout in all my test classes via @Rule
Hi, you can create a simple Listener like this one: https://github.com/apache/bookkeeper/blob/master/bookkeeper-common/src/test/java/org/apache/bookkeeper/common/testing/util/TimedOutTestsListener.java
check on the pom.xml file about how to enable it: https://github.com/apache/bookkeeper/blob/2f996dcf0159f945f7ec97ce7402e5d293009444/bookkeeper-server/pom.xml#L212
hope that helps
Enrico
QUESTION
in our production server I found a strange behaviore where the REST POST threads sometimes hangs or stuck and remain in RUNNABLE state for ever in method sun.nio.ch.PollArrayWrapper.poll0(Native Method)
after some days the wildfly app server become unresponsive and consume high CPU.
here is a print screen form our javamelody monitoring that show some of the hanging threads in a RUNNABLE state for more that 50 hours (and counting).
To be sure I took some jstack trace files and I found the same threads are still thier and in RUNNABLE state.
The default task-302 thread stack (from thread dump file) as follows ..
...ANSWER
Answered 2017-Jul-11 at 11:01The root cause of this issue was due to an android activity that uses retrofit library to interact with our web service. But in certain cases it let the connection with the server open and hence the server thread is in runnable state.
to fix this from the server side, we added timeout settings in the HTTP and HTTPS module in wildfly. this action solved the case.
QUESTION
I found my apps CPU using very high(> 200%), and I dump the thread using jstack:
...ANSWER
Answered 2019-Nov-29 at 13:05Try to implement ReactiveHealthIndicator like this:
QUESTION
Trying to collect thread dump of Apache Tomcat8.5 in windows server I ended using jstack
with psexec
as follows(as using jstack directly wasn't possible, so I'm using pexec to execute jstack using syetm process):
PsExec.exe -s "C:\Program Files\Java\jdk1.7.0_40\bin\jstack.exe" -l 5340 > dumps.txt
with 5340 is the PID of the running Tomcat8 process.
The execution started without any errors and it shows this output:
...
ANSWER
Answered 2019-Nov-14 at 10:56As a conclusion to the discussion. You need to use the same VM version for executing a jstack command as the VM version you are going to inspect. In case of any errors, you could try a -F
param to jstack.
Also, you don't need PsExec tools on newer VMs anymore.
QUESTION
I have a SwingWorker background thread that contains the following code to perform a request and parse the response:
...ANSWER
Answered 2019-Oct-22 at 17:57It does not block. Note that there is no doInBackground
method in the whole thread dump, and SwingWorker
thread pool is idle.
More likely, the code throws an uncaught exception or error - presumably, NoClassDefFoundError
. Some dependencies must be missing in the classpath when you launch the application as -jar
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jstack
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page