How to get a thread dump, in case of an IDE freeze

When you're working with the IDE and if it either freezes or becomes sluggish for no apparent reason, it's recommended to generate a thread dump, and report it to Studio feedback alias ([email protected]) with a description of what happened and attach the dump to it.
A thread dump is an invaluable source of information to IDE developers when investigating deadlocks and some performance issues. It is a textual dump of all active threads and monitors of Java apps running in a Virtual Machine.
The ways to generate a thread dump differ depending on the platform:
* Windows systems
Press Ctrl-Break in the command console you used to start the IDE.
You won't be able to see the console in case you started the IDE using the default desktop icon created by the IDE installer. To be able to generate the thread dump, you must launch the IDE using a console window (invoke Command Prompt, go to {studio-install-dir}/bin and type runide.exe), or configure the desktop shortcut properties to launch the runide.exe program instead of the default runidew.exe.
Note: You should increase the screen buffer size of the command prompt, so that it could retian the entire thread dump output. To do that, on the command prompt where IDE is running, open the properties dialog box by right clicking on the titlebar and selecting 'properties'. Then select the 'layout tab' and increase the 'screen buffer size' parameters to - width - 200, Height - 4000.
* Unix systems
Press Ctrl-\ in the terminal console you used to start the JSE.
Alternatively, you can also generate a thread dump by sending the QUIT signal to the Java VM running the JSE
kill -QUIT process_id
where process_id is the process number of the respective java process.
-------Here is a sample thread dump -------
Full thread dump Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode):
"Text-Layout" daemon prio=2 tid=0x0886ebd8 nid=0x4e4 in Object.wait() [9e8f000..9e8fd94]
at java.lang.Object.wait(Native Method)
- waiting on <0x11730910> (a org.netbeans.editor.view.spi.ViewLayoutQueue)
at java.lang.Object.wait(Object.java:429)
at org.netbeans.editor.view.spi.ViewLayoutQueue.waitForTask(ViewLayoutQueue.java:128)
- locked <0x11730910> (a org.netbeans.editor.view.spi.ViewLayoutQueue)
at org.netbeans.editor.view.spi.ViewLayoutQueue$LayoutThread.run(ViewLayoutQueue.java:182)
"Compilation" daemon prio=2 tid=0x0883d878 nid=0xb1c in Object.wait() [9c8f000..9c8fd94]
at java.lang.Object.wait(Native Method)
- waiting on <0x1143dde0> (a java.util.LinkedList)
at java.lang.Object.wait(Object.java:429)
at org.netbeans.core.compiler.CompilationEngineImpl$CompilerThread.nextJobAndTask(CompilationEngineImpl.java:162)
- locked <0x1143dde0> (a java.util.LinkedList)
at org.netbeans.core.compiler.CompilationEngineImpl$CompilerThread.run(CompilationEngineImpl.java:175)
"TimerQueue" daemon prio=5 tid=0x03575478 nid=0xb18 in Object.wait() [988f000..988fd94]
at java.lang.Object.wait(Native Method)
- waiting on <0x10d4af60> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(TimerQueue.java:231)
- locked <0x10d4af60> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:534)
"AWT-EventQueue-1" prio=7 tid=0x0344fae0 nid=0xb14 in Object.wait() [3caf000..3cafd94]
at java.lang.Object.wait(Native Method)
- waiting on <0x10d4afe8> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:429)
at java.awt.EventQueue.getNextEvent(EventQueue.java:339)
- locked <0x10d4afe8> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:162)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

You can get a thread dump (Windows only) whitout any preparation. Simply use the Stack Trace tool from this web site:
http://tmitevski.users.mcs2.netarray.com
It works on Windows services too.

