Floating Dead Threads and old collection

We run an application inside a "container" (for lack of a better word) that creates threads to try and connect outgoing connections. We have hundreds of these outgoing connections defined and most of them end up getting connected. A few (5-6?) however remain unconnected (there isn't a listener on the other side, the IP is pointing to a loopback address, etc.). This causes the container to create threads every few seconds (per connection) to try and connect these connections.
We finally turned on memdbg for -Xverbose and we see that all of our old garbage collections are because of "Floating Dead Threads." Below is a sample of the gc logging.
--- [snip] ---
[memory ][Wed Dec 24 06:49:01 2008][02747] Changing GC strategy to Generational Concurrent Mark & Sweep
[memdbg ][Wed Dec 24 06:53:21 2008][02747] Adding 1 final handles from dying thread 11888 'Socket Opener'.
[memdbg ][Wed Dec 24 06:53:23 2008][02747] Adding 1 final handles from dying thread 11893 'Socket Opener'.
[memdbg ][Wed Dec 24 06:53:23 2008][02747] Adding 1 final handles from dying thread 11899 'Socket Opener'.
[memdbg ][Wed Dec 24 06:53:23 2008][02747] GC reason: Other, cause: Floating Dead Threads
[memdbg ][Wed Dec 24 06:53:23 2008][02747] Stopping of javathreads took 5.722 ms
[memdbg ][Wed Dec 24 06:53:23 2008][02747] old collection 14 started
--- [snip] ---
I have a ticket opened with the vendor to see if there's a way to stop creating all these threads (I imagine the answer is going to be do not define connections that won't get connected). My question here is the following: Is there a way to make JRockit not perform an old collection for these final handles of the dying threads?
The current JVM parameters are:
DEBUGGCFLAGS="-Xverbosetimestamp -Xverbose:gc,memory,memdbg -Xverboselog=/home/core/CORE/ttDESCore/bin/gc_output.core2.txt -Xmanagement:ssl=false,authenticate=false"
GCFLAGS="-Xmx24g -Xns512m -XgcPrio:pausetime -XpauseTarget=400ms -XXcallProfiling -XlargePages -XXlargeObjectLimit:8k -XXnoSystemGC"
Thx for any help!
Edited by: user10720003 on Dec 26, 2008 4:54 AM

