How to get complete Java thread dump?

I suspect a deadlock on a IWS 6.0SP5 running on Solaris 8 with Sun JDK 1.4.1, how can I make a full thread dump?
I have enabled LogStdout and LogStderr in magnus.conf.
regards
Lars Krog-Jensen

Thanx for your reply,
but there are 2 ns-httpd processes, which one do I
send the kill to.
If I send it to the wrong ns-httpd the server
restarts.
regards Lars Krog-JensenIt's the last one in the "PID chain" (the last child process) and the one using the most memory.

Similar Messages

  • How to terminate a java thread from c++ code?

    Hi,
    I made a screensaver which loads a jvm, forks a thread running a java class, wait until user's action(i.e. mouse move/click keyboard input), then terminate the java thread.
    However, I met a problem, How to terminate a running java thread from c++ code?
    Here is my code, but it does not work: (even after the terminate is called, jvm throws an error)
    JNIEnv* env;
    JavaVM* jvm;
    HANDLE hThread; //handle for the startThread
    unsigned __stdcall startThread(void *arg)
         jclass cls;
         jmethodID mainId;
         jint          res;
         int threadNum = (int)arg;
         res = jvm->AttachCurrentThread((void**)&env, NULL);
    cls = env->FindClass( MAIN_CLASS);
         mainId = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
         // setup the parameters to pass to main()
         jstring str;
         jobjectArray args;
         int i=0;
         args = env->NewObjectArray(1, env->FindClass("java/lang/String"), 0); //only one input parameters
         str = env->NewStringUTF("localhost");
         env->SetObjectArrayElement(args, 0, str);
         env->CallStaticVoidMethod(cls, mainId, args); // call main()      
         if (env->ExceptionOccurred()) {
                   env->ExceptionDescribe();
         return TRUE;
    Here is the main method:
    First create the jvm and load the thread. then tries to terminate the thread, but failed here
    switch (msg)
    { case WM_CREATE:
              JavaVMOption options[NUMBEROFOPTIONS];
              JavaVMInitArgs vmargs;     
              jint rc;
              vmargs.version = JNI_VERSION_1_4; /* version 1.4 */
              vmargs.options = options;
              vmargs.nOptions = NUMBEROFOPTIONS;
              vmargs.ignoreUnrecognized = JNI_FALSE;          
              rc=JNI_CreateJavaVM( &jvm, (void **)&env, &vmargs ); /* create JVM */
              /* We pass the thread number as the argument to the invoked thread */
              unsigned int threadId = -1;
              // to initialize a thread-safe C runtime library
              hThread = (HANDLE)_beginthreadex(NULL, 0, &startThread, NULL, 0, &threadId );
    } break;
    case (WM_DESTROY):
              CloseHandle( hThread );
              jvm->DestroyJavaVM(); /* kill JVM */
              Debug("Destroy Java Virtual Machine\n");
    }break;
    Note, after the thread "startThread" runs, it has an infinite loop and will not terminate, until the user clicks to terminate.(I didn't call jvm->DetachCurrentThread();_endthreadex(0); in the "startThread" because the java thread will not terminate by itself)
    Thus, the only way to terminate the thread is to call closehandle(hthread) in the main thread, which may cause jvm to throw an error.
    Do you know how to terminate a java thread safely???
    Thanks a lot

    Assuming that your java thread is in a loop of some kind. Such as
    int i=1; /* I tried using a boolean, I just could not get my C++ env, to change this value. So i decided to use an int */
    run {
    while(i)
    isdfjsdfj
    void seti()
    i=0
    So, B/4, i call destroyVM in my C++ code, i call this seti(). so the loop terminates, therefore my thread finishes executing and ends.
    Hope this helps
    tola.

  • How to get the java code of the message mapping

    how to get the java code of the message mapping,
    I mean to ask how to get the background java code of the message mapping(graphical mapping).
    And where to view it?

    Hi Satya,
    The JAVA code for graphical msg mapping is in below folder:
    \usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
    Here all the mapping jars are there in this folder.
    Just decompile these jars and you can see the code.
    Thanks,
    Rajeev Gupta
    Message was edited by:
            RAJEEV GUPTA

  • How  to get the java code of the standard functions

    How  to get the java code of the standard functions in xi
    Example , hoh get the java code for a node function - removeContext.

    hi
    Click on the Standard Function.
    Hold Ctrl+Shift
    right click on the standard function to view the context menu. You will see options to view the source code by exporting
    regards
    krishna

  • How to get complete path when uploading a file in Mozzila

    Hi
    I was trying to upload a file using html code
    <input type="file" name="cdrfile">
    then I wrote
    <% = request.getParameter("cdrfile")%>
    trying to get the path and the file name. But Mozilla doesn't return me the complete path only the file name. Does anyone know how to get the complete path in Mozilla?
    Cheers
    M

    Deliberate double post:
    http://forum.java.sun.com/thread.jspa?threadID=5147786&messageID=9551206#9551206

  • How to get / view Java Sound source code

    Hi All,
    I'm curious to view the Java Sound source code, is that possible? Let me know what I have done so far,
    1. In eclipse I have mapped the src.zip from the JDK directory, now I am able to view most of the source code.
    2. When I try to view AudioSystem.getProviders method it returns value from JDK13Services.getProviders
    But I dont have source code for JDK13Services class, indeed i don't have com.sun.media package source code, in the src.zip
    Do anyone know how to get com.sun.media package source code?
    Thanks in advance,
    Karthikeyan R

    It appears that the 3rd entry of this search
    [http://www.google.com/search?q=JDK13Services]
    give both the javadoc and source for JDK13Services, as follows:
    [http://www.docjar.org/docs/api/com/sun/media/sound/JDK13Services.html]
    The other search listings appear to contain useful information, also.

  • How to get Complete Collection on GarageBand IOS.

    I'm wondering how to get the complete instrument and sound collection for the new IOS 7 GarageBand.

    Hi Maaz,
    Indeed the history of data is not managed by Project Server as you would like. Unless you have small projects that allow you keeping data history with the 11 baselines, the solution would be to have a monthly job saving appropriate data into a custom data
    base using T-SQL.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |
    11 baselines are not enough to save monthly Progress in %Complete. monthly job saving couldn't be a reliable solution ....
    Maaz Ibrahim

  • How to get rid of shot dump error

    Hello everyone,
    I have BW 3.0B on my home P.C. After starting R/3 management console,when i am trying to logon into the system i am getting an error message saying short dump created.Can anyone tell me why i am getting this message and how to get rid of this problem.
    Thanks in advance

    hi ,
    by using tc ST22 u can see the all short dumps which occured .
    then u can click on today or yesterday denepding on when u got the dump or u may give date selection.
    then it will take u number of short dump list just choose the respective 1 and click on that
    there u can go to what happend menu or error analysis.
    hope this help u .
    Jimmy

  • Understanding Java Thread Dump

    Hi,
    I was looking at the following thread dump
    Full thread dump Java HotSpot(TM) Server VM (11.0-b16 mixed mode):
    "pool-3-thread-1428" prio=10 tid=0x72b83800 nid=0x60ef waiting on condition [0x73318000..0x73318fb0]
    java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for <0x98983260> (a java.util.concurrent.SynchronousQueue$TransferStack)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
    at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
    at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
    at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:619)
    "MergeTask" daemon prio=10 tid=0x09454c00 nid=0x60e7 waiting for monitor entry [0x65106000..0x65106f30]
    java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - waiting to lock <0x96d90bb8> (a org.apache.log4j.spi.RootLogger)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.log(Category.java:853)
    at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
    I can see that 0x98983260 and 0x96d90bb8 are memory addresses of condition object and lock object respectively (I hope ti. But I was puzzled with [0x73318000..0x73318fb0] and [0x65106000..0x65106f30].
    What do these memory ranges indicate? Is there any documentation related to thread dump?
    In OpenJDK source code I can see following comment. But I did not understand what it means.
    // print guess for valid stack memory region (assume 4K pages); helps lock debugging
    st->print_cr("[" INTPTR_FORMAT "]", (intptr_t)last_Java_sp() & ~right_n_bits(12));
    Thanks,
    Unmesh

    Thread Dump Analysis On AIX Platform:
    http://middlewaremagic.com/weblogic/?p=4348

  • How to get "Executable java file"?

    Hi,
    I wanted to get the .class file of my java programme for execution. i.e say "c:\java Abc ", I wanted to get "Abc" so that I can execute my file in my GUI like "java Abc".
    Here is what I am doing
    File file;
    String command = "java";
    Process p;
    String classname = file.getPath(),fileName = file.getName();
    p = Runtime.getRuntime().exec(command+" "+classname);
    When I use this, I get the .java file. I wanted to get the "EXECUTABLE FILE ONLY", can any one help me?
    Thanks

    Put these lines after fileName = file.getName();
    if (fileName.endsWith(".java"))
        // Remove the .java extension from the filename
        fileName = fileName.substring(0, fileName.length() - 5);
    }

  • How can get & use java true type fonts in my applets

    Hi
    I could get the System fonts in my Applet by making use of Toolkit.getFontList()
    I have used getGraphicsEnvironment to get fonts but my browser doesn't support it.I get ClassNotFoundException.
    How can I get & make use True Type Fonts in my Java Applet.
    any body knows reply immediate pls
    Siva

    similar problem:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=164516
    sorry, thats all i know.
    tobias

  • Calc of VAT in ext system: how to get complete data in BSET/RFUMSV00

    Hello
    We have a system that posts into SAP FI GL via BAPI BAPI_ACC_DOCUMENT_POST . The external system does not contain tax codes but it does calculate tax amounts and has GL account determination. How do I get the complete data in BSET so that I can use RFUMSV00 as the sole report on VAT for the client? Other formulation: how do I post an invoice from a vendor without using a tax code or should I use a dummy tax code VST without percentage number?
    regards
    Arjan

    Hi Deepa,
    I tend to develop a substitution (OBB)that adds a tax code to the interface posting so that in SAP I have for every VAT amount/document a tax code. Otherwise I cannot use RFUMSV00...

  • How to get value from Thread Run Method

    I want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that it seems that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get Inside the run method::: But I get only Inside */
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";

    I think this is what you're looking for. I hold up main(), waiting for the results to be concatenated to the String.
    public class sampsynch
        class SampleThread extends Thread
         String x = "Inside";
         public void run() {
             x+="the run method";
             synchronized(this) {
              notify();
        public static void main(String[] args) throws InterruptedException {
         SampleThread t = new sampsynch().new SampleThread();
         t.start();
         synchronized(t) {
             t.wait();
         System.out.println(t.x);
    }

  • How to use a Java Thread in a Java Stored Procedure?

    I am working with java stored Procedures but i have a problem when i use threads.While the thread is running all the processes are blocked because the thread is not detatched.I don't know if it is impossible to use Thread in a java stored procedure.i made many researches but didn't find information about this case of Thread.If someone knows what to do in this case it will be helpfull for me.Thanks

    The JAR is already load by using CREATE JAVA RESOURCE ... or "loadjava -resolve –force -user p/p@SID –genmissing -jarasresource MyJar.jar"
    If we can create a resource by SQL or loadjava, how can I use it in my java code?
    Edited by: 847873 on 28 mars 2011 06:05
    Edited by: 847873 on 28 mars 2011 06:07

  • Java Thread Dump and String encoding

    Hi
    My Application is server application, running on a linux box with JDK 1.4.2_04
    Recently, my application got hang, there are no processing. when i took stack trace. I found
    "Thread-6204" prio=1 tid=0x0x8e3a400 nid=0x2621 waiting for monitor entry [b40b1000..b40b186c]
    at java.nio.ByteBuffer.wrap(ByteBuffer.java:342)
    at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:179)
    at java.lang.StringCoding.decode(StringCoding.java:220)
    at java.lang.StringCoding.decode(StringCoding.java:226)
    at java.lang.String.<init>(String.java:380)
    Thread is wating for monitor entry in ByteBuffer.wrap.
    but the Bytebuffer.wrap is static method and it is not synchronized
    i want to know why is it waiting for a monitor when the method is not synchronized.
    Thanks in advance

    Hi,
    If you post this in the java forums , it is more likely that you will get a relevent answer.
    Btw , you can actually take a look at the thread which is holding the lock ... Looking at the code , wild guess would be that your code is blocked on waiting for the class to be loaded (Heap*Buffer class).
    Regards,
    Mridul

Maybe you are looking for

  • Latest itunes 10.5.3 download cannot access itunes store please help

    The latest version of itunes released will not access the itunes store I do not have the 64-bit Windows vista. Any suggestions on how to fix the problem or what version of itunes I can go back to to solve this issue?

  • Communication between Parent and child mxml files in Flex2

    Hi,      I want to know how to access the parent page properties in the child page? Scenario is parent mxml file (Within the Application tags) having a text component with a value like "ABC". Child mxml file (within a TitleWindow) having some text in

  • SOA 11.1.1.5 install got can't write cache file

    Hi, I installed 2 node cluster of SOA 11.1.1.5 on linux and during domain configuration I got errors i.e. **sys-package-mgr: can't write cache file for** Installation was done and all the servers start/stop fine am able to deploy the processes, am ab

  • Discover a VB Password

    We have an Excel 2010 file that has VB macros password protected.  The individual who wrote the code has left the company, have no idea where he is and now need to get into the VB code.  How can I unprotect the VB code?

  • Nano will not stop scrolling songs

    Nano is continually scrolling through all songs without allowing me to play any of them. It just starting doing this after using it without problems for over a year. It will not stop, but scans through all songs without letting me play them. When I t