Easy to produce - Memory Leak in JVM Using thread

I was just debugging the problem with our server and got this error (not from the original code, I reproduced it with small code)
at java.lang.Thread.run(Unknown Source)
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Unknown Source)
at SomeObject.resursiveThreadGeneratorMethod(ThreadRecursionLeak.java:12
at ClientThread.run(ThreadRecursionLeak.java:27)
it is just a simple program generating thread recursively with a lock on an object
import java.lang.Runnable;
import java.lang.Thread;
//     <<Objec/Monitor Class>>
     class SomeObject{
          public synchronized void resursiveThreadGeneratorMethod(int threadNumber, int k){
               if(k<=0)
                    return;
               else{
                    System.out.println("Thread: "+threadNumber + "call number: "+k);
                    Thread thread=new Thread(new ClientThread(this));
                    thread.start();
                    resursiveThreadGeneratorMethod(threadNumber,k-1);
//     <<Thread Class>>
     class ClientThread implements Runnable{
          SomeObject someObject=null;
          public static int threadNumber;
          public ClientThread(SomeObject someObject){
               this.someObject=someObject;
               threadNumber++;
          public void run(){
               someObject.resursiveThreadGeneratorMethod(this.threadNumber,10);
//     <<Driver Class>>
     public class ThreadRecursionLeak{
          public static void main(String [] args){
               SomeObject someObject=new SomeObject();
               Thread thread=new Thread(new ClientThread(someObject));
               thread.start();
is there any way I can monitor JVM memory status (programatically), kill those threads leading to memory leak and send notification to the system admin.
We run JVM 1.4 on the server and need to address this issue as we do not have control over the code that can be submitted to the server, we just do some checks and then let it run on the servers.
Our main requirement is to keep JVM alive and kill all those code and report them.
Message was edited by:
rajanikant_malviya

You can monitor the JVM with the
[url=http://java.sun.com/j2se/1.4.2/docs/guide/jvmpi/i
ndex.html]JVMPI if you're using the Sun JVM.This is native code that basically gets
notified anytime the JVM does something
interesting.
However, you're going to have a very difficult time
catching code that does what the code you show does.
I'm not sure I understand your environment - you
allow people to submit code and you run it? Are you
running it in the same JVM as your server? That
seems like a huge issue. A simple System.exit()
code will take down your server.
Let us know some more details.
We are actually having a portal through witch users can submit their code, witch are basically utility codes for different operations teams.
we then provide a way to schedule them.
At the background, we are having 6 (Win) servers where at each server we are having 20 to 25 users on different ports (managed by our application) running there own JVMs. When a schedule is met we just invoke a servlet (on any free port) and pass code id (stored in DB). And this servlet is responsible for compilation and exicution of the code (We just use Runtime to fork this new process).
I don't know, but is there any way through witch I can monitor this process and restrict to generate threads recursively???

Similar Messages

  • I think I've got a memory leak and could use some advice

    We've got ourselves a sick server/application and I'd like to gather a little community advice if I may. I believe the evidence supports a memory leak in my application somewhere and would love to hear a second opinion and/or suggestions.
    The issue has been that used memory (as seen by FusionReactor) will climb up to about 90%+ and then the service will start to queue requests and eventually stop processing them all together. A service restart will bring everything back up again and it could run for 2 days or 2 hours before the issue repeats itself. Due to the inconsistant up time, I can't be sure that it's not some trouble bit of code that runs only occasionally or if it's something that's a core part of the application. My current plan is to review the heap graph on the "sick" server and look for sudden jumps in memory usage then review the IIS logs for requests at those times to try and establish a pattern. If anyone has some better suggestions though, I'm all ears! The following are some facts about this situation that may be usefull.
    The "sick" server:
    - CF 9.0.1.274733 Standard
    - FusionReactor 4.0.9
    - Win2k8 Web R2 (IIS7.5)
    - Dual Xeon 2.8GHz CPUs
    - 4GB RAM
    JVM Config (same on "sick" and "good" servers):
    - Initial and Max heap: 1536
    -server -Xss10m -Dsun.io.useCanonCaches=false -XX:PermSize=192m  -XX:MaxPermSize=256m -XX:+UseParNewGC -Xincgc -Xbatch -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.dotnet.disableautoconversion=true
    What I believe a "healthy" server graph should look like (from "good" server):
    And the "sick" server graph looks like this:

    @AmericanWebDesign, I would concur with BKBK (in his subsequent reply) that a more reasonable explanation for what you’re seeing (in the growth of heap) is something using and holding memory, which is not unusual for the shared variables scopes: session, application, and/or server. And the most common is sessions.
    If that’s enough to get you going, great. But I suspect most people need a little more info. If this matter were easy and straightforward, it could be solved in a tweet, but it’s not, so it can’t.
    Following are some more thoughts, addressing some of your concerns and hopefully pointing you in some new directions to find resolution. (I help people do it all the time, so the good news is that it can be done, and answers are out there for you.)
    Tracking Session Counts
    First, as for the observation we’re making about the potential impact of sessions, you may be inclined to say “but I don’t put that much in the session scope”. The real question to start with, though, is “how many sessions do you have”, especially when memory use is high like that (which may be different than how many you have right now). I’ve helped many people solve such problems when we found they had tens or hundreds of thousands of sessions.  How can you tell?
    a) Well, if you were on CF Enterprise, you could look at the Server Monitor. But since you’re not, you have a couple of choices.
    b) First, any CF shop could use a free tool called ServerStats, from Mark Lynch, which uses the undocumented servicefactory objects in CF to report a count of sessions, overall and per application, within an instance. Get it here: http://www.learnosity.com/techblog/index.cfm/2006/11/9/Hacking-CFMX--pulling-it-all-togeth er-serverStats . You just drop the files (within the zip) into a web-accessible directory and run the one CFM page to get the answer instantly.
    c) Since you mention using FusionReactor 4.0.9, here’s another option: those using FR 4 (or 4.5, a free update for you since you’re on FR 4) can use its available (but separately installed) FusionReactor Extensions for CF, a free plugin (for FR, at http://www.fusion-reactor.com/fr/plugins/frec.cfm). It causes FR to grab that session count (among many other really useful things about CF) to log it every 5 seconds, which can be amazingly helpful. And yes, FREC can grab that info whether one is on CF Standard or Enterprise.
    And let’s say you find you do have tens of thousands of sessions (or more). You may wonder, “how does that happen?“ The most common explanation is spiders and bots hitting your site (from legit or unexpected search engines and others). Some of these visit your site perhaps daily to gather up the content of all the pages of your site, crawling through every page. Each such page hit will create a new session. For more on why and how (and some mitigation), see:
    http://www.carehart.org/blog/client/index.cfm/2006/10/4/bots_and_spiders_and_poor_CF_perfo rmance
    About “high memory”
    All that said, I’d not necessarily conclude so readily that your “bad” memory graph is “bad”. It could just be “different”.
    Indeed, you say you plan to “look for sudden jumps in memory usage“, but if you look at your “bad” graph, it simply builds very slowly. I’d think this supports the notion that BKBK and I are asserting: that this is not some one request that “goes crazy” and uses lots of memory, but instead is the “death by a thousand cuts” as memory use builds slowly.  Even then, I’d not jump at a concern that “memory was high”.
    What really matters, when memory is “high” is whether you (or the JVM) can do a GC (garbage collection) to recover some (or perhaps much) of that “high, used memory”. Because it’s possible that while it “was” in use in the past (as the graph shows), it might no longer be “in use” at the moment . 
    Since you have FR, you can use its “System Metrics page” to do a GC, using the trash can in the top left corner of the top right-most memory graph. (Those with the CFSM can do a GC on its “Memory Usage Summary” page, and SeeFusion users can do it on its front page.)
    If you do a GC, and memory drops q lot, then you had memory that “had been” but no longer ”still was” in use, and so the high memory shown was not a problem. And the JVM can sometimes be lazy (because it’s busy) about getting to doing a GC, so this is not that unusual. (That said, I see you have added the Xincgc arg to your JVM. Do you realize that tells the JVM not to do incremental GCs? Do you really want that? I understand that people trade jvm args like baseball cards, trying to solve problems for each other, but I’d argue that’s not the place to start. In fact, rarely do I find myself that any new JVM args are needed to solve most problems.)
    (Speaking of which, why did you set the – xss value? And do you know if you were raising or lowering it form the default?)
    Are you really getting “outofmemory” errors?
    But certainly, if you do hit a problem where (as you say) you find requests hanging, etc., then you will want to get to the bottom of that. And if indeed you are getting “outofmemory” problems, you need to solve those. To confirm if that’s the case, you’ll really want to look at the CF logs (specifically the console or “out” logs). For more on finding those logs, as well as a general discussion of memory issues  (understanding/resolving them), see:
    http://www.carehart.org/blog/client/index.cfm/2010/11/3/when_memory_problems_arent_what_th ey_seem_part_1
    This is the first of a planned series of blog entries (which I’ve not yet finished) on memory issues which you may find additionally helpful.
    But I’ll note that you could have other explanations for “hanging requests” which may not necessarily be related to memory.
    Are you really getting “queued” requests?
    You also say that “the service will start to queue requests and eventually stop processing them all together”. I’m curious: do you really mean “queuing”, in the sense of watching something in CF that tells you that? You can find a count of queued requests, with tools like CFSTAT, jrun metrics, the CF Server Monitor, or again FREC. Are you seeing one of those? Or do you just mean that you find that requests no longer run?
    I address matters related to requests hanging and some ways to address them in another entries:
    http://www.carehart.org/blog/client/index.cfm/2010/10/15/Lies_damned_lies_and_CF_timeouts
    http://www.carehart.org/blog/client/index.cfm/2009/6/24/easier_thread_dumps
    Other server differences
    You presented us a discussion of two servers, but you’ve left us in the dark on potential differences between them. First, you showed the specs for the “sick” server, but not the “good” one. Should we assume perhaps you mean that they are identical, like you said the JVM.config is?
    Also, is there any difference in the pattern of traffic (and/or the sites themselves) on the two servers? If they differ, then that could be where the explanation lies. Perhaps the sites on one are more inclined to be visited often by search engine spiders and bots (if they sites are more popular or just have become well known to search engines). There are still other potential differences that could explain things, but these are all enough to hopefully get you started.
    I do hope that this is helpful. I know it’s a lot to take in. Again, if it was easier to understand and explain, there wouldn’t be so much confusion. I do realize that many don’t like to read long emails (let alone write them), which only exacerbates the problem. Since all I do each day is help people resolve such problems (as an independent consultant, more at carehart.org/consulting), I like to share this info when I can (and when I have time to elaborate like this), especially when I think it may help someone facing these (very common) challenges.
    Let us know if it helps or raises more questions. :-)
    /charlie

  • Memory leak in jvm? totalMemory differs real memory usage

    I working on a server application under linux with java 1.4.1_02.
    The problem is that the OS reports after approx. 2 days a memory usage of about 200 MB while the JVM's totalMemory method says, that only about 20 MB are allocated and more than 10 MB of these 20 MB are free. Calling System.gc() doesn't help.
    Is there a memory leak in the JVM itself ?
    Is there a bugfix or workaround for preventing out of memory ?

    hi, here is some of the messages from our tomcat log. Please let us know if you see something here.
    thanks
    wh
    14:04 Started Tomcat0.000: [GC 23352K->3056K(259264K), 0.0425550 secs]
    6.396: [GC 26416K->3837K(259264K), 0.0428260 secs]
    67.830: [GC 27197K->7675K(259264K), 0.0526750 secs]
    14:11 Started OpenSTA load test (Tomcat 103M/103M SIZE/RSIZE)417.805: [Full GC 23900K->10468K(259264K), 0.1470690 secs]
    464.368: [Full GC 29592K->12380K(259264K), 0.1984410 secs]
    474.295: [GC 35740K->16076K(259264K), 0.0362230 secs]
    482.470: [Full GC 32672K->16120K(259264K), 0.1574280 secs]
    497.299: [Full GC 32266K->15347K(259264K), 0.1993480 secs]
    513.132: [GC 38707K->15644K(259264K), 0.0067610 secs]
    513.552: [Full GC 21105K->15833K(259264K), 0.1484350 secs]
    524.393: [Full GC 31980K->15975K(259264K), 0.1507760 secs]
    535.314: [Full GC 36832K->16164K(259264K), 0.1561530 secs]
    544.704: [GC 39524K->16360K(259264K), 0.0035200 secs]
    544.724: [Full GC 17439K->15435K(259264K), 0.1654420 secs]
    550.837: [GC 38790K->15669K(259264K), 0.0031210 secs]
    550.961: [Full GC 20198K->15612K(259264K), 0.1458520 secs]
    561.816: [Full GC 36712K->15768K(259264K), 0.1535080 secs]
    567.997: [Full GC 38928K->15944K(259264K), 0.1586890 secs]
    572.313: [Full GC 29129K->15618K(259264K), 0.1764170 secs]
    581.769: [Full GC 36749K->15768K(259264K), 0.1538980 secs]
    588.514: [GC 39123K->16114K(259264K), 0.0042700 secs]
    588.573: [Full GC 20576K->15878K(259264K), 0.1476950 secs]
    592.833: [Full GC 34359K->16027K(259264K), 0.1563230 secs]
    594.394: [GC 39387K->16189K(259264K), 0.0030660 secs]
    596.453: [Full GC 30677K->15678K(259264K), 0.1698180 secs]
    603.878: [GC 39038K->15839K(259264K), 0.0043830 secs]
    610.088: [Full GC 32709K->15843K(259264K), 0.1554470 secs]
    613.281: [Full GC 25096K->15932K(259264K), 0.1500100 secs]
    618.982: [Full GC 35727K->16060K(259264K), 0.1558180 secs]
    625.228: [Full GC 39090K->15677K(259264K), 0.1778470 secs]
    638.611: [GC 39037K->15885K(259264K), 0.0034330 secs]
    639.430: [Full GC 22116K->15866K(259264K), 0.1508080 secs]
    646.904: [Full GC 26171K->16062K(259264K), 0.1532020 secs]
    652.457: [Full GC 25748K->16156K(259264K), 0.1512670 secs]
    658.609: [GC 39516K->16367K(259264K), 0.0032440 secs]
    660.209: [Full GC 21359K->15677K(259264K), 0.1657590 secs]
    664.911: [Full GC 34660K->15809K(259264K), 0.1562110 secs]
    670.953: [Full GC 33108K->15937K(259264K), 0.1571950 secs]
    673.849: [Full GC 29438K->16016K(259264K), 0.1531250 secs]
    680.074: [GC 39376K->16523K(259264K), 0.0060770 secs]
    680.279: [Full GC 26022K->15968K(259264K), 0.1805950 secs]
    686.274: [Full GC 39141K->16092K(259264K), 0.1616190 secs]
    688.844: [Full GC 36586K->16180K(259264K), 0.1567480 secs]
    693.700: [Full GC 35574K->16344K(259264K), 0.1574960 secs]
    700.598: [GC 39704K->16637K(259264K), 0.0035300 secs]
    700.624: [Full GC 18174K->15872K(259264K), 0.1651170 secs]
    703.509: [Full GC 34099K->16082K(259264K), 0.1573090 secs]
    707.642: [GC 39442K->16171K(259264K), 0.0025780 secs]
    709.815: [Full GC 28634K->16206K(259264K), 0.1534170 secs]
    716.272: [Full GC 36047K->16381K(259264K), 0.1587900 secs]
    723.495: [Full GC 39059K->16219K(259264K), 0.1683900 secs]
    728.392: [GC 39577K->16618K(259264K), 0.0040680 secs]
    728.415: [Full GC 18013K->16400K(259264K), 0.1536650 secs]
    731.039: [Full GC 34082K->16531K(259264K), 0.1571980 secs]
    737.472: [Full GC 32417K->16713K(259264K), 0.1577520 secs]
    742.717: [Full GC 37469K->16111K(259264K), 0.1606780 secs]
    744.274: [GC 39471K->16290K(259264K), 0.0033230 secs]
    744.613: [Full GC 21102K->16265K(259264K), 0.1536350 secs]
    748.395: [GC 39621K->16436K(259264K), 0.0031140 secs]
    748.677: [Full GC 25242K->16359K(259264K), 0.1576130 secs]
    750.854: [Full GC 31336K->16451K(259264K), 0.1585730 secs]
    756.051: [Full GC 36466K->16119K(259264K), 0.1612460 secs]
    759.115: [GC 39479K->16346K(259264K), 0.0028810 secs]
    760.093: [Full GC 21902K->16228K(259264K), 0.1520320 secs]
    763.760: [GC 39582K->16700K(259264K), 0.0059930 secs]
    764.034: [Full GC 22526K->16387K(259264K), 0.1544760 secs]
    768.679: [Full GC 32133K->16544K(259264K), 0.1591930 secs]
    771.644: [Full GC 31230K->16325K(259264K), 0.1612140 secs]
    776.770: [Full GC 38785K->16445K(259264K), 0.1620900 secs]
    780.396: [Full GC 37938K->16896K(259264K), 0.1673300 secs]
    782.776: [Full GC 30184K->17037K(259264K), 0.1590650 secs]
    786.573: [GC 40397K->17228K(259264K), 0.0034880 secs]
    786.731: [Full GC 19211K->16266K(259264K), 0.1549430 secs]
    789.000: [GC 39619K->16361K(259264K), 0.0026020 secs]
    789.269: [Full GC 19125K->16399K(259264K), 0.1513090 secs]
    792.386: [Full GC 36010K->16508K(259264K), 0.1637400 secs]
    795.102: [GC 39868K->16833K(259264K), 0.0040440 secs]
    795.207: [Full GC 21389K->16739K(259264K), 0.1533440 secs]
    799.324: [Full GC 23240K->16280K(259264K), 0.1577710 secs]
    802.196: [GC 39639K->16518K(259264K), 0.0033770 secs]
    802.399: [Full GC 22872K->16698K(259264K), 0.1572730 secs]
    807.161: [GC 40058K->16776K(259264K), 0.0027580 secs]
    809.900: [Full GC 36185K->16876K(259264K), 0.1607120 secs]
    811.791: [Full GC 30282K->16978K(259264K), 0.1593370 secs]
    813.563: [GC 40337K->17376K(259264K), 0.0064020 secs]
    813.804: [Full GC 29057K->16982K(259264K), 0.1816130 secs]
    815.297: [GC 40336K->17338K(259264K), 0.0039630 secs]
    815.310: [Full GC 17806K->17082K(259264K), 0.1522910 secs]
    819.516: [GC 40438K->17223K(259264K), 0.0028420 secs]
    821.285: [Full GC 26923K->17272K(259264K), 0.1588350 secs]
    823.559: [GC 40632K->17448K(259264K), 0.0031100 secs]
    824.265: [Full GC 21492K->17462K(259264K), 0.1550870 secs]
    825.397: [GC 40822K->17655K(259264K), 0.0031120 secs]
    825.486: [Full GC 18871K->16337K(259264K), 0.1562730 secs]
    829.469: [Full GC 38369K->16447K(259264K), 0.1650720 secs]
    831.816: [GC 39807K->16601K(259264K), 0.0026710 secs]
    831.827: [Full GC 17119K->16512K(259264K), 0.1522890 secs]
    835.329: [GC 39872K->17080K(259264K), 0.0053700 secs]
    835.465: [Full GC 23458K->16733K(259264K), 0.1581070 secs]
    837.668: [GC 40093K->16935K(259264K), 0.0031290 secs]
    838.251: [Full GC 20039K->16495K(259264K), 0.1564500 secs]
    841.767: [Full GC 25895K->16613K(259264K), 0.1577470 secs]
    844.476: [Full GC 35311K->16695K(259264K), 0.1628390 secs]
    848.103: [GC 40044K->17069K(259264K), 0.0032710 secs]
    848.628: [Full GC 22870K->16916K(259264K), 0.1580780 secs]
    854.887: [Full GC 31905K->16323K(259264K), 0.1653390 secs]
    857.228: [Full GC 36492K->16530K(259264K), 0.1634600 secs]
    858.956: [GC 39890K->16815K(259264K), 0.0036330 secs]
    862.023: [Full GC 21092K->16631K(259264K), 0.1564650 secs]
    863.249: [Full GC 26164K->16781K(259264K), 0.1562600 secs]
    865.711: [GC 40141K->17043K(259264K), 0.0031530 secs]
    865.729: [Full GC 18180K->16457K(259264K), 0.1577410 secs]
    869.627: [GC 39817K->16729K(259264K), 0.0033990 secs]
    870.098: [Full GC 24966K->16659K(259264K), 0.1562460 secs]
    872.350: [Full GC 31145K->16718K(259264K), 0.1604970 secs]
    876.105: [Full GC 39279K->16941K(259264K), 0.1668260 secs]
    880.207: [GC 40299K->17205K(259264K), 0.0034920 secs]
    880.251: [Full GC 20652K->16517K(259264K), 0.1571090 secs]
    883.114: [Full GC 37902K->16737K(259264K), 0.1646110 secs]
    884.628: [Full GC 24661K->16849K(259264K), 0.1560830 secs]
    888.022: [GC 40203K->17459K(259264K), 0.0051950 secs]
    889.142: [Full GC 22380K->17051K(259264K), 0.1583020 secs]
    891.554: [GC 40411K->17208K(259264K), 0.0027960 secs]
    891.582: [Full GC 18063K->16781K(259264K), 0.1585470 secs]
    892.405: [Full GC 29120K->17053K(259264K), 0.1622140 secs]
    894.017: [GC 40406K->17464K(259264K), 0.0045690 secs]
    895.447: [Full GC 31179K->17223K(259264K), 0.1628010 secs]
    897.067: [Full GC 38729K->17329K(259264K), 0.1647360 secs]
    900.396: [GC 40689K->17720K(259264K), 0.0044380 secs]
    900.441: [Full GC 20648K->16903K(259264K), 0.1598090 secs]
    902.678: [Full GC 35946K->17128K(259264K), 0.1663350 secs]
    905.853: [GC 40488K->17532K(259264K), 0.0064380 secs]
    905.891: [Full GC 19672K->17499K(259264K), 0.1621960 secs]
    907.750: [GC 40847K->17670K(259264K), 0.0030520 secs]
    908.460: [Full GC 20024K->17620K(259264K), 0.1565920 secs]
    910.624: [GC 40980K->17765K(259264K), 0.0030090 secs]
    910.671: [Full GC 18684K->16921K(259264K), 0.1605090 secs]
    912.509: [Full GC 29066K->17017K(259264K), 0.1614450 secs]
    913.757: [GC 40377K->17483K(259264K), 0.0047620 secs]
    914.763: [Full GC 25902K->17141K(259264K), 0.1608170 secs]
    917.689: [GC 40501K->17647K(259264K), 0.0049530 secs]
    918.806: [Full GC 28871K->17294K(259264K), 0.1601960 secs]
    921.558: [GC 40654K->17457K(259264K), 0.0029970 secs]
    922.333: [Full GC 30464K->16925K(259264K), 0.1662820 secs]
    923.373: [GC 40285K->17159K(259264K), 0.0042550 secs]
    923.555: [Full GC 24496K->17082K(259264K), 0.1599500 secs]
    927.044: [Full GC 37046K->17226K(259264K), 0.1683760 secs]
    929.061: [GC 40586K->17346K(259264K), 0.0026490 secs]
    929.162: [Full GC 21815K->17310K(259264K), 0.1590250 secs]
    931.978: [GC 40670K->17413K(259264K), 0.0024780 secs]
    932.513: [Full GC 23342K->16981K(259264K), 0.1626270 secs]
    935.043: [GC 40341K->17151K(259264K), 0.0028210 secs]
    935.520: [Full GC 29674K->17213K(259264K), 0.1660230 secs]
    937.492: [GC 40573K->17558K(259264K), 0.0039620 secs]
    937.670: [Full GC 23593K->17320K(259264K), 0.1597560 secs]
    938.607: [GC 40680K->17648K(259264K), 0.0045610 secs]
    939.678: [Full GC 33877K->17515K(259264K), 0.1648540 secs]
    942.806: [GC 40869K->18021K(259264K), 0.0051340 secs]
    944.254: [Full GC 35743K->17147K(259264K), 0.1719980 secs]
    945.155: [Full GC 36250K->17530K(259264K), 0.1705550 secs]
    946.222: [Full GC 34120K->17623K(259264K), 0.1649620 secs]
    949.645: [Full GC 30572K->17807K(259264K), 0.1649170 secs]
    952.442: [GC 41163K->17964K(259264K), 0.0030280 secs]
    952.566: [Full GC 20289K->16895K(259264K), 0.1610340 secs]
    954.853: [Full GC 28279K->17090K(259264K), 0.1638610 secs]
    957.884: [GC 40445K->17584K(259264K), 0.0047550 secs]
    958.667: [Full GC 32363K->17427K(259264K), 0.1661990 secs]
    959.881: [Full GC 33152K->17499K(259264K), 0.1664660 secs]
    964.265: [Full GC 37131K->17078K(259264K), 0.1695560 secs]
    967.544: [Full GC 39971K->17286K(259264K), 0.1698470 secs]
    972.467: [GC 40645K->17716K(259264K), 0.0058330 secs]
    972.573: [Full GC 19899K->17688K(259264K), 0.1596110 secs]
    973.323: [GC 41048K->18078K(259264K), 0.0039180 secs]
    973.767: [Full GC 30629K->18056K(259264K), 0.1642740 secs]
    975.978: [Full GC 32502K->16772K(259264K), 0.1692030 secs]
    977.636: [GC 40132K->17237K(259264K), 0.0055500 secs]
    978.935: [Full GC 25669K->16985K(259264K), 0.1628640 secs]
    980.311: [Full GC 36664K->17060K(259264K), 0.1661300 secs]
    984.254: [GC 40420K->17283K(259264K), 0.0035880 secs]
    984.947: [Full GC 28397K->17339K(259264K), 0.1645970 secs]
    988.111: [Full GC 30208K->16821K(259264K), 0.1669820 secs]
    991.456: [Full GC 24124K->16941K(259264K), 0.1607770 secs]
    994.575: [GC 40301K->17145K(259264K), 0.0035460 secs]
    995.050: [Full GC 26065K->17242K(259264K), 0.1658660 secs]
    996.625: [Full GC 37922K->17434K(259264K), 0.1697800 secs]
    999.246: [Full GC 31259K->17049K(259264K), 0.1676220 secs]
    1001.492: [GC 40408K->17779K(259264K), 0.0078300 secs]
    1001.859: [Full GC 34893K->17307K(259264K), 0.1669200 secs]
    1004.393: [GC 40666K->17525K(259264K), 0.0030640 secs]
    1004.425: [Full GC 20060K->17436K(259264K), 0.1593370 secs]
    1007.645: [GC 40794K->17669K(259264K), 0.0030540 secs]
    1008.124: [Full GC 30847K->17795K(259264K), 0.1688060 secs]
    1009.680: [Full GC 27073K->17588K(259264K), 0.1798900 secs]
    1011.538: [Full GC 30414K->17677K(259264K), 0.1661910 secs]
    1016.696: [GC 41037K->17878K(259264K), 0.0043140 secs]
    1017.675: [GC 41238K->18305K(259264K), 0.0076230 secs]
    1017.697: [Full GC 18965K->17980K(259264K), 0.1633270 secs]
    1018.701: [Full GC 40089K->18034K(259264K), 0.1699260 secs]
    1022.387: [Full GC 40085K->17215K(259264K), 0.1718460 secs]
    1024.329: [GC 40575K->17390K(259264K), 0.0033200 secs]
    1025.327: [Full GC 32127K->17405K(259264K), 0.1646980 secs]
    1027.948: [GC 40765K->18028K(259264K), 0.0072570 secs]
    1028.257: [Full GC 33726K->17576K(259264K), 0.1646440 secs]
    1029.759: [Full GC 35673K->17688K(259264K), 0.1722710 secs]
    1032.229: [Full GC 29552K->17224K(259264K), 0.1670930 secs]
    1036.764: [GC 40584K->17488K(259264K), 0.0044870 secs]
    1037.789: [Full GC 23532K->17375K(259264K), 0.1604060 secs]
    1040.193: [Full GC 40682K->17543K(259264K), 0.1722250 secs]
    1041.362: [GC 40902K->17948K(259264K), 0.0044240 secs]
    1042.386: [Full GC 29926K->17651K(259264K), 0.1651240 secs]
    1046.173: [GC 41011K->17786K(259264K), 0.0030940 secs]
    1046.186: [Full GC 18169K->17442K(259264K), 0.1657440 secs]
    1048.882: [GC 40802K->17670K(259264K), 0.0032420 secs]
    1049.728: [Full GC 26921K->17623K(259264K), 0.1666840 secs]
    1050.667: [Full GC 27281K->17714K(259264K), 0.1655080 secs]
    1053.205: [Full GC 39795K->17784K(259264K), 0.1699730 secs]
    1055.242: [Full GC 37892K->17524K(259264K), 0.1736060 secs]
    1058.278: [GC 40877K->17783K(259264K), 0.0032240 secs]
    1058.934: [Full GC 24636K->17670K(259264K), 0.1629560 secs]
    1061.572: [Full GC 32462K->17738K(259264K), 0.1658050 secs]
    1064.860: [GC 41090K->18049K(259264K), 0.0031520 secs]
    1064.873: [Full GC 18402K->17913K(259264K), 0.1598100 secs]
    1068.969: [GC 41272K->18129K(259264K), 0.0030650 secs]
    1069.415: [Full GC 25714K->17421K(259264K), 0.1689390 secs]
    1070.981: [Full GC 40072K->17529K(259264K), 0.1719780 secs]
    1072.694: [Full GC 40298K->17684K(259264K), 0.1755570 secs]
    1074.349: [Full GC 29692K->17760K(259264K), 0.1646700 secs]
    1079.137: [GC 41120K->18001K(259264K), 0.0032570 secs]
    1079.901: [Full GC 29267K->17912K(259264K), 0.1952200 secs]
    1081.705: [GC 41272K->18459K(259264K), 0.0059700 secs]
    1082.812: [Full GC 28652K->18115K(259264K), 0.1686030 secs]
    1084.535: [GC 41475K->18286K(259264K), 0.0029690 secs]
    1085.759: [Full GC 22825K->18304K(259264K), 0.1620300 secs]
    1088.874: [GC 41664K->18557K(259264K), 0.0032180 secs]
    1090.304: [Full GC 23507K->18428K(259264K), 0.1613190 secs]
    1092.560: [GC 41787K->18731K(259264K), 0.0037290 secs]
    1092.568: [Full GC 18918K->17280K(259264K), 0.1863890 secs]
    1094.698: [Full GC 40048K->17487K(259264K), 0.1717440 secs]
    1097.608: [GC 40847K->17639K(259264K), 0.0029460 secs]
    1097.770: [Full GC 21453K->17546K(259264K), 0.1593820 secs]
    1101.222: [Full GC 34584K->17699K(259264K), 0.1714350 secs]
    1103.842: [Full GC 29518K->17398K(259264K), 0.1673060 secs]
    1105.429: [Full GC 36543K->17480K(259264K), 0.1687430 secs]
    1107.633: [GC 40839K->17863K(259264K), 0.0037960 secs]
    1109.418: [Full GC 38489K->17844K(259264K), 0.1714760 secs]
    1110.644: [GC 41201K->18176K(259264K), 0.0037780 secs]
    1110.708: [Full GC 22032K->18031K(259264K), 0.1629450 secs]
    1112.769: [Full GC 33242K->17641K(259264K), 0.1746310 secs]
    1115.871: [GC 41001K->17913K(259264K), 0.0042400 secs]
    1115.936: [Full GC 18849K->17868K(259264K), 0.1649840 secs]
    1116.903: [GC 41228K->18158K(259264K), 0.0038590 secs]
    1117.142: [Full GC 23635K->18147K(259264K), 0.1661090 secs]
    1119.657: [Full GC 33873K->18237K(259264K), 0.1687550 secs]
    1122.138: [GC 41597K->18843K(259264K), 0.0057360 secs]
    1122.460: [Full GC 30191K->17352K(259264K), 0.1718040 secs]
    1124.176: [GC 40711K->17534K(259264K), 0.0032200 secs]
    1124.188: [Full GC 18088K->17408K(259264K), 0.1585710 secs]
    1126.471: [GC 40768K->17610K(259264K), 0.0030090 secs]
    1126.621: [Full GC 23207K->17585K(259264K), 0.1639700 secs]
    1130.601: [GC 40945K->18032K(259264K), 0.0057690 secs]
    1130.987: [Full GC 33251K->17715K(259264K), 0.1698070 secs]
    1132.400: [GC 41075K->18200K(259264K), 0.0048990 secs]
    1133.852: [Full GC 22412K->17396K(259264K), 0.1678410 secs]
    1134.988: [GC 40756K->17811K(259264K), 0.0047240 secs]
    1135.108: [Full GC 22610K->17538K(259264K), 0.1632820 secs]
    1138.140: [Full GC 35484K->17677K(259264K), 0.1697280 secs]
    1140.949: [GC 41037K->18028K(259264K), 0.0039610 secs]
    1142.579: [Full GC 26182K->17886K(259264K), 0.1663820 secs]
    1145.332: [Full GC 38186K->17413K(259264K), 0.1775910 secs]
    1147.998: [Full GC 31086K->17542K(259264K), 0.1694310 secs]
    1150.183: [GC 40902K->17680K(259264K), 0.0028430 secs]
    1151.988: [Full GC 23320K->17714K(259264K), 0.1662670 secs]
    1153.556: [GC 41074K->18019K(259264K), 0.0033240 secs]
    1153.694: [Full GC 22297K->17819K(259264K), 0.1636210 secs]
    1156.910: [Full GC 32491K->17555K(259264K), 0.1708090 secs]
    1159.295: [GC 40915K->17925K(259264K), 0.0041940 secs]
    1159.584: [Full GC 27356K->17749K(259264K), 0.1684860 secs]
    1162.179: [Full GC 40840K->17842K(259264K), 0.1709320 secs]
    1165.462: [Full GC 40836K->17998K(259264K), 0.1745900 secs]
    1169.213: [Full GC 38228K->17387K(259264K), 0.1773150 secs]
    1173.839: [Full GC 38730K->17553K(259264K), 0.1721990 secs]
    1176.118: [Full GC 28517K->17724K(259264K), 0.1694920 secs]
    1178.427: [GC 41084K->18236K(259264K), 0.0056840 secs]
    1178.476: [Full GC 21916K->17907K(259264K), 0.1636330 secs]
    1180.035: [Full GC 28804K->17629K(259264K), 0.1706580 secs]
    1183.111: [GC 40989K->17821K(259264K), 0.0039230 secs]
    1183.470: [Full GC 27647K->17770K(259264K), 0.1642930 secs]
    1186.098: [Full GC 34782K->18020K(259264K), 0.1711540 secs]
    1189.374: [GC 41380K->18148K(259264K), 0.0030680 secs]
    1189.773: [Full GC 19108K->18108K(259264K), 0.1620400 secs]
    1193.545: [GC 41468K->18264K(259264K), 0.0030810 secs]
    1195.049: [Full GC 33109K->17520K(259264K), 0.1722670 secs]
    1197.419: [Full GC 34615K->17775K(259264K), 0.1743520 secs]
    1198.468: [Full GC 27126K->17819K(259264K), 0.1658660 secs]
    1201.775: [GC 41179K->18064K(259264K), 0.0032670 secs]
    1202.434: [Full GC 34303K->18285K(259264K), 0.1741190 secs]
    1204.504: [GC 41645K->18591K(259264K), 0.0040820 secs]
    1205.473: [Full GC 28617K->17816K(259264K), 0.1725460 secs]
    1206.615: [Full GC 23644K->17914K(259264K), 0.1654130 secs]
    1208.603: [GC 41274K->18294K(259264K), 0.0047020 secs]
    1208.659: [Full GC 21617K->18046K(259264K), 0.1671710 secs]
    1210.184: [Full GC 38308K->18107K(259264K), 0.1723240 secs]
    1212.135: [Full GC 26647K->17955K(259264K), 0.1731150 secs]
    1216.077: [GC 41314K->18170K(259264K), 0.0041080 secs]
    1216.475: [Full GC 28069K->18058K(259264K), 0.1722190 secs]
    1218.160: [GC 41418K->18256K(259264K), 0.0029660 secs]
    1218.196: [Full GC 19422K->18244K(259264K), 0.1601460 secs]
    1220.002: [Full GC 26298K->18354K(259264K), 0.1672780 secs]
    1222.871: [Full GC 41007K->17486K(259264K), 0.1767970 secs]
    1224.257: [Full GC 38459K->17581K(259264K), 0.1708260 secs]
    1228.508: [Full GC 31027K->17678K(259264K), 0.1934270 secs]
    1230.842: [GC 41038K->17846K(259264K), 0.0027980 secs]
    1231.091: [Full GC 23773K->17876K(259264K), 0.1648090 secs]
    1233.377: [GC 41235K->18030K(259264K), 0.0043450 secs]
    1234.627: [Full GC 27018K->17623K(259264K), 0.1681140 secs]
    1238.083: [GC 40983K->18145K(259264K), 0.0053580 secs]
    1238.236: [Full GC 26915K->17828K(259264K), 0.1658790 secs]
    1240.558: [Full GC 32151K->17956K(259264K), 0.1687010 secs]
    1243.685: [GC 41310K->18474K(259264K), 0.0058920 secs]
    1246.029: [Full GC 41795K->18533K(259264K), 0.1784250 secs]
    1249.400: [GC 41893K->18739K(259264K), 0.0035550 secs]
    1249.741: [Full GC 22503K->17989K(259264K), 0.1702740 secs]
    1252.402: [GC 41347K->18176K(259264K), 0.0039630 secs]
    1252.516: [Full GC 20445K->18258K(259264K), 0.1678890 secs]
    1254.473: [Full GC 37435K->18439K(259264K), 0.1891770 secs]
    1257.912: [GC 41797K->18658K(259264K), 0.0034350 secs]
    1258.627: [Full GC 28099K->18792K(259264K), 0.1701140 secs]
    1259.558: [GC 42151K->19185K(259264K), 0.0040460 secs]
    1259.685: [Full GC 24326K->17830K(259264K), 0.1797960 secs]
    1261.675: [Full GC 35858K->17895K(259264K), 0.1747070 secs]
    1265.409: [GC 41253K->18235K(259264K), 0.0045390 secs]
    1265.480: [Full GC 21386K->18167K(259264K), 0.1647190 secs]
    1266.987: [GC 41527K->18518K(259264K), 0.0042120 secs]
    1267.097: [Full GC 23121K->18225K(259264K), 0.1638840 secs]
    1269.256: [GC 41579K->18556K(259264K), 0.0034600 secs]
    1269.907: [Full GC 25021K->17589K(259264K), 0.1682260 secs]
    1272.214: [Full GC 29448K->17641K(259264K), 0.1673120 secs]
    1274.376: [Full GC 32613K->17885K(259264K), 0.1710000 secs]
    1278.034: [GC 41245K->18309K(259264K), 0.0044890 secs]
    1278.139: [Full GC 20559K->18359K(259264K), 0.1699630 secs]
    1281.824: [GC 41719K->18836K(259264K), 0.0042590 secs]
    1281.869: [Full GC 22173K->17938K(259264K), 0.1710780 secs]
    1282.883: [Full GC 38905K->18085K(259264K), 0.1729570 secs]
    1285.470: [Full GC 29364K->18221K(259264K), 0.1712110 secs]
    1287.186: [GC 41579K->18392K(259264K), 0.0037710 secs]
    1287.648: [Full GC 34833K->18379K(259264K), 0.1722590 secs]
    1293.044: [Full GC 36896K->17895K(259264K), 0.1790080 secs]
    1295.344: [Full GC 39122K->17997K(259264K), 0.1739800 secs]
    1298.695: [GC 41356K->18180K(259264K), 0.0035400 secs]
    1299.139: [Full GC 27101K->18151K(259264K), 0.1662500 secs]
    1301.236: [Full GC 29897K->18243K(259264K), 0.1670530 secs]
    1304.222: [GC 41599K->18690K(259264K), 0.0051650 secs]
    1304.631: [Full GC 26785K->17570K(259264K), 0.1685990 secs]
    1307.040: [Full GC 35984K->17736K(259264K), 0.1714940 secs]
    1308.610: [Full GC 33194K->17867K(259264K), 0.1732130 secs]
    1310.245: [GC 41227K->18348K(259264K), 0.0046460 secs]
    1310.270: [Full GC 20079K->17997K(259264K), 0.1622390 secs]
    1316.119: [Full GC 31797K->17701K(259264K), 0.1767490 secs]
    1317.765: [GC 41061K->17911K(259264K), 0.0034320 secs]
    1318.459: [Full GC 36597K->18147K(259264K), 0.1772120 secs]
    1319.623: [Full GC 32165K->18210K(259264K), 0.1702940 secs]
    1323.339: [GC 41570K->18394K(259264K), 0.0035930 secs]
    1323.362: [Full GC 20003K->18302K(259264K), 0.1621850 secs]
    1328.455: [GC 41662K->18528K(259264K), 0.0031090 secs]
    1329.080: [Full GC 26141K->17601K(259264K), 0.1714570 secs]
    1330.502: [GC 40960K->18190K(259264K), 0.0055370 secs]
    1331.248: [Full GC 33207K->17743K(259264K), 0.1716600 secs]
    1332.504: [Full GC 33325K->17919K(259264K), 0.1707440 secs]
    1334.322: [Full GC 25962K->17964K(259264K), 0.1647600 secs]
    1339.043: [GC 41324K->18445K(259264K), 0.0053560 secs]
    1339.431: [Full GC 30802K->18036K(259264K), 0.1760700 secs]
    1340.706: [GC 41396K->18435K(259264K), 0.0049790 secs]
    1340.788: [Full GC 19653K->18362K(259264K), 0.1679480 secs]
    1341.402: [Full GC 37930K->18541K(259264K), 0.1789520 secs]
    1343.397: [Full GC 38599K->18598K(259264K), 0.1745700 secs]
    1345.654: [Full GC 38131K->17863K(259264K), 0.1768640 secs]
    1349.079: [Full GC 40810K->18034K(259264K), 0.1751080 secs]
    1351.329: [GC 41394K->18181K(259264K), 0.0031310 secs]
    1351.630: [Full GC 22737K->18131K(259264K), 0.1667750 secs]
    1353.752: [GC 41491K->18415K(259264K), 0.0039180 secs]
    1353.771: [Full GC 19663K->18329K(259264K), 0.1658580 secs]
    1356.021: [Full GC 33020K->17962K(259264K), 0.1772410 secs]
    1362.446: [GC 41322K->18319K(259264K), 0.0041650 secs]
    1362.707: [Full GC 28140K->18280K(259264K), 0.1717800 secs]
    1364.104: [GC 41640K->18440K(259264K), 0.0035700 secs]
    1364.219: [Full GC 19931K->18444K(259264K), 0.1673940 secs]
    1367.044: [Full GC 41175K->18638K(259264K), 0.1774620 secs]
    1369.008: [GC 41998K->18904K(259264K), 0.0033770 secs]
    1370.808: [Full GC 39500K->17736K(259264K), 0.1779480 secs]
    1372.395: [Full GC 38579K->17798K(259264K), 0.1732010 secs]
    1374.965: [GC 41158K->17977K(259264K), 0.0032530 secs]
    1375.530: [Full GC 32640K->18465K(259264K), 0.1768610 secs]
    1376.498: [Full GC 37663K->18530K(259264K), 0.1755930 secs]
    1379.187: [Full GC 34360K->17772K(259264K), 0.1767890 secs]
    1381.635: [GC 41132K->17916K(259264K), 0.0030470 secs]
    1382.740: [Full GC 33087K->17979K(259264K), 0.1725710 secs]
    1384.342: [Full GC 40704K->18127K(259264K), 0.1782130 secs]
    1386.079: [Full GC 37351K->18238K(259264K), 0.1749410 secs]
    1388.360: [Full GC 37386K->17696K(259264K), 0.1768570 secs]
    1390.025: [Full GC 29469K->17756K(259264K), 0.1694570 secs]
    1393.734: [GC 41112K->18057K(259264K), 0.0038490 secs]
    1394.247: [Full GC 26711K->17971K(259264K), 0.1697510 secs]
    1395.559: [GC 41331K->18421K(259264K), 0.0046160 secs]
    1395.724: [Full GC 22935K->18369K(259264K), 0.1683440 secs]
    1399.015: [GC 41729K->18557K(259264K), 0.0031830 secs]
    1400.459: [Full GC 24074K->17934K(259264K), 0.1763530 secs]
    1403.708: [GC 41285K->18399K(259264K), 0.0047150 secs]
    1403.906: [Full GC 26160K->18149K(259264K), 0.1707510 secs]
    1406.124: [GC 41509K->18387K(259264K), 0.0035380 secs]
    1406.848: [Full GC 29898K->18662K(259264K), 0.1756120 secs]
    1407.882: [Full GC 36353K->18762K(259264K), 0.1732850 secs]
    1409.476: [Full GC 31392K->18111K(259264K), 0.1766410 secs]
    1413.341: [GC 41471K->18259K(259264K), 0.0029240 secs]
    1414.016: [Full GC 23700K->18347K(259264K), 0.1689310 secs]
    1416.973: [GC 41707K->18621K(259264K), 0.0032220 secs]
    1417.033: [Full GC 21370K->18493K(259264K), 0.1729750 secs]
    1418.844: [Full GC 41535K->18652K(259264K), 0.1788500 secs]
    1421.566: [Full GC 37085K->17599K(259264K), 0.1771590 secs]
    1426.447: [Full GC 39674K->17772K(259264K), 0.1779320 secs]
    1427.655: [Full GC 34052K->17910K(259264K), 0.1752830 secs]
    1428.736: [Full GC 31329K->18038K(259264K), 0.1709880 secs]
    1431.035: [GC 41398K->18234K(259264K), 0.0033650 secs]
    1431.545: [Full GC 32607K->17774K(259264K), 0.1744760 secs]
    1435.344: [Full GC 35392K->17901K(259264K), 0.1731200 secs]
    1440.290: [Full GC 39635K->18103K(259264K), 0.1759120 secs]
    1443.216: [GC 41463K->18459K(259264K), 0.0039860 secs]
    1443.627: [Full GC 28455K->18606K(259264K), 0.1717400 secs]
    1446.677: [Full GC 31845K->17807K(259264K), 0.1757170 secs]
    1448.217: [Full GC 36029K->17929K(259264K), 0.1723040 secs]
    1451.897: [Full GC 40425K->18068K(259264K), 0.1773810 secs]
    1453.303: [GC 41428K->18399K(259264K), 0.0043310 secs]
    1454.383: [GC 41747K->18891K(259264K), 0.0066130 secs]
    1454.603: [Full GC 26649K->18470K(259264K), 0.1726960 secs]
    1455.862: [GC 41830K->19071K(259264K), 0.0057860 secs]
    1455.919: [Full GC 23860K->18080K(259264K), 0.1716680 secs]
    1459.396: [GC 41440K->18551K(259264K), 0.0048670 secs]
    1459.560: [Full GC 21678K->18433K(259264K), 0.1685140 secs]
    1460.305: [Full GC 28004K->18540K(259264K), 0.1708560 secs]
    1463.360: [GC 41898K->19157K(259264K), 0.0053660 secs]
    1463.385: [Full GC 19875K->18963K(259264K), 0.1695990 secs]
    1465.299: [GC 42322K->19230K(259264K), 0.0037680 secs]
    1466.243: [Full GC 30800K->18146K(259264K), 0.2014600 secs]
    1468.739: [GC 41506K->18435K(259264K), 0.0042590 secs]
    1469.240: [Full GC 23481K->18360K(259264K), 0.1682010 secs]
    1470.849: [Full GC 37140K->18509K(259264K), 0.1753980 secs]
    1473.283: [Full GC 28643K->18566K(259264K), 0.1716950 secs]
    1475.513: [GC 41926K->18655K(259264K), 0.0024490 secs]
    1476.303: [Full GC 28013K->17893K(259264K), 0.1730760 secs]
    1479.100: [GC 41253K->18106K(259264K), 0.0032820 secs]
    1479.114: [Full GC 19042K->18011K(259264K), 0.1668360 secs]
    1480.705: [GC 41371K->18216K(259264K), 0.0033410 secs]
    1480.820: [Full GC 21912K->18126K(259264K), 0.1680140 secs]
    1483.212: [GC 41483K->18657K(259264K), 0.0068210 secs]
    1483.612: [Full GC 32191K->18531K(259264K), 0.1748200 secs]
    1484.237: [Full GC 27101K->17945K(259264K), 0.1720220 secs]
    1487.355: [GC 41304K->18052K(259264K), 0.0028180 secs]
    1487.453: [Full GC 18350K->18034K(259264K), 0.1671100 secs]
    1491.399: [Full GC 30457K->18216K(259264K), 0.1750190 secs]
    1493.152: [GC 41576K->18373K(259264K), 0.0030600 secs]
    1495.040: [Full GC 35834K->18553K(259264K), 0.1844910 secs]
    1496.486: [Full GC 40056K->18404K(259264K), 0.1839830 secs]
    1497.604: [Full GC 40636K->18576K(259264K), 0.1802690 secs]
    1499.708: [Full GC 32806K->18699K(259264K), 0.1755440 secs]
    1502.358: [GC 42056K->19017K(259264K), 0.0035950 secs]
    1503.448: [Full GC 39416K->19186K(259264K), 0.1810510 secs]
    1504.321: [GC 42546K->19502K(259264K), 0.0041760 secs]
    1504.523: [Full GC 26135K->18075K(259264K), 0.1737100 secs]
    1506.421: [Full GC 34630K->18190K(259264K), 0.1749040 secs]
    1509.521: [Full GC 34218K->18280K(259264K), 0.1738500 secs]
    1512.404: [Full GC 40123K->18419K(259264K), 0.1785160 secs]
    1514.910: [GC 41779K->18978K(259264K), 0.0046400 secs]
    1515.057: [Full GC 21217K->18346K(259264K), 0.1729520 secs]
    1516.312: [Full GC 32009K->18445K(259264K), 0.1742600 secs]
    1519.535: [GC 41800K->18681K(259264K), 0.0033170 secs]
    1521.938: [Full GC 39950K->18817K(259264K), 0.1806540 secs]
    1522.918: [Full GC 39996K->18896K(259264K), 0.1770260 secs]
    1525.240: [Full GC 27208K->18087K(259264K), 0.1766390 secs]
    1527.746: [GC 41446K->18283K(259264K), 0.0030650 secs]
    1529.193: [Full GC 31590K->18230K(259264K), 0.1739110 secs]
    1531.467: [GC 41590K->18408K(259264K), 0.0031390 secs]
    1531.621: [Full GC 20536K->18343K(259264K), 0.1684640 secs]
    1534.052: [Full GC 39614K->18673K(259264K), 0.1790600 secs]
    1536.308: [Full GC 41947K->18277K(259264K), 0.1831870 secs]
    1540.110: [GC 41634K->18676K(259264K), 0.0037740 secs]
    1540.655: [Full GC 22982K->18554K(259264K), 0.1718110 secs]
    1543.403: [Full GC 40455K->18762K(259264K), 0.1808010 secs]
    1544.456: [GC 42122K->19049K(259264K), 0.0056720 secs]
    1544.623: [Full GC 24100K->19040K(259264K), 0.1734450 secs]
    1547.598: [GC 42399K->19313K(259264K), 0.0031750 secs]
    1547.782: [Full GC 21803K->17896K(259264K), 0.1733430 secs]
    1550.856: [Full GC 38776K->18049K(259264K), 0.1790000 secs]
    1554.027: [Full GC 39925K->18209K(259264K), 0.1794380 secs]
    1554.868: [Full GC 36385K->18297K(259264K), 0.1765220 secs]
    1557.076: [GC 41657K->18481K(259264K), 0.0033910 secs]
    1557.170: [Full GC 23085K->17844K(259264K), 0.1733090 secs]
    1558.265: [Full GC 21638K->17878K(259264K), 0.1694620 secs]
    1563.060: [GC 41237K->18097K(259264K), 0.0033500 secs]
    1564.856: [Full GC 32663K->18154K(259264K), 0.1754150 secs]
    1566.025: [GC 41510K->18340K(259264K), 0.0031060 secs]
    1566.042: [Full GC 19331K->18242K(259264K), 0.1685920 secs]
    1568.406: [GC 41602K->18499K(259264K), 0.0034100 secs]
    1568.794: [Full GC 29429K->18048K(259264K), 0.1775530 secs]
    1571.351: [Full GC 41276K->18129K(259264K), 0.1805000 secs]
    1573.344: [Full GC 38881K->18195K(259264K), 0.1760390 secs]
    1575.800: [Full GC 26060K->18243K(259264K), 0.1733030 secs]
    1577.789: [Full GC 30691K->18180K(259264K), 0.1765060 secs]
    1580.336: [GC 41540K->18408K(259264K), 0.0033330 secs]
    1582.005: [Full GC 32348K->18433K(259264K), 0.1778330 secs]
    1583.438: [GC 41793K->18751K(259264K), 0.0039520 secs]
    1583.913: [Full GC 25360K->18656K(259264K), 0.1724900 secs]
    1587.323: [Full GC 35278K->18824K(259264K), 0.1789120 secs]
    1590.612: [GC 42183K->19194K(259264K), 0.0040080 secs]
    1591.305: [Full GC 32714K->18075K(259264K), 0.1783630 secs]
    1591.920: [Full GC 32296K->18141K(259264K), 0.1737070 secs]
    1593.748: [                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

  • Memory Leak with JVM.

    Hi,
    I am getting a jvm Memory Leak when i try to load and parse XMLs. The version of JDK is 1.4.1_05. Has anyone faced this problem?
    Any pointers to this will be very helpful.
    Thanks
    Rajdeep

    There is at least one bug associated with xml (although not because of it) which usually makes an appearance in long running applications.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=351925
    If this is an internal application you could conceivably replace the StringBuffer class yourself to fix this.

  • Memory leak when I use function with bstr_t type

    Hello,
    I use Visual C++ 6 and TestStand 3.1.
    I use the tool: Purify from Rational Instruments to detect memory leak in my code.
    When I use in my code, functions from the TestStand API using bstr_t types: GetValString, GetType... memory leaks appear.
    Do you have an idea to solve this problem?
    Thanks

    Breizh,
    Etes vous sur que le problèmes soit lié au type bstr_r ?
    Pouvez vous me faire parvenir un exemple de code mettant en oeuvre la fuite mémoire?
    Raphaël T.
    NI FRANCE
    Cordialement,
    Raphael T

  • Firefox 4 still suffering from a serious memory leak, ends up using 2GB of RAM on 5 tabs and a few plugins?!!

    Why does even Firefox 4, which was supposed to have this issue fixed by now, still suffer from memory leaks?
    I opened up 4-5 tabs, enabled Firebug to tweak a few pages, and an hour later Firefox usage is up to 2GB of RAM?
    What a...?!
    Now, seriously, if you run to suggest that it is most likely due to add-ons and that I should disable them all and start Firefox in safe mode, let me just cut you off right there and ask you this - out of millions of people who downloaded this browser, who the hell uses it without any plugins and/or in safe mode?
    If you're gonna make a browser, make it so that it's lean and free of these issues to begin with, out of the box AND in case an addon or something else is added to it - can't they protect the core files and libraries from being victims to this, in case the addons are to blame?
    And in case it's a Firefox issue to start off with, seriously, can you get a dedicated developer to look into this alone and get it fixed, once and for all?

    I have six tabs open and generally have 3-5. It's been sitting here since last night. I'm using 296Mb ram which is high for me on Windows. My wife and son both use FF4 also and, having just checked, are between 210 and 268Mb respectively.
    No one I know ever complains about high memory usage in FF4 and neither have I experienced it since FF2.5 when memory leaks any user would notice were all fixed.
    So my advice is the same. If your add-ons aren't causing you problems, fix your system.

  • Finding Memory leaks in C using Visual Studio 2013

    I am using Visual Studio 2013, and taking a course in C programming and we started
    talking about memory bugs detaction, in particular memory leaks, and how to detect them using Valgrind on Linux.
    I want to know if there is a way to detect such memory leaks using VS 2013. I tried searching online but it just leads to lots of articles and blogs and msdn posts and blogs with lots of words like dump files, and analyzing them, etc which is weird
    because:
    1) It sounds so complex, convoluted and unintuitive it is actually hard to comprehend it.
    2) The main reason this is weird is due to the fact that VS is the most advanced IDE around and Microsoft spends so much money on in, yet from what I have read it seems that there is no simple way to use VS to detect memory leaks
    - certainly no way that's as simple as Valgrind where I only have to compile the program and run the command valgrind -leaks-check=yes ProgramName
    and it simply prints to me all location it thinks there is a memory leak and describes the error (like not freeing memory after allocating it with malloc hence having "dead" memory after the program finishes, or accessing memory that's out of
    the array bounds)                                                                                                                                                               
    So my question is how to use VS 2013 in order to achieve the same results and to find out First in high level if there are memory leaks in the program, and Second - to detect in a simple manner where those leaks are- preferably without involving dump files
    (not that I know how to use them anyway in VS).

    Hi MicrosoftLaw,
    Thanks for your post.
    Based on your issue, if you want to check if there are memory leaks in the C program from this VS2013. I suggest you could try to find Memory Leaks Using the CRT Library, for more information:
    https://msdn.microsoft.com/en-us/library/x98tx3cf.aspx?f=255&MSPPError=-2147217396
    In addition, I find a similar thread about this issue, please you refer the Dusty's suggestion to check this issue.
    http://stackoverflow.com/questions/45627/how-do-you-detect-avoid-memory-leaks-in-your-unmanaged-code
    I did some research about this issue, I found that the Visual Leak Detector extension tool is a free, robust, open-source memory leak detection system for Visual C++. So if possible, I suggest you could try to use the Visual Leak Detector extension
    tool to find the memory leak for Visual C/ C++ program.
    https://visualstudiogallery.msdn.microsoft.com/7c40a5d8-dd35-4019-a2af-cb1403f5939c
    However, if you have any issue about how to use this Visual Leak Detector extension tool to find the memory leak for C program. I suggest you could directly to write a review to this REVIEW tab in Visual Leak Detector site.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Memory leak when creating new thread.

    Hi,
    Each time i create a thread, it causes 8 bytes memory leak. The testing code is as below and you can see mem usage increasing in Windows Task Manager. But if i don't call ::OCIEnvCreate(), no memory leak.
    Memory validator shows the following call stack information:
    ........largest allocation 8 bytes at .......
    =>OraOCIEI10.dll ss_mem_thread_attach
    =>OraOCIEI10.dll sscoresetserverflag
    =>OraOCIEI10.dll slzgetevar
    =>ntdll.dll LdrInitializeThunk
    Anyone knows what is goiing on?
    /Yue
    #include <stdio.h>
    #include <windows.h>
    #include <process.h>
    #include <oci.h>
    static OCIEnv *env;
    static unsigned int counter = 0;
    unsigned __stdcall ThreadFunc(void* pArg)
    counter++;
    printf( "In %uth thread...\n", counter );
    Sleep(100);
    _endthreadex( 0 );
    return 0;
    int main( int argc, const char* argv[] )
         sword rc = ::OCIEnvCreate(&env, OCI_DEFAULT, NULL, NULL, NULL, NULL, 0, NULL );
         for(;;)
              HANDLE hThread;
              unsigned threadID;
              // Create the second thread.
              hThread = (HANDLE)_beginthreadex( NULL, 0, &ThreadFunc, NULL, 0, &threadID );
              WaitForSingleObject( hThread, INFINITE );
              // Destroy the thread object.
              CloseHandle( hThread );
         return 0;
    }

    Hi,
    I'm not suprised.
    OCI offers the feature OCIThreadKey that allow you to store a pointer within a thread context (without using OCIThread, just using natives threads).
    So OCI needs to catch thread creation to be able to register storage for its OCIThread key value and be able, once the thread is finished to call a callback with the pointer value associated with the thread....

  • Memory leak in JVM 1.3.1

    Hi,
    I'm using the following set up
    OS: Redhat linux 7.1
    Kernel: 2.4.2-1
    glibc-2.1.x for i386
    other set up: ulimit -s 2048, JDK 1.3.1_01
    app: Jboss app server
    I'm running my application in Jboss 2.2.1 which is a I/O intensive. This is a distributed system using visigenic corba 4.5.
    The problem:
    If I run my application the application memory remains stable over a period of time but my JVM memory (system) increases linearly. i got the app memory using : Runtime.getRuntime().totalMemory()
    and JVM memory using : top
    Is the JVM leaking ??? I'm not getting OutOfMemeory error anywhere but my system freezes when it reaches a point where it cannot allocate more memory to java process
    Reg
    Ved

    Freezes? You mean that it stops running at 8 at night and when you come in at 8 the next morning it is still doing nothing? Or that it stops for several minutes?
    Memory problems are not usually the cause of this. Some possibilites:
    -Blocked, deadlocked, threads.
    -Blocked io.
    -Endless spins (code runs but does nothing.)
    -JNI code.

  • LV memory leak - How to use windows API SetProcessWorkingSetSize (from Kernel32.dll)

    Hi fellow LV'ers
    Okay - this is a bit tricky, but i'll try and explain the problem, then ask for the solution, because it may be that someone knows a better way to deal with this.. might get a bit long, sorry - if a solution comes up this will enable all of us to make more memory efficient LV code so please read on..
    Here is the deal:
    When building even a very simple LV executable, looking at the windows task manager will yield a rather large amount of memory allocated for such a small program - and the only way to free this up is by physically clicking the windows minimize button, then suddenly the amount drops to only a few MB and upon maximizing the window again the memory consumption will increase somewhat again, but for a simple VI build to an exe this move may change the consumption from +70MB to less than 15 MB.. This is irregardless of the code you put in the VI, so no coding example in this post as it is how LV works - you can even test it with the development environment - look at the task mgr and check LabVIEW's memory consumption, minimze ALL open NI windows incl project explorer etc, and you will see a significant decrease in memory usage even after maximizing again.. This has annoyed me since day one, but since RAM is a near zero cost these days it is not something I stay awake at night to think about.. However - I have moved into the "publish to web" tools now, wanting to do a remote monitoring part for my application for my customers to experience increased usability from the software i sell them..
    All is well, publishing is really easy (i use the monitor function, NOT the embeded, as customers need not have Labview RunTimeEngine installed, because they might look at it from a non RTE supported platform such as a mobilephone web browser)
    Everything is working fine also for the build application. However - I have noticed that once users start to remote monitor the running application - memory consumption of the running LV application starts to increase - and it keeps doing so - to such an extend that you can drain the computer complete and run off the cliff with a windows error... This is off course not very productive for me, being specialized in measurement applications that usually runs for a long period of time - I initially thought that I had done some poor programming in the VI used to display on the webpage - but it turns out that I can reproduce this behaviour with a simple boolean on an empty front panel..
    NI support has been informed, and they admit there is a problem, but so far solutions from them has been a bit too exotic for my taste, and thus I'm seeking the help of fellow LV programmers...
    You see - The method to solve the increasing memory consumption, is the exact same as mentioned above..minimize the application running with the "minimize" button and all memory will be freed, as soon as you maximize the application and users are viewing it remotely, the memory usage raises again, and history repeats... As previously mentioned, minimizing the window via normal LV calls to property nodes does not yield the same result, nor does a request deallocation of a VI(When you profile a project, there are no VI's increasing in memory, it is the LV process it self doing it) 
    After many many hours googling I stumbled upon this:
    http://support.microsoft.com/?kbid=293215
    I believe trimming the process with SetProcessWorkingSetSize would solve this problem, and now I would really like to be able to do this in my program, so that users are not forced to minimize the program every X hour depending on their system size...
    However - I have absolutely NO experience in calling windows API from LV, i need someone with that knowledge to provide an example of how to call this.. I've looked at examples on how to do calls to windows API - there is an example in this forum with some llb's in it, and I have gained a fair understanding of how parameters are passed between the calls, but none of those include the "hProcess" handle that is apparently needed for this specific winAPI call to work - Anyone in this forum with the knowledge on how to obtain this handle from a VI, if at all possible, and could provide an example VI for me to use - or even better , someone with the knowledge of how to do this within LV it self??
    Your help is much appreciated
    Best Regards
    Jacob
    LV8.6.1 patch something
    Win XP 
    Solved!
    Go to Solution.

    Hi Enrico
    Finally I can give something to the community that has given me so much  :-)
    The "official" statement is that "yes we know it is a problem".. Not sure what that will do to the future.. 
    I have the problem on 8.6.1 as well  - and in fact it is a general LV problem, that I first time reported to NI with LV8.2 as I was pissed by the fact that even the smallest exe file would consume + 50MB of memory until you manually minimized the window. Well - thanks to the feedback from Cosmin I seem to have solved the problem.
    I most warn that having started to "empty process" once in a while has led to occasional program crashes in the lethal "app.exe performed an illegal action and is closed" windows dialog - however what I did was to move the webserver to a seperate exe file and then communicate the data that I want to use via datasocket in a cluster.. It works like a charm and I simply stall the single thread that the webserver is running when ever the empty process is called and I have not seen a crash since then.. (the initial implementation was done in the main app with 4 parallel loops running, and I guess that was a disaster waiting to happen)
    Either way - what I have done is made a VI that at a user defined interval calls the empty process, simply by getting the .exe name from the task manager of the calling program - it is simple and very effective. I call it every 5 minutes - needless to say that flushing too often will most likely kill performance of the system. I have not noticed problems with VM - are you sure you are not storing large arrays or moving around copies of data not used frequently?
    For future reference to this forum, it is attached here including the .dll required to call - it is a LV8.6.1 file as I have not had the time to yet again test every single function of my program for new problems that could occur with upgrading to LV2009 
    I hope this solves your problem..
    best regards
    Jacob
    www.10EaZy.com 
    Attachments:
    EmptyProcess.zip ‏32 KB

  • Why do I get a memory leak when I use the Write Data Storage VI in a loop

    I have a large application that I am collecting various data points from. For the most part they are simple scalar values that need to be logged on a regular basis.  I was attempting to use the new TDM files and the storage VI's  I though everything was working until I looked at the taskmanager and noticed that when the logging loop ran my CPU eventually went to 100% and the process memory grew from about 80,000K to 100,000K and eventually locks up the system. 
    I am using a state machine arch. 
    State 1 - open file (open create) mode) 
    State 2 - Write Channel Group Properties
    State 3 - Loop writes 24 distinct data points to a TDM files in append mode
    State 3 - Repeats [creating new rows of the same 24 data point (wait time about 1 sec)]
    State 4 - Close file on exit.
    Any help on this problem would be appreciated.

    The way I see it, it should be this way.
    Message Edited by Pana-man on 09-30-2005 08:15 PM
    Message Edited by Pana-man on 09-30-2005 08:18 PM
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?
    Attachments:
    nextWeek.jpg ‏43 KB

  • Mail.app memory leak. RAM use increases until system is no longer usable

    I am having this problem since a week ago more less.
    Mail keeps increasing the memory use from a starting 100 Megas. Increasing something like 100 megas each 10 minutes, until the whole system is unresponsive.
    Any ideas?
    Thanks!
    PD: I have 3 IMAP accounts and 1 POP. In total 3348 messages. Running 10.5.4

    Thank for the fast reply!
    Indeed it happened to me. Whenever I dropped a file to the icon it would just hang up the computer. Then I removed my custom plugins (3 columns plugin, and Encryption plugin , I thing). And it worked well. Or at least I could drop files to the Mail Dock icon.
    My impression is that it might be related with IMAP and Gmail. I have 3 Gmail accounts. One of them is my primary email account, it has many many mail. The "all Mail" folder is a big one and probably Mail is trying to catch everything. It does so slowly in the background, creating the problem. May be. Just in case I selected the option not to download attachment in mails.
    Other suspect is the iGTD program I have been using. It syncs with Calendar and the ToDo folder in Mail. But the problem is still there even if iGTD is not working.
    I remember reading something about email with attachment that had numbers on the title, or something like that. It would create a similar problem but I can´t find it now.
    I have tried to control the output from "lsof | grep Mail" and "fs_usage -w -f filesys Mail" but I can´t find anything suspicius (not that I am an expert on that, though)
    THANKS a lot for the help.

  • Memory Leak in a multi threaded Swing application  (ImageIcon)

    When I profile my swing application with netbeans 5.5 , I notice that after each periodically tidy up my image container (add,remove IconImage objects to a hashmap or arraylist), there gather by and by surviving objects. This leads to run out of memory after a while. Is there any other way to avoid this effect?
    Any ideas about "The JVM is notorious for caching images."
    please help..
    what I have made briefly:
    1.) Read the binary stream from the db :
    rs=stmt.executeQuery(query);
    if(rs.next()){
        int len=rs.getInt(2);
        byte [] b=new byte[len];
        InputStream in = rs.getBinaryStream(3);
        try {
                in.read(b);
                in.close();
                img=Toolkit.getDefaultToolkit().createImage(b);
         } catch (IOException e) {
                e.printStackTrace();
    stmt.close();
    rs.close();2.) hold the icon as field :
    this.icon =  new ImageIcon(img);3.) After a while I remove the object from my collection and on the
    overridden method finalize() I also call the flush() method.
    if(this.icon != null){
                this.icon.getImage().flush();
                this.icon = null;
    }The surviving objects still increase?! On the page of SUN they
    submitted a bug. But this is set on closed/fixed.
    (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4014323)
    What am I doing wrong? I also use the byte[] constructor on creating the icon and
    my java version is 1.5.0_10.

    If in your JFrame u have placed your image, before invoke the dispose()
    method put explicitly the image pointer to null and deregister all listener
    you have added to any componentI implemented your suggest and after starting a long time test, in one hour there gathered aprox. 500 surviving generations. I attach a snapshot and the java file ( http://www.box.net/public/eqznamrazd ). The used heap size swings between 3MB and 5MB. I guess this wont kill so quickly the application but anyway there is something wrong!
    Even properly closed streams, database connections etc.. Really despairing. Could one take a look to the java source?
    some snippets bellow:
    private class MyImageIcon extends ImageIcon {
            public MyImageIcon(Image img){
                super(img);
            public void removeImage(Image anImage){
                tracker.removeImage(anImage);
    private class DetailDialog extends javax.swing.JFrame {
            private String personnr;
            private MyImageIcon icon;
            public DetailDialog(String personnr,MyImageIcon icon){
                this.personnr = personnr;
                this.icon = icon;
            public void dispose() {
                if(icon != null){
                    icon.removeImage(icon.getImage());
                    icon.getImage().flush();
                    icon = null;
                super.dispose();
    private class Person extends Object {
            private MyImageIcon icon;
            private String number;
            private DetailDialog detailDialog;
            protected void destroy() {
                if(icon!=null){
                    icon.removeImage(icon.getImage());
                    icon.getImage().flush();
                    icon = null;
                if(detailDialog!=null){
                    detailDialog.dispose();
    private Image LoadImageFromDB(String personnr){
            Image img = null;
            String filename = personnr + ".jpg";
            Connection con = getMysqlConnection();
            Statement stmt;
            ResultSet rs;
            try {
                stmt = con.createStatement();
                String query = "select * from personImage where image='"+filename+"'";
                rs=stmt.executeQuery(query);
                if(rs.next()){
                    int len=rs.getInt(2);
                    byte [] b=new byte[len];
                    InputStream in = rs.getBinaryStream(3);
                    try {
                        in.read(b);
                        in.close();
                        img =
                                java.awt.Toolkit.getDefaultToolkit().createImage(b);
                    } catch (IOException e) {
                        e.printStackTrace();
                rs.close();
                rs = null;
                stmt.close();
                stmt = null;
                con.close();
                con = null;
            } catch (SQLException e) {
                e.printStackTrace();
            return img;
    public void random(){
            java.sql.ResultSet rs = null;
            java.sql.Statement stmt=null;
            java.sql.Connection con = getSybaseConnection();
            try {
                try {
                    stmt = con.createStatement();
                    rs = stmt.executeQuery(randomquery);
                    while(rs.next()){
                        Person person = new Person();
                        person.number = rs.getString("PersonNr");
                        Image img = LoadImageFromDB(person.number);
                        if(img !=null){
                            MyImageIcon ico = new MyImageIcon(img);
                            person.icon = ico;
                        person.detailDialog = new
                                DetailDialog(person.number,person.icon);
                        personList.add(person);
                        System.out.println("Container size: " +
                                personList.size());
                        counter++;
                    if(counter%20 == 0){
                        for(Person p : personList){
                            p.destroy();
                        personList.clear();
                        System.gc();//no need, but I force for this example
                        System.out.println("Container cleared, size: " +
                                personList.size());
                } catch (SQLException ex) {
                    ex.printStackTrace();
                }finally{
                    if(rs != null){
                        rs.close();
                    }if(stmt != null){
                        stmt.close();
                    }if(con != null){
                        con.close();
            } catch (SQLException ex) {
                ex.printStackTrace();
        }

  • Memory Leak while using -Xrunhprof option in Linux OS

    While using the follwing option in my application there is memory leak in JVM in Linux OS.
    -Xrunhprof:heap=all,cpu=times,monitor=y,file=/home/gemini/dilip/www2.log,thread=yIs this a bug ??

    Little lost here. Looks like you are facing memory leaks in Tuxedo 7.1 WS
    client code when it talks with Tuxedo 6.x? Is this correct?
    If so, try installing latest rolling patch for Tuxedo 7.1.
    We recently fixed couple of memory leaks in interop area. One was related to
    compression.
    _shailesh
    Scott Orshan <[email protected]> wrote in message
    news:[email protected]..
    If you are running with the latest patch, then report these problems to
    Support, giving them sample code so that they can reproduce the problem.
    Scott
    Thomas Winter wrote:
    Hi Scott,
    as an additional information:
    The guys at the server side changed something (their
    formaly useing the old 6.3 libraries at server side)
    and surprise... the client has no memory leak anymore.
    But, if more than one thread at the same time use the atmi calls
    there is still some memory consumption.
    The workaround is to use a mutex object to make sure, that
    only one thread use the atmi calls.
    AFAIS Tuxedo has an Problem with Multithreading.
    Thx
    Thomas

  • Memory leak using GWT 1.4 and JDK 1.5

    We are running the following:
    OS : Solaris 5.10
    WebLogic version: 10.0
    JDK : Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
    Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)
    GWT : 1.4
    Oracle : 10g
    We have found memory leak with the above configuration.
    After running 1 session we are facing memory leak. The used Java heap is 4% higher than the one used after we conduct
    our memory tests for 1 user.
    Similarly, after running 5 concurrent sessions we are also facing memory leak where Java heap memory is utilised more
    by about 4%.
    I have used JRockit JDK 1.5 for figuring out memory leak. I have not found a memory leak in any of the modules
    developed by us.
    The memory leak issue is we think concerned with the version of JDK, Weblogic, Sun OS.
    Can somebody please suggest whether we can use the version as mentioned above?
    Any help on this front will be appreciated.

    gc log:
    #log information
    JAVA_OPTS="$JAVA_OPTS -verbose:gc "
    JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCDetails "
    JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCTimeStamps "
    JAVA_OPTS="$JAVA_OPTS -XX:+DisableExplicitGC "
    JAVA_OPTS="$JAVA_OPTS -Xloggc:/path/to/gclog`date +%Y.%m.%d-%H:%M:%S`.log "Check sun papers for garbage collecting tips.
    >
    Is there any other way we can detect memory leak?
    >
    You have to profile your Application Server like you did with your own code.
    regards
    slowfly

Maybe you are looking for

  • Speakers on my macbook pro are too low, speakers on my macbook pro are too low

    Listening to music, watching DVD's or movies on ITunes, the volumne is too low.  Can I make it louder?   It is already set as high as it could go.

  • HELP!! - Element 9 - Program always get stuck while creating thumbmail :(

    Just bought Photoshop Element 9.0 as I wanted something better than Picasa. 1. I installed it, created a catalog 2. Each time I try to import pictures into this catalog, it does read the 50000 pictures I have properly but the thumbmail never finishes

  • Question on LDAP integration & user deletion

    In the "Administration Console Help" Document it states: "You cannot invite user accounts that are mastered in an LDAP-based user directory; these accounts are created automatically when you synchronize the LDAP directory." Does this mean that after

  • Random Contacts sync errors

    We keep encountering Contacts sync errors. We are syncing two Macs/Lion and two iPads. There is no pattern as to where the correct contact entry was created - could by any of the four devices. We don't create on icloud.com, only use that for troubles

  • Language and Region Date Preferences not working

    Date set up is for UK (day/month/year), whichever format I use for cells in Numbers, it's aways MM leading. I tried everything on 2 separate machines and it's not working on both. What am I doing wrong ?