Finally a reply! :) Thanks for taking the time to respond. A few points:
1) Sun's JVM doesn't seem to have this problem (or at least it doesn't trigger an old collection like JRockit). Any ideas as to why?
2) The finalizers are actually not in our application code (it's vendor code). For whatever reason, any connections (these are TCP/IP connections) that we define as initiate=true, the vendor creates a thread for each connection every 5 seconds to try and make the connection. If it succeeds the thread lives to perform additional work (and hence no finalizer needed). If it does not connect, the thread dies and a finalizer is added.
3) There were two connections that we had that did not make a successful connection so I had operations disable those connections. As soon as we did that, the "Add 1 handle for dying thread..." message went away in the memdbg log. However, JRockit still insisted on performing an old GC every 1.5 minutes for 'Floating Dead Threads'. Any idea why the old GC would still happen for this reason? Is it because all the finalizers still haven't been cleaned up?
A question about the finalize() method and finalizers. I looked through our code and we create about 80 objects that have a finalize() method implemented. These objects never go out of scope (so in reality, I suppose the finalize method doesn't need to be there). Does leaving it defined still hurt the gc performance? Or do finalizers only causes problems (i.e. kick off old gcs) once they become garbage?
Thx,
Josh
Edited by: user10720003 on Dec 29, 2008 8:03 AM
Edited by: user10720003 on Dec 29, 2008 8:15 AM
Edited by: user10720003 on Dec 29, 2008 8:21 AM

Similar Messages

  • The Concept of Dead Thread

    1)What do u mean by a dead thread????
    2)Is it possible to restart a dead???
    I think we can never kill a thread....... i think the underlying OS plays a vital role in this aspect
    Please correct me if im wrong

    Hi This is Kranthi .Ca u be clear reg this concept of
    dead thread.One last time:
    A thread is considered dead if it has been started and since terminated. A thread terminates after its run() method completes either normally or abruptly. In the abrupt case the uncaughtExceptionHandler code has to be executed before the thread truly terminates.
    The Thread isAlive() method returns true if the thread has been started and has not yet temrinated. So it can't distinguish between a dead thread and a "new" one that hasn't been started yet.
    The Thread getState() method will return TERMINATED for a dead thread.

  • TS1474 I changed my computer (old one is dead!) and now when I want to sync the contents of my iPod onto my new computer, it tells me I can only sync with one computer (i.e. the one that died!) How do I get around this??

    I changed my computer (old Dell is dead!) and now when I want to sync the contents of my iPod onto my new computer (a Sony Vaio), it tells me I can only sync with one computer (i.e. the one that died!) How do I get around this??

    -Transfer iTunes purchases to the compuer by:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    - Transfer other music by using a third-party program like one of those discusssed here:
    Copy music
    - Connect the Ipd to the computer and make a backup by right clicking on the iPod under Devices in iTunes and select Back Up
    - Restore the iPod from that backup
    Note that the backup that iTunes makes does not contain synced media like apps and music.

  • SCJP Preparation And Collection ,Thread And Generics Preparation Guidence

    I m preparing the SCJP 5 , I need the sources for preparing collection , thread and generics in SCJP 5.0

    Sun_Pravin wrote:
    I m preparing the SCJP 5 , I need the sources for preparing collection , thread and generics in SCJP 5.0Buy a book.

  • I transferred my library to my new computer (old one completely dead!) and the music transferred but not my audio books.  They aren't appearing in my purchased history.  Can anyone help?

    I transferred my library to my new computer (old one dead!) and the music transferred to a new library ok, but not my audiobooks.  My purchased history doesn't show any purchasing in this format.  Can anyone help?

    Audiobooks are a one-time only download from the store, so you won't be able to redownload them via the Purchased link. Do you have a copy of them on your iPod or on your backup of your downloads/library ? If not, and if they are still in your country's store, then you can try contacting iTunes Support and see if they will grant you a re-download : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Float this thread to the top

    I started a thread some few months back and its an important reference for me and i forgot to float this to top that time. now when i need it i found it difficult to search(Since its old maybe there is a chance to forgot the name of the thread, unless specific words are used in it).
    1)What i have to do is search with some keywords remembered and finally pointed out that thread.
    2)Then, found out the last post of that thread and noted its date and time and again goto the main page and will have to jump over the pages 4 or 5 at once till i reached that date.....
    Ohhhh its painful.
    Any suggestions.
    Thanks,
    Mathan
    Solved!
    Go to Solution.

    Hi mathan,
    what about this function?
    Mike
    Attachments:
    floattotop.PNG ‏46 KB

  • Handling Threads and Memory

    I'm sorry if this is a cross post to my StringBuffer problem. I have run a test that instantiates the object in question and the memory gets collected so I don't think it's that. My question is on how memory pertaining to Threads is handled.
    In my application I have a Thread array that launches X number of Threads. Currently 5. When an object wants a job run, the static Thread pool looks at the current thread and sees if it is still working. If it is, we sleep until it is available. Then I give it another job to do, start it, and move to the next thread.
    Question 1 -
    In a Thread [] is it better to replace the Thread at position x as in
    threads[a] = new Thread();
    threads[a].start();
    or is it better to change some parameter in the thread and then call
    start() again?
    Question 2 -
    I am currently using the second method. In my Thread object I have a MessageObject which contains a StringBuffer, which is eating memory. These MessageObject's are increasing. Some are being collected but many are staying live in the system and causing a memory error. When I do the following....
    MyThread.MessageObject = new MessageObject()
    That should make the original object available for cleanup right?
    Should I call finalize on the MessageObject before replacing it?
    Thanks you for any insights.

    If you want to use thread pools, and you can use JDK 5.0 (formerly known as J2SDK 1.5, codename Tiger), try using the java.util.concurrent package instead of writing your own thread pool (it's really difficult to make a thread pool right).
    If you can't use JDK 5.0, you can try the original util.concurrent package ( http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html ) from Doug Lea. It's used in the JBoss Application Server, so it's tested and reliable.
    If you need to use an object pool, try using the Commons Pool Component from Jakarta Apache: http://jakarta.apache.org/commons/pool/

  • My main pc died. How do I get my complete library on the replacement pc.  Apple says I have authorized the limit of five. I only recall doing so on the dead pc and an IPAD.  My IPAD suggests that I am on the cloud but I don't recall setting that up.

    My old PC with my Itunes library died.  I have attempted to authorize it's replacement but the store tells me I have reached my limit of five.  I don't recall doing this so my guess is that and old dead Ipod as well as old dead PC's could be deauthorized ONLY and I would be good.  As I read the Itunes store options it appears I can only deauthorize all five.  I am afraid I will loose all my library; I'm not shure I have an up to date backup with Itunes I am reluctant to take that step.
    I can take the hard drive out of the dead computer and fix so that I can restore from an up to date library.  I have never done this before and am scared I might erase my best option.  I also have a major portion of my library on a NANO which replaced the dead IPOD which maybe can be used to restore the replacement PC.
    I don't recall setting up Icloud and vaguely recall backing up to itunes but can't confirm that my library is completely backed up.  Itunes tells me that my Ipad and a PC are authorized for Icloud but I don't recall setting that up.  I can assume that the PC that is Icloud authorized is the one that died.  If I have to deauthorize all, will I errase my library?  If not will I have to restore my nano and Ipad and the replacement PC? How can I confirm that my library is backed up/in the cloud?
    My Ipad shows cloud icons along whith what appears to be my library.
    Given this info, what is my best option to restore my complete former Itunes library to my PC. 
    Thank
    DRC16

    Many thanks lllaass,
    The Touch Copy third party software for PC's is the way to go it seems and although the demo is free, if you have over 100 songs then it costs £15 to buy the software which seems not a lot to pay for peace of mind. and restoring your iTunes library back to how it was.
    Cheers
    http://www.wideanglesoftware.com/touchcopy/index.php?gclid=CODH8dK46bsCFUbKtAod8 VcAQg

  • How do i get my apps and old info onto new phone

    I recently upgraded my phone, now I cant get my apps or anything off of my account onto the new phone? help please

    Lucky you, a dead iPhone and a dead computer!  If you were backing up your old computer to an external drive then you might be able to recover your backup file.  But if you don't have a backup of your old computer then you're outta luck, iTunes itself does not contain the backup file.
    If you have a backup of your old computer's hard drive, your iPhone's backup file would be located at:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Windows Vista or 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    You would then put the iPhone backup file into the same location on the new computer, then restore the iPhone and select this backup.

  • 11.5.10.2 & Sun T5220 & threads & Java garbage collection...

    We recently upgraded our prod and test servers (middle tier) to Sun T5220's each with 8 procs which have 8 cores per proc. Apache/Java sees that as having 64 CPUs and configures a garbage collection thread for each. Since we have around 10 test and dev instances for the HRMS the apps instances alone, (we also have several Financials instances on the same server), it was kicking off over 640 threads of garbage collection! Needless to say the contention was overloading the server causing major hassles. We have since updated each $CONTEXT_FILE ADJREOPTS and ADJRIOPTS settings to only kick off 2 threads per instance. This has helped, but we still have issues, especially when running adadmin or adpatch and if we give it more than 8 workers. Has anyone else seen this, and if so, have you had any other solution(s)?
    We are also seeing strange behavior with FNDSM. Unlike the production server, which has much less load in some respects, on the test sever, each apps instances instance of FNDSM is restarting several times a day for no apparent reason and leaving many defunct child processes. We do see a slight hangup in the tnsping to the FNDSM_<server> listener every so often, but never anything long enough that it should be an issue. We also have multiple NICs on the box, but again, that has never been an issue before.
    Anyone else out there using Suns T5220s? Anyone else having any issue(s) with Apache/Java and / or FNDSM?
    thanks,
    -mike

    It appears to be a known issue for the Niagara chips:
    Oracle Applications Installation and Upgrade Notes Release 12 (12.0.4) for Solaris Operating System (SPARC)
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=402312.1
    Java Performance on UltraSPARC T1/T2 (Niagara) processors
    There is a known issue with the Java Runtime Environment (JRE) version 5 on Sun's Niagara processor, a one-socket 8 core processor that can run 32 threads in parallel. As the JRE treats the Niagara system as a server class machine, the server appears to the JRE to be a 32-CPU machine and each Java Virtual Machine (JVM) spawns 32 garbage collector threads. Also, newer chips support a larger number of threads (for example, the Niagara 2 will appear as a 64-way server).

  • Can a dead thread be alive again !!

    can a dead thread be alive again ?
    i have added some threads in a thread group. and then called its activeCount() methods.
    it is giving results like this....
    the active count:10
    the active count:5
    the active count:2
    the active count: 1
    the active count: 2 // dead thread alive ?
    the active count: 0
    is it feasible theoretically ? i am getting that kind of output

    as most of the time, the API doc saves the day :
    activeCount
    public int activeCount()
    Returns an estimate of the number of active
    tive threads in this thread group. The result might
    not reflect concurrent activity,
    number of activetive threadswhat is the meaning of active here ? alive() ? there is a isalive() method already ......
    and might be
    affected by the presence of certain system threads......u mean system thread can leak into my threadgroup....well
    Due to the inherently imprecise nature of the
    the result, it is recommended that this method only
    be used for informational purposes.
    Returns:
    an estimate of the number of active threads
    threads in this thread group and in any other thread
    group that has this thread group as an ancestor.
    Since:
    JDK1.0

  • Old Collection replaced my new Collection becavse of a linked IMG #

    I created an edited photo collection.  A few weeks later I wanted to retrieve that collection so I covld bvrn it onto a cd.  I vsed an IMG # from the DMG file to call vp the edited collection.  I vse my sd cards over and over again, so sometimes several photos are displayed that have the same IMG #.  I chose the wrong photo (a photo from an old collection) as the photo I wanted in my new collection and Lightroom changed my whole new collection into the old one - now I can't get my new collection at all... vnless I go back to the DMG files and re-edit the whole collection again.  How do I get Lightroom to reverse that process?  

    A few weeks later I wanted to retrieve that collection so I covld bvrn it onto a cd.  I vsed an IMG # from the DMG file to call vp the edited collection.
    I'm not following you here, to call up a collection, normally you click on the Collection name on the left, in the "Collections Panel". There are other ways of calling up a collection, using the "badge" on a photo, or right-click on a photo and select "Go To Collection". None of these matches your description. Please state in much more detail how you called up the "edited collection"; please state exactly where you clicked you mouse and/or exactly what menu commands were used.
    What do you mean by an "edited collection"? Lightoom has Smart Collections, regular (static) Collections and Quick Collections.
    Lightroom changed my whole new collection into the old one
    Again, I can't imagine what you mean. Please give the exact sequence of steps here, exactly what did you click your mouse on, exactly what menu commands were used, etc.
    Please state your operating system and version of Lightroom.
    Last request: please use the letter u when the letter u is required, do not use the letter v to indicate the letter u. Thank you.

  • Help needed to understand Threads and GC

    I have a question about threads
    I have a class where my main method is written
    public class Main {
        public static void main(String[] args) {
            SomeObject someobject = new SomeObject();
            ThreadClass obj = new ThreadClass();
            obj.set(someobject);
            Thread t1 = new Thread(obj);
            t1.setName("MyThread");
            t1.start();
    }Another class
    public class SomeObject
        String name = "xyz";
        public void doSomething()
            System.out.println("Done");
    }And a runnable class
    public class ThreadClass implements Runnable
        SomeObject temp;
        public void set(SomeObject fsTemp)
            temp = fsTemp;
        public void run()
            while(true)
                System.out.println(temp.name);
                temp.doSomething();
                try{Thread.sleep(100);}catch(Exception e){}
    }Now when I run this application, once the thread is started "MyThread" the main thread would die, I want to know that if the main thread dies, will the objects created in the main method will be garbage collected??

    First of all think yourself: Did you try to run your application? What happened? ?What is the conclusion? Is the Thread object garbage collected?
    If you answered the questions above:
    Thread objects are kind of special. A reference to the Thread object still exists when the Thread still runs (the run method is executed). This is done because stopping a Thread during its execution is not at all secure. Whenever the run method ends (the Thread is done) the garbage collector will remove the Thread object and all the references needed in there.

  • Aggressive Heap and garbage collection in 1.4.2

    We are trying to monitor the memory usage and the garbage collection for one of our application servers. We are using JDK 1.4.2 b-19 on solaris 8. The machine has 4 900 Mhz CPUs and 8GB ram. The VM options are:
    -server -XX:+AggressiveHeap -Xms3512m -Xmx3512m -verbose:gc
    -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+PrintGCTimestamps.The first full GC kicks in when the old generation gets full which is understandable. After that however, the full gc kicks in much more frequently and even the gc pauses are fairly long. Below are some of the output from gc.
    For the first GC the old generation was almost full.
    PSYoungGen total 1379840K, used 1324288K
    PSOldGen total 2123648K, used 2103378K
    For the second GC, young generation is 25MB out of 1300MB and old generation is 1100MB out of 2100MB. Still the full gc kicked in and took 23 secs.
    PSYoungGen total 1356608K, used 25856K
    PSOldGen total 2123648K, used 1169626K
    I understand that the adaptive sizing is kicking in (by default) but it should make life better not worse. If the full GC could wait till the old generation gets full again, I will get lesser number of full gc pauses and few and far in between.
    Any idea as to what I can do?
    thanks
    vinay
    {Heap before GC invocations=108:
    Heap
    PSYoungGen      total 1379840K, used 1324288K [0x1a000000, 0x73e20000, 0x73e20000)
      eden space 228096K, 100% used [0x1a000000,0x27ec0000,0x27ec0000)
      from space 1151744K, 95% used [0x27ec0000,0x6ad40000,0x6e380000)
      to   space 92800K, 0% used [0x6e380000,0x6e380000,0x73e20000)
    PSOldGen        total 2123648K, used 2103378K [0x73e20000, 0xf5800000, 0xf5800000)
      object space 2123648K, 99% used [0x73e20000,0xf4434af8,0xf5800000)
    PSPermGen       total 31872K, used 31768K [0xf5800000, 0xf7720000, 0xf9800000)
      object space 31872K, 99% used [0xf5800000,0xf7706200,0xf7720000)
    2842.142: [Full GC 3427666K->1083494K(3503488K), 26.6495189 secs]
    Heap after GC invocations=108:
    Heap
    PSYoungGen      total 1379840K, used 0K [0x1a000000, 0x73e20000, 0x73e20000)
      eden space 1287040K, 0% used [0x1a000000,0x1a000000,0x688e0000)
      from space 92800K, 0% used [0x6e380000,0x6e380000,0x73e20000)
      to   space 92800K, 0% used [0x688e0000,0x688e0000,0x6e380000)
    PSOldGen        total 2123648K, used 1083494K [0x73e20000, 0xf5800000, 0xf5800000)
      object space 2123648K, 51% used [0x73e20000,0xb6039978,0xf5800000)
    PSPermGen       total 63744K, used 31768K [0xf5800000, 0xf9640000, 0xf9800000)
      object space 63744K, 49% used [0xf5800000,0xf7706200,0xf9640000)
    {Heap before GC invocations=114:
    Heap
    PSYoungGen      total 1356608K, used 25856K [0x1a000000, 0x73e20000, 0x73e20000)
      eden space 1240576K, 0% used [0x1a000000,0x1a000000,0x65b80000)
      from space 116032K, 22% used [0x6ccd0000,0x6e610000,0x73e20000)
      to   space 116032K, 0% used [0x65b80000,0x65b80000,0x6ccd0000)
    PSOldGen        total 2123648K, used 1169626K [0x73e20000, 0xf5800000, 0xf5800000)
      object space 2123648K, 55% used [0x73e20000,0xbb456858,0xf5800000)
    PSPermGen       total 65536K, used 31773K [0xf5800000, 0xf9800000, 0xf9800000)
      object space 65536K, 48% used [0xf5800000,0xf7707578,0xf9800000)
    3153.022: [Full GC 1195482K->1149586K(3482688K), 23.3155823 secs]
    Heap after GC invocations=114:
    Heap
    PSYoungGen      total 1359040K, used 0K [0x1a000000, 0x73e20000, 0x73e20000)
      eden space 1245440K, 0% used [0x1a000000,0x1a000000,0x66040000)
      from space 113600K, 0% used [0x6cf30000,0x6cf30000,0x73e20000)
      to   space 113600K, 0% used [0x66040000,0x66040000,0x6cf30000)
    PSOldGen        total 2123648K, used 1149586K [0x73e20000, 0xf5800000, 0xf5800000)
      object space 2123648K, 54% used [0x73e20000,0xba0c4830,0xf5800000)
    PSPermGen       total 65536K, used 31773K [0xf5800000, 0xf9800000, 0xf9800000)
      object space 65536K, 48% used [0xf5800000,0xf7707578,0xf9800000)
    }

    We also had similar issues...If you are using RMI it might cause Full GC. This is the snippet from http://java.sun.com/docs/hotspot/gc/
    <snip>
    Garbage can't be collected in these distributed applications without occasional local collection, so RMI forces periodic full collection. The frequency of these collections can be controlled with properties. For example,
    java -Dsun.rmi.dgc.client.gcInterval=3600000
    -Dsun.rmi.dgc.server.gcInterval=3600000
    </snip>
    By default this is 1 min. So try changing this and try it out.

  • Need help desperately. new computer, followed all advice in the previous threads and no flash player

    dear all...
    i just bought a new computer, just two days old...a sony vaio with windows 7 installed,McAfee installed and IE 32 bits and also firefox installed
    everything is working fine except i am unable to get adobe flashplayer to work neither on IE nor on firefox
    I downloaded flash, either once prompted or directly from adobe - manually, uninstalled everything, rebooted compu
    but every time after installation (or that is at least what the system says) the video still request me to install adobe flash player - i do not get it :-(
    I did check adds on, i did check other things mentioned in the threads and all seems to be fine
    I hope someone of you can help me...
    thanks

    Hi, Using IE, go to Tools, Manage addons and look under "Show"(very light text) for Shockwave Flash Object and make sure it is listed and Enabled.
    Then using FF, go to plugins and make sure Shockwave Flash is Enabled.
    If you computer is a 64bit Operating System, be sure to use the 32bit browser.
    Thanks,
    eidnolb

Maybe you are looking for

  • Order product out of catalog view

    Hi On default in b2b webshop, if the product is valid for the org. unit but invalid for the determined catalog, you still can order this product even it is not inlcuded in the product catalog. Therefore, we disable the parameter 'enable.nonCatalogPro

  • Flip video & Zen Video

    I have a flip video cam that i record some stuff on and I'm trying to put those videos on the ZEN. Every format I have tried doesn't work. Flip video captures in AVI. I'm not sure if its compressed or uncompressed, I'm a newb in this. I have tried th

  • Question about analytic function

    I have a table (t1) that contains text (source_ip) and a corresponding number column (attack_count). I'm trying to group source_ip, sum attack_count per unique source ip, and then provide a percentage for unique source_ip attack count to the total su

  • Email additional text

    Hi Experts, We managed to send a correspondence (via transaction FPCOPARA) via email and to the printer. Do you know if and how it is possible to send an email with a pre-defined text as an explanation to the PDF which is attached? We also would like

  • How does Oracle determine a table as key-preserved or not?

    I tried joining employees and departments in HR schema. Normally, departments is not key-preserved in the join operation. But I've arranged in the view so that each department has exactly one employee, so that dept_no may become the key for the join.