Thread in runnable state

I recently made my application from single threaded to multithreaded that sends emails after it gets details from DB about email address content etc.
I primarily did this to send more mails concurrently. But I didn't see any performance improvement. After I took the stack trace couple of times I see all the threads are runnable but are not running. I understand JVM handles the switching of states, but I was wondering if I can go any further diagnosing what the problem is. It's a 2 CPU SunOS machine and I am spawning 3 threads.
Stack Trace:
1" prio=10 tid=0x0062cee8 nid=0x11 runnable [0xd347f000..0xd347fb70]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
- locked <0xd8c77cb0> (a java.io.BufferedInputStream)
at com.informix.asf.IfxDataInputStream.readFully(IfxDataInputStream.java:149)
at com.informix.asf.IfxDataInputStream.readSmallInt(IfxDataInputStream.java:428)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2177)
at com.informix.jdbc.IfxSqli.sendStatementQuery(IfxSqli.java:1444)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1383)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1313)
at com.informix.jdbc.IfxResultSet.executeQuery(IfxResultSet.java:216)
at com.informix.jdbc.IfxStatement.executeQueryImpl(IfxStatement.java:839)
at com.informix.jdbc.IfxPreparedStatement.executeQuery(IfxPreparedStatement.java:246)
"0" prio=10 tid=0x0067ad18 nid=0x10 runnable [0xd357f000..0xd357faf0]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
- locked <0xd8caa908> (a java.io.BufferedInputStream)
at com.informix.asf.IfxDataInputStream.readFully(IfxDataInputStream.java:149)
at com.informix.asf.IfxDataInputStream.readSmallInt(IfxDataInputStream.java:428)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2177)
at com.informix.jdbc.IfxSqli.sendStatementQuery(IfxSqli.java:1444)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1383)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1313)
at com.informix.jdbc.IfxResultSet.executeQuery(IfxResultSet.java:216)
at com.informix.jdbc.IfxStatement.executeQueryImpl(IfxStatement.java:839)
at com.informix.jdbc.IfxPreparedStatement.executeQuery

java.io is a blocking protocol.
If you want to see improved performance you at least need to use java.nio.
Even so, just allocating more threads will not make your program run faster.
Unless your code can inherently use multiple-cpus, multiple threads will do you no good at all.
Threads are useful for four things :
1. Making people (or some other connected system) '*think*' you are doing multiple things at the same time, of course you are not doing so, the scheduler is just slicing up the cpu time and giving some to each thread. This is essentially "servicing a request within some acceptable amount of time", which is why you see a lot of thread usage on web servers.
2. If you have a piece of code that can usefully divide work between two or more CPUs then threads can help you, even so allocating more threads than you have CPUs will not help, in fact your program will probably slow down (unless the threads are not doing anything at all.)
3. The implementation of some algorithms can be easier to think about as a set of communicating processes, in which case you can use threads to achieve an implementation.
4. Simulation : if you are simulating the interaction of objects in a complex system it can be useful to use threads in the simulation, but it does not necessarily run any faster, you are just using threads to help model the system.
Most programs/programmers will be in category #1, as more multi-core / multi-cpu machine are deployed there will be pressure to move to category #2, but I think most people have a lot to learn about this subject.
When attempting to achieve higher performance by using a mult-cpu machine, you need to think about how you define performance.
It is better to measure "how much work" gets done in a fixed amount of time rather than measuring "how fast" your program is running, i.e. how much faster it executes a specific task.