Similar Messages

  • How to get a thread dump from Weblogic 9.1

    Hi All,
    Can someone please walk me through how to configure a WLS9.1 server to generate thread dumps. Ideally I'd like to do this via the admin console. I read about the MagicThreadDumpFile property, but can't see where/how to set it.
    Many Thanks
    Stuart

    I only know how to do this in WLS 8.1, but it will likely work in 9.1. On UNIX, you can send a kill -QUIT to the pid and it will dump threads to standard output for the server. You can also use weblogic.Admin THREAD_DUMP (http://e-docs.bea.com/wls/docs92/admin_ref/cli.html#wp1197887) or whatever is the equivalent in WLST now that weblogic.Admin is deprecated in 9.x. I'm guessing it is the threadDump() method documented at http://e-docs.bea.com/wls/docs92/config_scripting/reference.html#wp1104314.
    I know of no way to do this through the console, unfortunately.

  • How to get a Thread Dump from Windows Service?

    We're running WLS 8.1 as a Windows Service, but we can't seem to generate a Thread Dump when the server locks up (apparently).
    Can anybody recommend a wrapper that will do this?
    --Kurt                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    Please refer to the following URL for more information http://e-docs.bea.com/wls/docs81/adminguide/winservice.html
    To cause the WebLogic Server instance to print a thread dump to standard out, do either of the following:
    Use the weblogic.Admin THREAD_DUMP command. For more information, refer to "THREAD_DUMP" in the WebLogic Server Command Reference.
    Open a command prompt and enter the following command:
    WL_HOME\bin\beasvc -dump -svcname:service-name
    where WL_HOME is the directory in which you installed WebLogic Server and
    service-name is the Windows service that is running a server instance.
    For example:
    D:\bea\weblogic81\server\bin\beasvc -dump -svcname:mydomain_myserver
    Cheers
    Raj

  • How to get each thread in the threadpool

    Hi,everyone.I'm now learning java.util.concurrent package and I have two questions about the threadpool.
    1) How to get each thread in the threadpool;
    2) How to get each thread's data in the threadpool and dispaly them onto GUI;
    e.g :
    There are 5 threads in the threadpool(ThreadPoolExecutor) and I have 100 tasks(Runnable or Callable),every task scans a directory(every task scans a different directory),how can I display the "real-time" count of the files in the directory which the current 5 threads in the threadpool scan onto the ListView Items in the GUI?

    Willings wrote:
    Hi,everyone.I'm now learning java.util.concurrent package and I have two questions about the threadpool.
    1) How to get each thread in the threadpool;You don't
    2) How to get each thread's data in the threadpool and dispaly them onto GUI;
    e.g : You don't
    There are 5 threads in the threadpool(ThreadPoolExecutor) and I have 100 tasks(Runnable or Callable),every task scans a directory(every task scans a different directory),how can I display the "real-time" count of the files in the directory which the current 5 threads in the threadpool scan onto the ListView Items in the GUI?You should notify your "monitor" when you add something to the pool, and the Runnable/Callable should notify the same "monitor" when it starts to execute, and during its processing. Finally you notify the monitor when the execution has completed.
    Kaj

  • JNI - getting a thread dump

    Hi !
    I'm using JNI to create a JVM inside of my C daemon, and it's working OK except that the JVM is hanging sometimes (rarely), and I would like to get the thread dump, like when you send SIGQUIT to the java process. But it doesn't work with my program. Why?
    Thanks
    - Rustam -

    Do you have any signal handlers installed in your native code? If so, you may have to remove them - they can interfere with the JVM's use of signals, prior to Java 1.4.
    Java 1.4 introduces a "signal chaining" facility whereby you may use your own signal handlers in native code that will be chained after the JVM's own signal handlers are called. This version of JVM includes a library for determining whether a signal is intended for the JVM or for native code in the same process.

  • Getting a thread dump

    Is there a way from within a java program to get a thread dump of the jvm? I want to write some code that watched for a certain condition, then immediatly halts the jvm and dumps all the thread state.
    Thanks for your ideas...

    Thanks, but... those methods are useful for getting a status of the current thread, or of other threads in your thread group, but that is not I'm after.
    What I need is similar to the effect of sending a SIGQUIT signal to the JVM, causing it to stop and dump all the thread state. I want to trigger that from code running in the JVM.
    Basically I am trying to track down a bug in a complex server application, where on a dual processor box (only!), the current time zone gets reset to GMT at some point. It happens at some non-deterministic point in the application's lifetime. The app is multithreaded. I was going to just write a watchdog thread that continually monitored the timezone, then when the timezone changed the watchdog would dump all thread states. After doing this a few times I was hoping to see a pattern in where the various threads were executing. Needless to say, I have examined all the code, and nothing is setting the timezone explicitly.

  • How to get thread dump in case of out of memory error.

    Hi Team,
    In case of out of memory, heap dump can be generated using option '- XX:+HeapDumpOnOutOfMemoryError'. Is is possible to generate thread dump too using any option? Can it be done using option -XX:OnOutOfMemoryError="<cmd args>?
    Thanks in advance.
    Regards,
    Atul.

    Jay SenSharma wrote:
    Hi Mukul,
    Complete Steps can be Devided into 3-parts
    A). Configuring a Mail-Session
    B). Configuring WLDF Module
    C). Configuring Watch And Notification
    For detailed <A class=bodylinkwhite href="http://www.software-to-convert.com/divx-avi-conversion-software/divx-avi-to-h264-software.html"><FONT face=tahoma,verdana,sans-serif color=#000 size=1>steps</FONT></A> please refer to: <B><A class=jive-link-external href="http://jaysensharma.wordpress.com/2010/01/07/e-mail-notification-using-wldf/">http://jaysensharma.wordpress.com/2010/01/07/e-mail-notification-using-wldf/</A></B>
    <P>
    Thanks
    Jay SenSharma
    <B><A class=jive-link-external href="http://jaysensharma.wordpress.com">http://jaysensharma.wordpress.com</A> (WebLogic Wonders Are here)</B></P>
    It is just the solution for my problem, It's very useful.

  • How to get the thread a sequence plays on?

    Hi, this is sort of a continuation of an earlier question... I have a sequence that plays back with imperfect timing. I would like to 'get a hold' of the thread that it plays back on in order to check / change its priority, etc.
    But a Sequencer is an interface; and it is gotten from the MidiSystem, which is also an interface. I am stumped as how to go about accessing the Java Sound Sequencer thread which does in fact get created by my program when I get a Sequencer from the MidiSystem.
    An excellent suggestion was given to me to extend Sequencer, then use the Thread.getCurrentThread() on my "MySequencer" object. To get a Sequencer, you call MidiSystem.getSequencer() - I can't figure out how to get a "MySequencer" (object that extends Sequencer) rather than a Sequencer from the MidiSystem.
    So, to be clear, my question is - Is there a way to get a reference to the thread that a sequence plays back on?
    Forgive me if this is a boneheaded question... I should have taken more Java classes back when I was in school...
    Thanks

    You think the GUI should be sluggish and keyboard and mouse capture delayed so someone can hear Fur Elise with precise timing as they laggingly scroll through a JTable with their mouse while waiting a few seconds for button clicks to occur?YES! That's ABSOLUTELY what I am suggesting. In none of my previous posts have I said or even suggested that the MIDI file was to be playing in the background have I? This program is about real time music recording and playback. Live, that is.* In front of an audience*. If a midi burp were OK with me, I would not have been pursuing this, would I? Everything I have posted is in relation to the timing needs I have for this program. I don't care if the flippin' screen goes blank, if the MIDI timing is good.
    OK?
    Briefly: The program has two main ... uh.. use cases. First, the GUI is used to pre-program which clips are to played where. This is not done in real time, so I am indifferent to any consideration of timing. It is mainly for this that I use the JTable. But in the Second case, when the play button is hit, the sequence plays and the clips are triggered according to what was previously been entered int the JTable. This sequence plays a drum track which I play along with. The sequence also triggers the clips to be played (via MetaMessages) which have to be to be in time with everything else - or else the program is utterly useless. So I hope you can see that at this point, the GUI doesn't really matter that much, but the timing of the MIDI sequence is crucial.
    I agree with you that perfect midi timing might not be all that important for everyone. But here's a quote from the Java Sound tutorial:
    "The Java Sound API does not include sophisticated sound editors or graphical tools, but it provides capabilities upon which such programs can be built."
    Surely Sun would not expect application designers to go to the trouble of building such programs if the Java Sound API was designed to deliver flawed Midi timing at best? Am I mistaken in thinking that stable Midi timing is possible? From all that I have read over at the Java Sound Resources web site it seems that not everybody suffers from bad MIDI timing.
    -Scott

  • How to get the Thread in another running application??

    Hi,
    If I have a java application running (as daemon), how can I get the running thread context from another new started java application?
    What I'm trying to accomplish here is that, after I started a daemon thread ( a ServerSocket program ), I want to write another program to control the running thread ( query the status, stop it, or restart it ...).
    Any help will be highly appreciated! Thanks.

    A different java application runs in a different Processand they cannot share anything.
    Any lucky out there? Anyone tried something on this?

  • How to get a thread unarchived?

    This thread has been archived, even though it was not answered:
    http://discussions.apple.com/message.jspa?messageID=12450545
    I have a related problem, and would have commented, had it been possible.
    What do we do to request the un-archiving of a thread?

    James006.5 wrote:
    This thread has been archived, even though it was not answered:
    http://discussions.apple.com/message.jspa?messageID=12450545
    I have a related problem, and would have commented, had it been possible.
    What do we do to request the un-archiving of a thread?
    First that thread concerned software that is now 2 versions ago, so the OPs concern may have been addressed.
    Second, since your problem is "similar" but not the same, you really would have to post a new thread anyway. Doing otherwise might have been construed as "thread-jacking" even though you didn't mean to do it.

  • How to get my threads beyond 60 days?

    Hi,
    I need to access my threads beyond 60 days.
    Thanks!

    Hi,
    Currently there isn't a good way to do this. The last forum update limited the My Threads view to 60 days only.
    There have been some proposed workarounds, such as using the My Alerts view - but that only works if you've set alerts on all of your threads. People also have suggested using a search engine and targeting the search to social.technet.microsoft.com or social.msdn.microsoft.com.
    Personally I have had zero luck with either of these methods.
    I see you've already joined in on
    my thread in the suggestions forum, but you can also try using the Site Feedback link at the bottom of the page (TechNet branding only, this link doesn't appear if you're viewing this thread in the MSDN branding) to send in a request directly.
    I really hope Microsoft will change course on this one, but I'm not holding my breath.
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • TS1424 not sure how to get my downloads re-downloaded case # 335038589 Help!!

    i downloaded three album and they they skip and stop.

    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • How to get this script to auto detect if the server freezes and have it restart automatically

    taskkill /im arma2oaserver.exe
    timeout 4
    taskkill /F /im arma2oaserver.exe
    timeout 4
    :: fix the hive ini file..
    set dayzpath="D:\DayZ_Server_Panthera"
    cd /d %dayzpath%
    start "" "dayz_epoch_set_to_day.bat"
    timeout 4
    :: Rotate Logs..
    set dayzrotate="D:\DayZ_Server_Panthera\Logs_last_restart"
    cd /d %dayzrotate%
    start "" "Rotate_logs.bat"
    timeout 5
    :: start the server..
    set dayzpath="D:\DayZ_Server_Panthera"
    cd /d %dayzpath%
    start "" "Start_Panthera.bat"
    timeout 10
    :: start bec
    set becpath="D:\DayZ_Server_Panthera\BEC"
    cd /d %becpath%
    start "" "bec.exe" -f epoch_1.cfg
    timeout 10
    taskkill /im cmd.exe
    cls
    exit

    Hi there
    Normally all you need to do is specify the file name. No path or URL needed. Just the file name. After that, ensure the file exists in the same folder as the Captivate.
    Note, however, that if your server is a UNIX type, it could be persnickety about the case. So if your file is actually named MyFile.PDF and when you typed the file name into the field you used myfile.pdf, it likely won't find it.
    Further note that some file types will be some trouble. But before we go there, let's see if what has been offered so far helps anything.
    Cheers...
    Click here for Adobe Authorized Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Getting Thread Dump programitically ?

    Hi,
    Is there any way by which we can get the thread dump programatically?
    We are using Solaris OS and when we tried to get the thread dump using
    'kill -QUIT <pid of process>' the process(WebLogic) got crashed.
    So, please let me know how can we get the thread dump programatically.
    regards,
    Raghu

    There is a new static method for Thread called getAllStackTraces(). It is new for 1.5. See http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html#getAllStackTraces()You can start with that.

  • Getting thread dump of JWS application

    Hi,
    I know this was discussed a few times before, but I still have no solution for my problem.
    I have a JWS GUI application that deadlocks sometimes (Windows 98). So I want to get the thread dump to analyze the deadlock. In Java Web Start I changed the java command from javaw.exe to java.exe, so I get a dos box. When I press CTRL-BREAK inside the dos box, I get the thread dump but because the dos box just shows a few lines I only get the last lines of the dump. Under Windows 98 I cannot resize the dos box.
    Is there a way to redirect the output of the dos box to a file? Or is there another way to get the thread dump of a JWS application?
    Thanks in advance
    Markus

    Here is 50% of the solution. To generate a thread dump programatically, you need to call JVM_DumpAllStacks through JNI. You need to link in "jvm.lib".
    JNIEXPORT void JNICALL JVM_DumpAllStacks(JNIEnv *env, jclass unused);
    JNIEXPORT void JNICALL Java_Services_generateThreadDump(JNIEnv *env, jobject thisObject) {
         // Produce a thread dump to VM standard out
         JVM_DumpAllStacks( env, NULL );
    }Here is the java class that calls the JVM_DumpAllStacks method through JNI.
    public class Services {
          * Send a message to the VM, forcing it to create a thread dump. The resulting
          * thread dump will be sent to stdout. Note that this is the VM's stdout, not
          * necessarily System.out.
         public static native void generateThreadDump();
    }When you reach the point in your code that you want to generate a thread dump, close stdout and reopen it with the thread dump destination stream. Next, call the JNI method. This will send the thread dump to stdout.
         // Replace stdout with a file output stream
         System.out.close();
         System.setOut( new PrintStream( new FileOutputStream( "stdout.log" )));
         // Generate thread dump
         Services.generateThreadDump();Why is this only 50% of the solution ? Because this works beautifully for regular applications but it does NOT work for WebStart applications. Not sure what is happening here, but so far I have not managed to get any thread dump in a file from an application that has been fired up through WebStart. Note that I CAN get a thread dump in a file if I fire up the same code from the command line.

Maybe you are looking for