Jstack: A 16-in conversion of the process ID seen in Process Explorer, and a 0x prefix to the threaddump to find the corresponding thread (RPM)

Source: Internet
Author: User

Original link: http://www.iteye.com/topic/1133941

Symptoms:

With the Eclipse win 64-bit version, both Indigo and Kepler have been recreated and have been tried and reproduced using Tomcat 6.0.39,jdk1.6.u45 and 1.7u45.

The repro step is simple, it is easier to start with debug mode, Debug starts Tomcat, (mine is WebApp) and then the Eclipse Zombie is found at random point on the page, and any requests from the browser are stuck and cannot be received for execution.

1, and then directly from the task Manager to kill eclipse corresponding JAVAW process (some may be the eclipse process, depending on the specified VM--eclipse.ini-VM specified), Tomcat back to normal, everything is fine.

2, waiting for a long time, really long, it is normal, but after a while, and so on. If it's okay and patient, will it be normal to wait a long time?

Troubleshooting steps:

1. Suspected eclipse or Tomcat memory issues, so jstat GC view found everything OK.

2. Viewing tomcat corresponding Java process Resource usage is normal from Task Manager.

3. View eclipse corresponding Java process from Task Manager, CPU takes 25% and lasts for a long time. Because I'm a 4-core, it's actually already full of CPU resources, which means that eclipse is in trouble.

4. Using the Process Explorer tool to view the threads in this Java process, it is found that 1 threads occupy almost the majority of the CPU resources (sometimes two threads) of the process, which is almost a dead loop.

5. Use Jstack to do threaddump for the Java process corresponding to eclipse, then make a 16-binary conversion of the process ID seen in the Process Explorer, and add the 0x prefix to the threaddump to find the corresponding thread. Through here, it is basically positioning to the source of the problem. For example, my tid:1372, the conversion to 16 binary is 55C, plus the 0x prefix is 0x55c.

HTML code
  1. "Worker-10" prio=6 tid=0x0000000008d30800 nid= 0x55crunnable [0x000000000d3cf000]
  2. Java.lang.Thread.State:RUNNABLE
  3. At Java.util.regex.pattern$charproperty.match (pattern.java:3345)
  4. At Java.util.regex.pattern$curly.match0 (pattern.java:3770)
  5. At Java.util.regex.pattern$curly.match (pattern.java:3744)
  6. At Java.util.regex.pattern$start.match (pattern.java:3055)
  7. At Java.util.regex.Matcher.search (matcher.java:1105)
  8. At Java.util.regex.Matcher.find (matcher.java:561)
  9. At Org.eclipse.ui.internal.console.consolepatternmatcher$matchjob.run (consolepatternmatcher.java:130)
  10. At Org.eclipse.core.internal.jobs.Worker.run (worker.java:53)
"Worker-10" prio=6 tid=0x0000000008d30800 nid=0x55c runnable [0x000000000d3cf000]   java.lang.Thread.State: Runnableat Java.util.regex.pattern$charproperty.match (pattern.java:3345) at Java.util.regex.pattern$curly.match0 ( pattern.java:3770) at Java.util.regex.pattern$curly.match (pattern.java:3744) at java.util.regex.pattern$ Start.match (pattern.java:3055) at Java.util.regex.Matcher.search (matcher.java:1105) at Java.util.regex.Matcher.find (matcher.java:561) at org.eclipse.ui.internal.console.consolepatternmatcher$ Matchjob.run (consolepatternmatcher.java:130) at Org.eclipse.core.internal.jobs.Worker.run (worker.java:53)

And through a number of re-

HTML code
    1. At Org.eclipse.ui.internal.console.consolepatternmatcher$matchjob.run (consolepatternmatcher.java:130)
At Org.eclipse.ui.internal.console.consolepatternmatcher$matchjob.run (consolepatternmatcher.java:130)

This can be seen from the name of the console. Eclipse officials also reported similar bugs, which were reported in 07 and 11, and were theoretically fixed early.

6, almost already positioned, and then from the console.

Observing the console, we found that our framework has all the requests and responses to the browser output, because a request will return about 200K of data, equivalent to the console in a direct output of the 200K log and is not wrapped, so I did not notice at the outset.

Looking back at my console configuration, the maximum number of characters is 80000≈78k, I am a log far beyond the default display of the console.

7, the next start to solve the problem

7.1) The console character limit is canceled, which is unlimited. This log many and the program to run in Eclipse for a long time unrealistic, but I was set up after the actual normal, no longer eclipse zombie situation. And then I got my hands dirty. The "Clear Console" operation on the Console window, Eclipse is dead.

7.2) because the actual log output to my development is not very meaningful, is the info level, a bit like access logs. So the corresponding log append level is set to warn, do not output this log, everything is back to normal.

Http://www.cnblogs.com/lnlvinso/p/3682681.html

Jstack: A 16-in conversion of the process ID seen in Process Explorer, and a 0x prefix to the threaddump to find the corresponding thread (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.