Similar Messages

  • Thread vs Runnable

    Hi All,
    I know the basic difference between Thread and Runnable. If my class is extending some class but still we need to make it Thread, then we should use Runnable otherwise we can use any one.
    But specifically I want to know is extending Thread gives any added advantage rather then implementing Runnable.
    Please let me know the answer.
    Regards,
    Gourab

    Pls refer to follwing link....
    http://forum.java.sun.com/ann.jspa?annID=9
    Hope you get your answer.
    ~ANil

  • Difference bet Thread and Runnable Inteface

    what is the main difference bet Thread and Runnable interface. Where it is used Thread and Where it is used Runnable interface

    http://www.javaworld.com/javaworld/jw-04-1996/jw-04-threads.htmlThere are a lot of differences, see the article above for details.
    Generally, I would only extend Thread if I want to enhance/extend the functionality of how Threads work (like providing a Timer or a Clock, or something). If all I am doing is providing some work to be done in a separate thread, then I will create a class that implements Runnable and run it using new Thread(myRunnable).start(). Most of the time, I use Runnable, since rarely would I need to change how threads act.

  • [svn:osmf:] 17456: Restore unit test application to (manual) runnable state .

    Revision: 17456
    Revision: 17456
    Author:   [email protected]
    Date:     2010-08-23 16:51:56 -0700 (Mon, 23 Aug 2010)
    Log Message:
    Restore unit test application to (manual) runnable state.
    Modified Paths:
        osmf/trunk/framework/OSMFTest/OSMFTest.mxml

  • Threads: implement runnable or extend Thread.  Which is better?

    I want to know which way is better, as I want to do some work in threads.
    Thanks,
    Virum

    I want to know which way is better, as I want to do
    some work in threads.
    Thanks,
    VirumOne reason for implementing runnable can be that java doesnot allow multiple inheritance so by implementing runnable you can, at the same time, extend another class.
    Another reason though not recommended and not good programming practice is that although you cannot restart a dead thread, if you use runnables, you can submit the old runnable instance to a new thread, thus practically starting a thread more than once.

  • Jdbc driver creates new thread for each statement with a query timeout set

    I am profiling a web application that is using the Microsoft JDBC driver, version 1.1 to connect to a sql server 2005 database. Each java.sql.Statement that is created, within the application, gets a query timeout value set on it ( statement.setQueryTimeout(...) ).
    I have discovered that the JDBC driver creates a new thread to monitor each Statement and the query timeout value. When the application is under load these threads are getting created faster then they are being destroyed and I am concerned that this will cause a performance problem in production.
    One option I have is to remove the query timeout value and the monitor threads will not be created, another is to change JDBC drivers.
    I'm curious is there any way to control this behavior so that these threads are not created or are managed more efficiently.  Is there a workaround that anyone is aware of?   Is this considered a bug?
    I have found a similar bug here for the 2000 driver:
    http://support.microsoft.com/default.aspx/kb/894552
    Cheers

    Hi,
    Thank you for using the Microsoft SQL Server JDBC driver.  You are correct that a new thread is started to monitor the query timeout when a statement is executed.  This is a potential performance issue that we may look at addressing in the upcoming v1.2 release.  The current behavior is not configurable.  The only workaround with the v1.1 driver is to limit your use of query timeouts to only those statements which you reasonably might expect to actually time out.
    We do take customer feedback very seriously, so if anyone else is concerned about this particular issue, please chime in and we will be able to give it appropriate weight.
    --David Olix [MSFT]

  • How to put a running thread in waiting state using jdk1.5 and above

    Hi,
    i have thread class(MyThread.java) which will run Continuously and i written two methods to stop thread and resume thread. but it is not happening as i expected , even though stop thread method called the thread is running
    how to stop this thread .
    Belwo you can find the code :
    Mythread.java
    package com.appli.test.thread;
    public class MyThread implements Runnable
         public boolean bo = false;
         private Thread thread = null;
         private Object runLock = new Object();
         int count =0;
         public void begin()
              thread = new Thread(this);
              thread.start();
         public void run()
              while(bo == false)
                   System.out.println("while bo ="+bo);
                   try
                        System.out.println(" count = ** "+count);
                        count +=1;
                        Thread.sleep(1000);
                   }catch (Exception e) {
                        // TODO: handle exception
         public void stopThred()
                   synchronized(runLock){
                        try {
                             bo = true;
                             System.out.println("wait called ");
                             runLock.wait();
                        } catch (InterruptedException e) {
                             e.printStackTrace();
                        }catch(IllegalMonitorStateException ie){
                             ie.printStackTrace();
         public void resumeThread()
              synchronized(runLock){
                   try {
                   bo = false;
                        runLock.notify();
                        System.out.println("resume called");
                   }catch(IllegalMonitorStateException ie){
                        ie.printStackTrace();
    from this class i am calling MyThread class
    package com.appli.test.thread;
    public class CallThread {
         * @param args
         public static void main(String[] args) {
              System.out.println("in the call thread class **");
              MyThread thread = new MyThread();
              thread.begin();
    from this class i am calling stop thread method
    package com.appli.test.thread;
    public class CallOne {
         public static void main(String[] args) {
              System.out.println("in the call one class **");
              MyThread thread = new MyThread();
              thread.stopThred();               
    from this class i am calling resume
    package com.appli.test.thread;
    public class CallTwo {
         public static void main(String[] args) {
              System.out.println("in the call Two class **");
              MyThread thread = new MyThread();
              thread.resumeThread();
    what went worng in this code?
    please help me

    @Op. Your classes CallThread, CallOne and CallTwo aren't sharing an instance. CallThread starts a thread. CallOne creates a MyThread instance, and calls stopThread on that one. That is not the same instance as the thread created by CallThread. The same applies to CallTwo.
    Kaj

  • Different output for each running(Thread or Runnable)

    When i run a program which extends Thread or implement Runnable interface, i get different output each time i run from either of the program. Why this can happen? Why the output from the program which extends Thread different from the output which implementing Runnable? i really can't figure out..can someone explain it to me?? thank you!! Belows are the program im trying to run..
    <code>
    public class RunThreads
         public static void main (String [] args)
              SomeThread p1 = new SomeThread(1);
              p1.start();
              SomeThread p2 = new SomeThread(2);
              p2.start();
              SomeThread p3 = new SomeThread(3);
              p3.start();
    } //end class RunThreads
    public class SomeThread extends Thread
         int myID;
         SomeThread(int id)
              this.myID = id;
         public void run()
              int i;
              for(i=1;i<11;i++)
              System.out.println("Thread" + myID + ": " + i);
    } //end class SomeThread
    </code>
    <code>
    public class RunThreads2
         public static void main (String [] args)
              Thread p1 = new Thread(new SomeThread2(1));
              p1.start();
              Thread p2 = new Thread(new SomeThread2(2));
              p2.start();
              Thread p3 = new Thread(new SomeThread2(3));
              p3.start();
    } //end class RunThreads2
    public class SomeThread2 implements Runnable
         int myID;
         SomeThread2(int id)
              this.myID = id;
         public void run()
              int i;
              for(i=1;i<11;i++)
              System.out.println("Thread" + myID + ": " + i);
    } //end class SomeThread2
    </code>

    Umm, could you explain the differences in the output first?

  • Thread and Runnable

    Can anyone please tell me why this code is not executing
    FirstClass second=new FirstClass("i m 2nd class");
         second.run();
    in the below program.
    its show the output like:
    i m 3rd class
    i m 4rd class
    i m in threadi m 3rd class 0
    i m 1st class
    i m runnablei m 1st class 0
    i m in threadi m 4rd class 0
    i m runnablei m 1st class 1
    i m in threadi m 3rd class 0
    i m runnablei m 1st class 2
    i m in threadi m 4rd class 0
    i m runnablei m 1st class 3
    i m in threadi m 3rd class 0
    i m runnablei m 1st class 4
    i m in threadi m 4rd class 0
    i m runnablei m 1st class 5
    i m in threadi m 3rd class 0
    i m runnablei m 1st class 6
    i m in threadi m 4rd class 0
    but it didnot tell me about 2nd runnable class why ?
    public class MainClass {
    public static void main(String[] args) {
         SecondClass third=new SecondClass("i m 3rd class");
         third.start();
         SecondClass fourth=new SecondClass("i m 4rd class");
         fourth.start();
         FirstClass first=new FirstClass("i m 1st class");
         first.run();
         FirstClass second=new FirstClass("i m 2nd class");
         second.run();
    class FirstClass implements Runnable{
         private int count;
         private String sq;
         public FirstClass(String str) {
              count=0;
              sq=str;
              System.out.println(str);
    public void run() {
         while(true){
         System.out.println("i m runnable" + sq+ " " +count);     
         try {
         count++;
    Thread.sleep(500);
         } catch (InterruptedException e) {
    class SecondClass extends Thread {
         private int count;
         private String sq;
         public SecondClass(String str) {
              count=0;
              sq=str;
              System.out.println(str);
    public void run() {
    while(true){
         System.out.println("i m in thread" + sq+ " " +count);
         try {
         Thread.sleep(1000);
         } catch (InterruptedException e) {
    }

    The reason behind this is that, whenever you implement Runnable in a class and invoke the run() method, no other threads can start after that call. So when you invoke first.run(), the thread "i m 2nd class" doesn't start, i.e,
    SecondClass third=new SecondClass("i m 3rd class");
    third.start();
    SecondClass fourth=new SecondClass("i m 4rd class");
    fourth.start();
    FirstClass first=new FirstClass("i m 1st class");
    first.run();
    // this thread won't start and hence the result
    FirstClass second=new FirstClass("i m 2nd class");
    second.run();
    If you had called the run() at the beginning of the program, then neither of the threads would have started
    FirstClass first=new FirstClass("i m 1st class");
    first.run();
    // none of the threads would start
    SecondClass third=new SecondClass("i m 3rd class");
    third.start();
    SecondClass fourth=new SecondClass("i m 4rd class");
    fourth.start();
    FirstClass second=new FirstClass("i m 2nd class");
    second.run();
    and that's the reason for your output!

  • Connection issue while accessing a jersey restful webservice using aysynch callback method.

    Hi,
    I am having one consumer and producer application. Producer is a Jersey restful webservice deployed in a tomcat server. Consumer side I am using executor service to create one scheduler which will keep on polling and creates a new Thread where I am making a asynch callback req to the service(Producer). But the problem is after my asynch executor thread will die still I can see one connection in deployed server.
    I used yourkit profiler, I can see one thread in runnable state even when the asynch executor dies.
    I think bec of scheduler still there is a connection between client and service. I wanted to create multiple consumer to process multiple thread but because of thread leakage I am not able to proceed.
    Could you please help me on this?

    Err, close the connection?

  • Thread state; "runnable"; what is it mean ?

    Hi All,
    could somebody please explain:
    what does all the thread states exactly mean?
    a more specific question:
    there is a thread state called "runnable" ....what does this state exactly means?
    i mean does it mean this thread is "running" OR is it "about" to run.
    OR this thread state means: what it can do, not what it is doing.
    Please explain.
    thanks, sangita

    Wrong. A thread in a runnable state may not be running. It could be, but mearly by being in the
    Runnable state does not force it to be running. Calling thread.start() schedules the thread to run.
    Therefore runnable means it could be running or it could be ready to run. You are using "running" as "using CPU".
    I was using "running" in the sense of the Sun's tutorial in pointed to.
    From the tutorial:
    "After the start method has returned, the thread is "running". Yet, it's somewhat more complex than that. As the previous figure shows, a thread that has been started is actually in the Runnable state. Many computers have a single processor, thus making it impossible to run all "running" threads at the same time. The Java runtime system must implement a scheduling scheme that shares the processor between all "running" threads. (See Understanding Thread Priority for more information about scheduling.) So at any given time, a "running" thread actually may be waiting for its turn in the CPU. "

  • Java threads consume CPU in sleep state (??)

    Hi,
    I'm using the PRSTAT command on Solaris for the first time.
    I am investigating high CPU usage problem in my application. So to monitor the CPU usage I used the prstat and mpstat command. My machine is a 2-CPU box.
    The prstat -L -p <pid> command output is as follows:
    PID     UNAME  ... ....  STATE           CPU      PROCESS / LWPID
    2962   bea                   run           7.6%           java / 5
    2962   bea                   run           5.6%           java / 38
    2962   bea                   run           5.6%           java / 22
    2962   bea                   sleep         5.5%           java / 21
    2962   bea                   sleep         5.4%           java / 36
    2962   bea                   cpu2          5.2%           java / 23
    2962   bea                   sleep         5.1%           java / 29
    2962   bea                   run           5.1%           java / 37
    2962   bea                   sleep         4.9%           java / 34
    2962   bea                   run           4.9%           java / 15
    2962   bea                   run           1.1%           java / 12
    2962   bea                   sleep         1.0%          java / 33
    2962   bea                   run           0.6%           java / 14
    2962   bea                   run           0.0%           java / 17
    ..... This shows that of all the threads in my app only one thread(23) is currently on the CPU and is using 5.2% of CPU. But why are the threads in sleep and runnable state consuming CPU?
    Also the mpstat output shows high CPU usage:
    CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
      0   8   0  366  428   61   994   387  40   70     0 10941  95   4    0    1
      2   3   0  370  1003  563 1362  648   42   61    0  5374    92   2   0    6If my application is taking only ~57% according to sum of values from prstat, why is my mpstat showing 95% and 92% usage on EACH of my CPUs...??
    I'm unable to interpret the result.
    Any help would be really useful to me at this moment.
    .

    Hi,
    Your question should be posted in a unix forum instead of a java forum. The question, and the answer is not related to java.
    The reason that prstat shows processes in sleaping state is that it doesn't create a snaphost at one point in time. It does instead show an average over some time (don't know the period), so the process has been running and consumed cpu, or is generally running, but currently sleeping.
    Kaj

  • Setting Priority Of A Thread With An Internal Runnable

    Im creating a few thread using the technique of embedding the actual runnable within the Threads constructor like below:
    new Thread(new Runnable()
         public void run()
              long start_t1 = System.currentTimeMillis();
              bruteforce();
              long finished_t1 = System.currentTimeMillis();
              timetaken_t1 = (finished_t1 - start_t1);
                 t1_finished = true;
              if(finished())scoreBoard();
    ).start();the problem im having is that I want to assign priorities to these threads. The two usual techniques:
    Threadname.MIN_PRIORITY
    or
    Threadname.setPriority(5);
    Won't work because in this technique you cannot assign the thread a name like
    Thread t = new Thread(new Runnable() ....Should I not be able to use this.setPriority(5) or this.MIN_PRIORITY? They don't seem to be working for me, however maybe im placing them in the wrong place.
    Any help would be great, Im really stuck for time on this one!

    Above should work, or if you want you could just assign a variable to the thread.
    final Thread t = {...}And use t call the thread methods.

  • Thread states

    Hi
    Is there a program logic one can follow or some known logic that can use to make sure that a thread moves to dead/terminated status?
    I know there is a factor of non-determinism here, but anything that comes close to seeing a thread from Runnable to dead/terminated will do.
    Here's a snippet of my code below:
    public void run()
    System.out.println("Glory to God..");
    Notification(Thread.currentThread());
    public synchronized void Notification(Thread thread)
    try
    thread.sleep(1000); //sleep once second..
    LetThem(Thread.currentThread());
    catch(Exception e)
    System.out.println("The thread never woke up or ???...");
    e.printStackTrace();
    public void LetThem(Thread tread)
    setChanged();
    notifyObservers(tread);
    }

    thanx, actually that's the hold up. The thing is i need to report the last status of the thread in some way hence i was calling another method within run().
    much appreciated..

  • Problem with threads hanging

    We have a problem where our application stops responding after a few days of usage. Things will for fine for a day or two, and then pretty quickly threads will start getting hung up, usually in places where they are allocating memory
    We are running WebLogic 8.1 SP2 on Sun JDK 1.4.2_04 on Solaris 8 using the alternate threading model and the -server hotspot vm. We are running pretty much the same code that we had no problems with under WebLogic 6.1 SP4 and Sun JDK 1.3.1.
    A thread dump usually shows that some or all of our execute threads are in the state "waiting for monitor entry" even though they are not currently waiting on any java locks. Here is a sample thread from the thread dump (we have ~120 threads so I don't want to post the full dump).
    =============================================================================================
    "ExecuteThread: '8' for queue: 'itgCrmWarExecutionQueue'" daemon prio=5 tid=0x005941d0 nid=0x2c waiting for monitor entry [c807f000..c807fc28]
    at java.lang.String.substring(String.java:1446)
    at java.lang.String.substring(String.java:1411)
    at weblogic.servlet.internal.ServletRequestImpl.getRelativeUri(ServletRequestImpl.java:1872)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3492)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =============================================================================================
    String.java line 1446 for this jdk allocates a new String object, and all the other threads in this state also are creating new objects or arrays, etc.
    We've done a pstack on this process when it's in this state, and the threads that are in the "waiting for monitor entry" that look like they're allocating memory are all waiting on the same lwp_mutex_lock with some allocation method that's calling into the native TwoGenerationCollectorPolicy.mem_allocate_work (see pstack output below for the same thread as in the thread dump above)
    =============================================================================================
    ----------------- lwp# 44 / thread# 44 --------------------
    ff31f364 lwp_mutex_lock (e3d70)
    fee92384 __1cNObjectMonitorGenter26MpnGThread__v_ (5000, 525c, 5000, 50dc, 4800, 4af0) + 2d8
    fee324d4 __1cSObjectSynchronizerKfast_enter6FnGHandle_pnJBasicLock_pnGThread__v_ (c807f65c, c807f7d4, 5941d0, 0, 35d654, fee328ec) + 68
    fee32954 __1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_ (c807f7d4, ff170000, d4680000, 4491d4, fee1bc2c,
    0) + 78
    fee3167c __1cPVM_GC_OperationNdoit_prologue6M_i_ (c807f7bc, 4400, ff170000, 2d2b8, 4a6268, c807fa18) + 38
    fee2e0b0 __1cIVMThreadHexecute6FpnMVM_Operation__v_ (c807f7bc, 963a8, 0, 0, 1, 0) + 90
    fed2c2a4 __1cbCTwoGenerationCollectorPolicyRmem_allocate_work6MIii_pnIHeapWord__ (962c0, ff1c29ec, ff1c297c, ff131a26, 4800, 4998) + 160
    fed22940 __1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__ (ee009020, 5941d0, 15ca581, 3647f0, 4a6268, c807f8c8) + 180
    fed34928 __1cLOptoRuntimeFnew_C6FpnMklassOopDesc_pnKJavaThread__v_ (ee009018, 5941d0, 0, 0, 0, 0) + 28
    fa435a58 ???????? (ee009018, e86de, 15ca4de, 50dc, 5941d0, c807f9c8)
    fb36f9a4 ???????? (0, d412ccd8, ee046c28, ff170000, 0, 0)
    fad8b278 ???????? (ee046c28, d6000c90, ee046530, 8, db8e8450, c807f9e8)
    fad62abc ???????? (d412ccd8, ee046530, d6000c90, ee3bfa38, 8, c807fa18)
    fa4b3c38 ???????? (c807fb9c, 0, f2134700, fa415e50, 8, c807faa8)
    fa40010c ???????? (c807fc28, c807fe90, a, ee9e1e20, 4, c807fb40)
    fed5d48c __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (c807fe88, c807fcf0, c807fda8, 5941d0, 5941d0, c807fd00) + 27c
    fee4b784 __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ (ff170000, 594778, c807fd9c, c807fd98, c807fda8, 5941d0) + 164
    fee5e8dc __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (c807fe88, c807fe84, c807fe7c, c807fe74, c807fe6c, 5941d0) + 6c
    fee6fc74 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (5941d0, 5941d0, 838588, 594778, 306d10, fee69254) + 128
    fee6927c __1cKJavaThreadDrun6M_v_ (5941d0, 2c, 40, 0, 40, 0) + 284
    fee6575c _start   (5941d0, fa1a1600, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Also when it's having this problem, the "VM Thread" is always using a lot of processor time. We did a couple of pstacks today while it was having this problem, and this thread was stuck in the ONMethodSweeper.sweep for over 15 minutes when we finally killed the server.
    From the thread dump:
    "VM Thread" prio=5 tid=0x000e2d20 nid=0x2 runnable
    From the first pstack:
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed40c04 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (42a2f4, fa5fa46d, ffffffff, fc4ffcb8, 42a2f4, 42a324) + 124
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (42a2f0, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (fa5f7f88, fa608940, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Second pstack
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed41180 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (0, ff1b9664, ffffffff, fc4ffcb8, a6f2cc, fc4ffbd0) + 6a0
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (a6f2c8, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (faded4c8, fadf2c80, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Has anyone ever seen anything like this? I'm trying to figure out if this is caused by something we're doing, or something relating to our environment and jvm options. Any ideas?

    Thanks for the reply - I'm testing our app with the +UseConcMarkSweepGC now in our test environment to make sure it doesn't cause any problems there.  Unfortunately the only place we've had this problem is on the production server, so it's extra difficult debugging this. 
    We're using the following memory options:
    -ms512m -mx512m -XX:NewSize=128m -XX:PermSize=192m -XX:MaxNewSize=128m -XX:MaxPermSize=192m -XX:SurvivorRatio=8and the following debugging options, as we've also been seeing OutOfMemoryErrors ( see http://forum.java.sun.com/thread.jsp?forum=37&thread=522354&tstart=45&trange=15 )
    -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGCBTW, which c++filt version and options are you using? Our Solaris boxes only seem to have the GNU version installed. I was trying to run that on some of the other stack traces and wasn't getting anywhere, and didn't know if because it was GNU version wouldn't work on something compiled with the Sun compiler.
    Thanks!
    --Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Sync iTunes with Apple TV by keeping movies on Apple TV hard disk?

    I have a 144 Gb AppleTV that I sync with my iTunes, I was wondering if their was a way to keep all bought/rented movies and TV shows on Apple TV without having them on the computer hd too? I tried syncing my photos the other day and kept on copying t

  • Move data from one Application to another Application.

    Hi All, I have a requirement to move data from one Application to another Application(we are working on SAP BPC 5.1/7.1 MS version). Can anybody please mention all the possible ways to achieve it. Thanks in advance. Regards Vani

  • Copy iTunes library to another internal disk

    G5 PPC 2.0 Ghz Dual OS 10.4.11 The boot drive has OS 10.4.11. On the 2nd internal disk, I have a partition with OS 10.4.11. Is it possible to copy the library to this partition on the 2nd disk?

  • Handling Mulitple apllications with Developer Suite 10g

    Hi all, I've a doubt regarding the Post installation of Developer Suite 10g. For example, if i've a client who has two applications; and these two applications are similar to some extent. So, In this scenario, i am clue less regarding the set up. i.e

  • Help importing 25'000 pictures into phootshop elements 8

    I have 25'000 plus jpegs, neff files etc in one folder on hard drive . I want to import into eleements and using elements auto file into new location on hard drive in "date shot" folders. If i transfer a batch of files to SD or CF disc photoshop will