Memeory Leak???

Could someone Please Confirm or Contradict:
Environment:
Redhat 7.1 with Required Kernel Glib binutils
P4 2GHz; 1GB Ram; 40GB /; 4GB Swap
9iAS902 Infrastructure with OEM 9iDB90130 Repository (Installed by iAS)
9iAS902 Mid-tier installed in separate home (not started for Test Env Clear)
All Patches Applied
Start up Listener, Repository, and OEM per Script below
ps shows tnslsnr, oemLaunchOms, 7 oracle, and ~ 70 jre (see below)
Shutdown OEM, Repository, Listener per Script below.
After Running it will show that multiple JRE are not stopped:
[oracle@hst oracle]$ ps -H
PID TTY TIME CMD
1065 pts/0 00:00:00 bash
1356 pts/0 00:00:00 ps
1267 pts/0 00:00:00 jre
1279 pts/0 00:00:00 jre
1280 pts/0 00:00:00 jre
1281 pts/0 00:00:00 jre
1282 pts/0 00:00:00 jre
1283 pts/0 00:00:00 jre
1284 pts/0 00:00:00 jre
1285 pts/0 00:00:00 jre
1286 pts/0 00:00:00 jre
1287 pts/0 00:00:00 jre
1288 pts/0 00:00:00 jre
1289 pts/0 00:00:00 jre
1290 pts/0 00:00:00 jre
1297 pts/0 00:00:00 jre
[oracle@hst oracle]$
If you startup and shutdown multiple times more JREs will be lost.
Is this to be expected, anyone else see this, did I get a bad install???
Any help would be appreciated
Thanks
A
#================================================
#Scripts run in bash as user oracle with . oraenv set to iasdb (all works)
#Startup Script:
export ORACLE_HOME=/path/inf_home
export ORACLE_SID=iasdb
#Start Listener
$ORACLE_HOME/bin/lsnrctl start
#Start Repository
sqlplus /nolog $args <<EOF
connect /as sysdba
startup
EOF
#Start OEM
$ORACLE_HOME/bin/oemctl start oms
# At This point the system works fine and can be accessed
#Do Not connect to OMS but wait for full start (disks stop spinning)
#Shutdown Script:
export ORACLE_HOME=/path/inf_home
export ORACLE_SID=iasdb
#Stop OEM
$ORACLE_HOME/bin/oemctl stop oms sysman/oem_temp
#Stop Repository
sqlplus /nolog $args <<EOF
connect /as sysdba
shutdown immediate
EOF
#Stop Listener
$ORACLE_HOME/bin/lsnrctl stop
PROCESSES WHILE RUNNING:
[oracle@hst oracle]$ ps -H
PID TTY TIME CMD
1622 pts/1 00:00:00 bash
1975 pts/1 00:00:00 ps
1971 pts/1 00:00:00 oracle
1969 pts/1 00:00:00 oracle
1967 pts/1 00:00:00 oracle
1948 pts/1 00:00:00 oracle
1927 pts/1 00:00:00 oracle
1924 pts/1 00:00:00 oracle
1919 pts/1 00:00:00 oracle
1917 pts/1 00:00:00 oracle
1915 pts/1 00:00:00 oracle
1887 pts/1 00:00:00 oracle
1830 pts/1 00:00:00 oemLaunchOms
1845 pts/1 00:00:01 jre
1855 pts/1 00:00:00 jre
1856 pts/1 00:00:00 jre
1857 pts/1 00:00:00 jre
1858 pts/1 00:00:00 jre
1859 pts/1 00:00:00 jre
1860 pts/1 00:00:00 jre
1861 pts/1 00:00:00 jre
1862 pts/1 00:00:00 jre
1863 pts/1 00:00:00 jre
1864 pts/1 00:00:00 jre
1865 pts/1 00:00:00 jre
1866 pts/1 00:00:00 jre
1867 pts/1 00:00:00 jre
1868 pts/1 00:00:00 jre
1869 pts/1 00:00:00 jre
1870 pts/1 00:00:00 jre
1871 pts/1 00:00:00 jre
1872 pts/1 00:00:00 jre
1873 pts/1 00:00:00 jre
1874 pts/1 00:00:00 jre
1875 pts/1 00:00:00 jre
1876 pts/1 00:00:00 jre
1877 pts/1 00:00:00 jre
1878 pts/1 00:00:00 jre
1879 pts/1 00:00:00 jre
1884 pts/1 00:00:00 jre
1885 pts/1 00:00:00 jre
1888 pts/1 00:00:00 jre
1889 pts/1 00:00:00 jre
1890 pts/1 00:00:00 jre
1891 pts/1 00:00:00 jre
1892 pts/1 00:00:00 jre
1893 pts/1 00:00:00 jre
1894 pts/1 00:00:00 jre
1895 pts/1 00:00:00 jre
1896 pts/1 00:00:00 jre
1897 pts/1 00:00:00 jre
1898 pts/1 00:00:00 jre
1899 pts/1 00:00:00 jre
1900 pts/1 00:00:00 jre
1901 pts/1 00:00:00 jre
1902 pts/1 00:00:00 jre
1903 pts/1 00:00:00 jre
1904 pts/1 00:00:00 jre
1905 pts/1 00:00:00 jre
1906 pts/1 00:00:00 jre
1907 pts/1 00:00:00 jre
1908 pts/1 00:00:00 jre
1909 pts/1 00:00:00 jre
1910 pts/1 00:00:00 jre
1911 pts/1 00:00:00 jre
1912 pts/1 00:00:00 jre
1913 pts/1 00:00:00 jre
1920 pts/1 00:00:00 jre
1921 pts/1 00:00:00 jre
1922 pts/1 00:00:00 jre
1925 pts/1 00:00:00 jre
1928 pts/1 00:00:03 jre
1929 pts/1 00:00:00 jre
1930 pts/1 00:00:00 jre
1931 pts/1 00:00:00 jre
1933 pts/1 00:00:00 jre
1934 pts/1 00:00:00 jre
1949 pts/1 00:00:00 jre
1962 pts/1 00:00:00 jre
1963 pts/1 00:00:00 jre
1964 pts/1 00:00:00 jre
1665 pts/1 00:00:00 tnslsnr
On another note If I start and Shutdown the Intelligent Agent I will get Agent Shutdown Failed but the logs all show normal shutdown with return of 0. Also if I start OPMN and shut it down it will also have the same Hanging processes.

How do you know there is a memory leak in Safari?

Similar Messages

  • Web Logic Memeory Leaks

    I have an application that uses WebLogic Driver for connecting to Database. We use Connection Pooling
    We have 11 application threads running and an RMI architecture.
    The main server process which delegates the load is given -mx120m
    and the other process thread which gets maximum load from the main one is given -mx100m
    5 months before the memory was increased in the same way (from -mx72m - -mx100m)
    The reason for all this was because the application suddenly hung and when doing a "ps -eaf | grep java" i found that there were around 3 or 4 weblogic threads created and hanging. This never used to happen during the normal cause of running the aplication.
    I restart the application & bounce the server..but the application runs for half hour before it hangs again.
    Now i increase the memory of the two process as mentioned above it runs perfectly fine. The application is a 12X7 and so it is restarted evey night which should technically clear all memory..
    The versions i am using are
    Solaris :5.6
    Oracle : 8.1.6
    Web Logic Driver :3.1
    We are trying to get "optmise it" software to check memory leaks.
    Any kind of help regarding the cause will be very much appreciated.
    Thanks

    html tags don't work.
    Seems like a lot of mixed up stuff there.<b>It is really getting me confused as there are no
    exceptions raised nor where there any indication that
    it is a memory leak. All i know is that the
    application is hung. It eats up a lot of the Sun
    Solaris Memory too...
    All the memory comes back when we kill the
    application. One more thing is that we have to kill
    the processes as it does not respond to nay of the
    scripts trying to stop it.</b>By definition if is hung it is generally going to take something extreme to kill it.
    >
    >>
    Typically a memory leak is going to manifest itselfas
    a out of memory exception. Unless of course thereis
    a bug in the JVM. An you don't mention a out of
    memory exception. So either it isn't a memoryproblem
    or there is a jvm bug. <b>How do I know whether it is a JVM bug....How can i
    find it out</b>Very carefully. Since a lot of people have run the JVM, either it is a known problem, or (more likely) it is in your code (jni.) The way to find it is to reduce the code until the problem goes away. That allows you to identify what process causes it.
    For the second you will have
    to reduce the problem and then search the bug listand
    submit if you don't find it already it. For thefirst
    you need to look elsewhere.
    the application suddenly hung and when doing a "ps-eaf | grep java" <b>This is done on the command prompt to see if
    eveything is running fine.</b>That isn't terribly useful. It tells you that the process is still running. But it doesn't tell you much else, like if it is hung.
    >>
    You mean like with Runtime.exec()?<b>There i nothing of this sort happening</b>
    And you have
    threads to handle the output and error streams from
    that command? Because if one of those streamsfills
    up it will block the thread that spawned it.Threads
    solve that. However it doesn't block if the outputis
    small enough to fit in the buffer. Because of this
    the behavior seems intermittent.<b>Do you mean to ask me how i know that the
    application is hung....Well as i told you earlier
    there is no indication that abuthing is happning to
    the application. It does not take in any transaction.
    Does not insert anything into the database.</b>That doesn't mean it is hung. The following loop never will lock up a single threaded app but it is not hung.
    while (true) {}
    But of course it will mean that not much will get done.
    I suspect you are way off course if the only behavior is that is stopped processing and now you are looking for memory leaks.
    Have you tried instrumenting your main loops with System.out.println()?
    >
    We are trying to get "optmise it" software tocheck
    memory leaks.
    Are you running with an automated profiler, like
    OptimizeIt or JProble? If not then how are you
    finding memory leaks or performance problems?
    <b>I am trying to get the OptimizeIt profiler. but i
    am not yet sure what the root cause is</b>
    <b><i>There is one more issue of the same kind that
    was posted earlier. I am attaching it here and hope
    that makes some sense too.
    I hava a java application that spawns about 100
    threads. Each thread sends a request to WebLogic
    server 6.1. We are using
    Oracle 8.1.7. They are all
    le 8.1.7. They are all running in a Sun box, 2 CPUs
    and 6gig memory.
    JRE = 1.3.1
    SunOS = 5.7
    Weblogic = 6.1
    Oracle = 8.1.7
    (All running on the same box)
    When we start the client
    en we start the client application, running top shows
    that ,
    the client JVM process - uses
    ent JVM process - uses 40 MB of memory
    WebLogic - uses 250 MB of
    Logic - uses 250 MB of memory
    But the available memory comes
    available memory comes down drastically (almost by 350
    MB), and on bringing both the client and weblogic
    down, we
    are not able to get this 350 MB
    ble to get this 350 MB back
    I would guess that you are misinterpreting something.
    For example, I recently had a problem where I thought an application had a memory leak. It turned out that the log file was writing to the same 'mounted' drive that the virtual memory was using. And I was looking at 'free space'. So the free space went down as the log file size went up. It had nothing to do with my application at all.
    Running JProbe, doen not show
    JProbe, doen not show any memory leak in our
    application
    we are using the hotspot client
    ing the hotspot client version
    -Xms = 128m
    -Xmx = 128m
    </b></i>

  • Is this a memeory leak or what?

    My Environment: Windows 2000 Advaced Server. 256MB ram, ample disk space(6GB free); CPU is Pentium III 450 Mhertz; I have the j2sdk1.4.0_01 installed, and I've downloaded and installed Tomcat (jakarta-tomcat-4.0.3)
    Tomcat runs and port is 8080; Installed Forte 3.0. I have no problems running either JSP or Java standalone application for a while.
    The major problem is: whenever I start Forte to compile my Java programs and leave it on my work station for couple of hours, gradually the performance degrades
    and within a day, the degradation is so bad that I cannot edit any java programs in Forte or compile or do anything in Forte. At which time I have to reboot my workstation and start all over again. I loose considerable time everyday doing this nonsense. I donot have any problem on this W/S with any other applications. Oracle 8i is also installed on this WS and it works fine. So also all other MS products & the internet. Performance degradation is somehow restricted with only Forte. All other applications runs for weeks if left on the WS.
    My hard disk was brand new when I installed all the software.
    10 Duke Dollars for helping me out in finding a solution to resolve this performance problem.

    I'm not a Forte user, but from the standpoint of IDEs, there could be issues with the way it is being used. For example, JBuilder has a "run" or "debug" button that can be used to run the application. When one of these buttons is clicked, it opens a new pane at the bottom of the screen to display the rsults of the run process. The problem is, it will open a new pane every time you click the run button at the top of the screen. The solution is to close the pane after each run or use the "rerun" icon that is displayed on the pane itself to run the program using the same pane for display.
    My point is, you should check to see if something like this is happening with Forte. Perhaps it is keeping files open even after you are finised editing it and you have to explicitly close those files, perhaps it's consuming resources some other way that can be controlled by you. Check the documentation carefully.
    Hope this can at least get you started.

  • JRockit 1.4.2_04 crashes

    JRockit 1.4.2_04 crashes when we run a test. The application is clustered (2 machines).
    The heap size is 256MB. The two machines has 3.8GB physical memory each. We have
    experimented with using different GC algorithms and using a nursery size, and
    different heap sizes 512MB and 256MB. JRockit crashes after only 10 - 30 hours.
    We get this error message from machine A in the cluster: ============================================================
    Fatal internal error in JRockit during garbage collection.
    Try to reduce the heap size.
    mmRealloc(0x357753a8, 128) failed ============================================================
    We get this error message from machine B in the cluster:
    ===== BEGIN DUMP =============================================================
    JRockit dump produced after 0 days, 13:01:14 on Sun Jun 13 05:00:17 2004
    Additional information is available in:
    /opt/sb1sk/weblogic/sb1sk/jrockit.31356.dump
    /opt/sb1sk/weblogic/sb1sk/core
    Please send the file(s), information about your system
    setup and the program you were running to [email protected] Thank you.
    Error Message: Null pointer exception in native code
    Signal info : si_signo=11, si_code=1
    Version : BEA WebLogic JRockit(TM) 1.4.2_04 JVM ari-29212-20040415-1332-linux-ia32
    Threads / GC : Native Threads, GC strategy: gencon
    : mmHeap->data = 0x20000000, mmHeap->top = 0x30000000

    Here is a test program you can use to test if for JVM leaks memory when creating
    threads.
    Johan Walles <johan@spamalamadingdong> wrote:
    I don't think so, but I could be wrong.
    Your best bet (in case nobody who actually knows answers this) is to
    write a
    short test program that starts tons of threads but always keeps the total
    number
    of threads at some sane value, then run that for a long time. Or ask
    Vegard for
    his :-).
    //Johan
    harish tejwani wrote:
    We are running jrockit81sp2rp1_141_06 for our production
    Any clue if it exists in this version ?
    Thanks
    Harish
    "Vegard Bye" <[email protected]> wrote:
    I've built a program, which just creates threads and let each of them
    run. Each
    thread just increases a couple of numbers and then terminates. After
    about 13
    million threads the program crashes with
    Error Message: Null pointer exception in native code
    Signal info : si_signo=11, si_code=1
    Version : BEA WebLogic JRockit(TM) 1.4.2_04 JVM ari-29212-20040415-1332-linux-ia32
    Threads / GC : Native Threads, GC strategy: parallel
    : mmHeap->data = 0x20000000, mmHeap->top = 0x30000000
    : mmStartCompaction = 0x23c00000, mmEndCompaction = 0x25000000
    which may imply that it is correct that there is a memeory leak for
    each
    started
    thread. In my test program the number of concurrent threads never increases
    100.
    This memory leak is very critical, since my server will crash afterabout
    a day
    or two.
    Johan Walles <johan@spamalamadingdong> wrote:
    There's a memory leak of about 100 bytes per started thread in JRockit
    1.4.2_04.
    If your app starts a lot of threads you may be running into this.
    Regards //Johan
    [TestCreateThreadMemoryLeak.java]

  • JRockit 1.4.2_04 released

    An update release for the JRockit 1.4.2_04 JVM has been released and is now
    available from the BEA download site (http://commerce.bea.com). This is a
    maintenance update to the JRockit 1.4.2_04 JVM release that was previously
    released in April '04.
    Some highlights of this release vs. JRockit 8.1 SP2 (J2SE 1.4.1):
    - Support for new OSes. In addition to previously supported OSes, the
    following are additional supported platforms - Red Hat EL 3.0 (IA32 / IPF),
    Windows Server 2003 (IA32), and SuSE Linux Server 9 (IA32 / IPF). Support
    for Red Flag 4.1 (IA32 / IPF) will be added soon after it's availability.
    - This release will be bundled with each of the following Linux
    distributions - Red Hat EL 3.0, SuSE Linux Server 9, Red Flag Advanced
    Server 4.1.
    - Improved runtime performance
    - Improved startup performance
    - Support for Native POSIX Thread Library (NPTL) on Linux
    - Code caching (experimental feature)
    - Numerous bug fixes
    For more information on new features, please visit:
    http://edocs.bea.com/wljrockit/docs142/intro/newftrs.html.
    Finally, this JRockit release is bundled and certified with WebLogic
    Platform 8.1 SP3, which is also available from the BEA download site.

    Here is a test program you can use to test if for JVM leaks memory when creating
    threads.
    Johan Walles <johan@spamalamadingdong> wrote:
    I don't think so, but I could be wrong.
    Your best bet (in case nobody who actually knows answers this) is to
    write a
    short test program that starts tons of threads but always keeps the total
    number
    of threads at some sane value, then run that for a long time. Or ask
    Vegard for
    his :-).
    //Johan
    harish tejwani wrote:
    We are running jrockit81sp2rp1_141_06 for our production
    Any clue if it exists in this version ?
    Thanks
    Harish
    "Vegard Bye" <[email protected]> wrote:
    I've built a program, which just creates threads and let each of them
    run. Each
    thread just increases a couple of numbers and then terminates. After
    about 13
    million threads the program crashes with
    Error Message: Null pointer exception in native code
    Signal info : si_signo=11, si_code=1
    Version : BEA WebLogic JRockit(TM) 1.4.2_04 JVM ari-29212-20040415-1332-linux-ia32
    Threads / GC : Native Threads, GC strategy: parallel
    : mmHeap->data = 0x20000000, mmHeap->top = 0x30000000
    : mmStartCompaction = 0x23c00000, mmEndCompaction = 0x25000000
    which may imply that it is correct that there is a memeory leak for
    each
    started
    thread. In my test program the number of concurrent threads never increases
    100.
    This memory leak is very critical, since my server will crash afterabout
    a day
    or two.
    Johan Walles <johan@spamalamadingdong> wrote:
    There's a memory leak of about 100 bytes per started thread in JRockit
    1.4.2_04.
    If your app starts a lot of threads you may be running into this.
    Regards //Johan
    [TestCreateThreadMemoryLeak.java]

  • CFMX Hanging

    We are running CFMX 7.0.1. The CF server is hanging about
    once a day now. Most of our business takes place between 9 - 5 M -
    F and we almost always get hangs during those hours. The server
    almost never hangs on weekends or at night. During the hang CPU for
    the CF process spikes to about 50% utilization, where it normally
    runs at 10%. The server even hangs on a normal stop command so that
    we have to kill -9 the jrun processes to get it restarted.
    Looking into the CF server logs there is no regular pattern
    to the errors and the errors don't seem that serious to begin with.
    We run 7.0.1 on a Solaris 2.8 machine, specifically a
    Sun-Fire-280R, with 8 gigs of memory. The CF server communicates
    with Apache 1.3.36 on the front end and almost exclusively with
    Oracle database servers on the backend.
    Does anyone have any advice for these hangs? What can I look
    at? Help!!

    I had similar problem. I did following.
    0. Install CF7 patch till 7.0.2
    A. Tune up JVM
    Try installing JavaSDK from
    http://developers.sun.com/downloads/top.jsp
    (It should version 1.4.13 or new. Install in webserver.
    Back up runtime\servers\coldfusion\SERVER-INF\jrun.xml
    Goto CF admin, change JVM path to new java installed folder.
    restart cf services...
    It will help for any JVM memeory leaking and loads.
    B. Tune up CF pages.
    Check any pages which returns large query, then use paging
    C. Tune up DB Query
    Use store procedure.

  • Serialize  jcombobox  to xml file - how to do?

    Hello,
    what xml would you use to serialize the strings in a jcombobox?
    I have already used JAXB a bit. Should i write for my existing data class a method getting the string data of the jcombobox in a for loop and serialize this data into the object?

    Isn't there something like file.close()
    I mean, java files are also supposed to be closed automatically but there are always memeory leaks and stuff....

  • Labview drivers for Prisma QMS

    Hi,
    I'm looking for labview drivers for the Prisma Quadrupole Mass Spectrometer
    from Pfeiffer Vacuum. If possible also a simple rest gas analysis (RGA) VI.
    Can anyone help?
    Hans Rosink

    There is no driver available as the qmg220 uses OPC communication you can use labviews build in OPC functions.
    But the problem is that the "normal" labview OPC functions using datasoket are a little bit limited and when you need to adress many OPC items it may crash.
    Therefore NI is producing the LABVIEW DSC module which is avialable for extra money and with the main problem that you are not able to build stand alone applications without any extra licencing costs. Which makes problems if you want to sell your software or add it to the instrument you sell.
    On the other side the DSC module is a little bit to powerfule for the communication with the QMG220.
    Because of these arguments we decideed to use a OPC developement toolkit from Softing . 
    We started with the .NET developement but there4 was a reasonable memeory leak in Labview when using .NET event callbacks.
    This has been solved with Labview 2009f2 and up versions.
    Up to now we have made our communication with the Softing ActiveX control within labview.
    Now we are on the  point to switch bak to .NET. 
    When try the OPC connectivity from any third party opc API vendor and you are using a remote OPC from labview please tonst forget to add the line.
    ole.AuthnLevel = 1 to your labview.ini file. 
    Hope this gives you a first overview.
    We are not planning to build a easy to use driver for the QMG220 but we build a lot of vi's to control some functions and collect the data.
    Best regards
    Gernot 

  • Hashtable for Consolidation

    Iam working in an application which need consolidation of large amout of data.
    Let me explain this clearly....
    Let 'abc' be an incoming data. Iam making an entry of this data as key and the value for it will be Integer object 1 (for the first time). When this abc comes for the next time am increasing the value for the key 'abc' by 1. Likewise its done for all the incoming data. And thus the data is consolidated for a period of 1 hour. There is a maximum possibility of 7 lakhs entries for an hour. After one hour is over am removing the key value pair from the hashtable and write the consolidated data into a database.
    Is there anyway of increasing the performance of this?
    Is there any possibility of this going wrong anytime?
    Is there any other better method instead of using hashtable?
    Do reply..

    previously the incoming data was in database...so
    consolidation was done by sql query (GROUP BY) and its
    performance was poor
    now the incoming data is in files so iam using
    hastable
    and the performance is very good
    but will there be any memory leak by using hashtable?
    where i have to be careful to avoid memory leak?LOL
    java programmers are under fear or pressure nowdays
    about memeory leaks
    tell me also where is the clearcut specifications for GC.

  • Finalization thread does not keep up with Object allocation

    Hi,
    I'm trying to track down a memeory leak in my program. When I use OptimizeIT I find 11,690 instances of java.lang.ref.Finalizer hanging about. I also see lots of JDBC Connection, CallableStatements, and PreparedCalls hanging around. (They are actually instances of my vendor specific classes). Those objects include a finalize() method.
    Why are all these java.lang.ref.Finalizers hanging about? Why doesn't the finalization thread actually let go of them or finalize them in a timely manner! Eventually, my process runs out of memory and the Finalization thread never seems to finalize these objects. The rate at which I am newing up connections seems to be faster than the finalization thread can destory the object.
    charlie
    p.s.
    When I go into the reference graph, there are lots of Connection objects that don't have link back to the root set. But, they are never GC'ed when I push the GC button. While OptimizeIT doesn't show the finalization thread holding a reference to them, I believe OptimizeIT 4.2 hides the java.lang.ref.Finalizer reference that points to your object. The reference inside java.lang.ref.Finalizer is actually inside a super class called java.lang.ref.Reference. Why I don't know? But, someone with OptimizeIT 4.1 said that they see more information than I do in OptimizeIT 4.2. Also when I do a show Outbound References I don't see the instance members for the super class. (Namely java.lang.ref.Reference.referent) Is anyone familiar enough with OptimizeIT as to why this is occuring?

    >
    Well thanks for the advice, jschell, but I am cleaning
    up my connections by calling close(). But, keep the
    great advice coming. I didn't think this forum had
    quite enough worthless, cynical advice. For the
    benefit of developers who read this forum for some
    worth while advice. I'll post my findings.
    Hmmmm...others seems to think my advice is worthwhile.
    Some have even come to think that my advice is worthwhile after posting remarks like the one above.
    What's really interesting about this problem is that
    this has nothing to do with whether you call close()
    or not. In fact, you could've called close() and
    cleaned up properly, and your program could still leak
    memory! It hinges on objects that implement the
    finalize() method.
    Your program, or third party libraries, or even the JVM can leak memory.
    My JDBC vendor, like many, includes a finalize()
    method in the implemention classes of Connection,
    ResultSet, PreparedCall, etc. Naturally, this is to
    clean up a connection when a programer has lost a
    reference to a connection without calling close, but
    it has a serious side effect.
    Could be.
    And your JDBC vendor would be?
    I certainly know of JDBC vendors who do use finalize. Seems reasonable since the JDBC spec suggests it.
    And I have used JDBC drivers that use it in 24x7 server operations and I have not traced a leak to those drivers yet.
    So to my mind that suggests that finalize by itself is not a problem.
    I've tested this will a class that simply does a wait()
    call in its finalize() method. Then I allocate lots
    of other objects that contain a finalize() method,
    and watch the free memory fall. Just as a guess I would say that that is a really bad thing to do. My first guess would be that it would just lock up the JVM. Since it doesn't that would suggest that the JVM is creating one or more threads to call finalize.
    Threads take memory.
    And when you call wait you suspend those thread indefinitely.
    So I would expect to see memory fall.
    >
    Seems like to me that it's better to leak memory, than
    to try to clean up for the programmer. While
    researching this problem I ran across a long post on
    the .NET mailing list on finalization in .NET, and
    they seem to say the same thing that Sun says which is
    that the use of a finalize() method that the system
    will call implicitly is a bad thing. You should
    always use an explicit call like close().
    I would guess that memory collection in .Net is going to be less robust than in java. It simply hasn't been around long enough.
    While the fix for my problem is quite simple, remove
    the finalize() method from the wrapper class. But, I
    haven't run across any documenation on Sun's site or
    the internet that has run across a memory leak quite
    like this.
    I however, have read, and participated in quite a few threads on this site where many people have suggested that you should never use finalize.
    I think there are even a couple examples that show exactly how using finalize can generate memory leaks.

  • [bdb bug]repeatly open and close db may cause memory leak

    my test code is very simple :
    char *filename = "xxx.db";
    char *dbname = "xxx";
    for( ; ;)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    I try to run my test program for a long time opening and closing db repeatly, then use the PS command and find the RSS is increasing slowly:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 466 588 4999 980 0.3 -bash
    2615 pts/0 R 0:01 588 2 5141 2500 0.9 ./test
    after a few minutes:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 473 588 4999 976 0.3 -bash
    2615 pts/0 R 30:02 689 2 156561 117892 46.2 ./test
    I had read bdb's source code before, so i tried to debug it for about a week and found something like a bug:
    If open a db with both filename and dbname, bdb will open a db handle for master db and a db handle for subdb,
    both of the two handle will get an fileid by a internal api called __dbreg_get_id, however, just the subdb's id will be
    return to bdb's log region by calling __dbreg_pop_id. It leads to a id leak if I tried to open and close the db
    repeatly, as a result, __dbreg_add_dbentry will call realloc repeatly to enlarge the dbentry area, this seens to be
    the reason for RSS increasing.
    Is it not a BUG?
    sorry for my pool english :)
    Edited by: user9222236 on 2010-2-25 下午10:38

    I have tested my program using Oracle Berkeley DB release 4.8.26 and 4.7.25 in redhat 9.0 (Kernel 2.4.20-8smp on an i686) and AIX Version 5.
    The problem is easy to be reproduced by calling the open method of db handle with both filename and dbname being specified and calling the close method.
    My program is very simple:
    #include <stdlib.h>
    #include <stdio.h>
    #include <sys/time.h>
    #include "db.h"
    int main(int argc, char * argv[])
    int ret, count;
    DB_ENV *dbenvp;
    char * filename = "test.dbf";
    char * dbname = "test";
    db_env_create(&dbenvp, 0);
    dbenvp->open(dbenvp, "/home/bdb/code/test/env",DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_INIT_MPOOL, 0);
    for(count = 0 ; count < 10000000 ; count++)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    dbenvp->close(dbenvp, 0);
    return 0;
    DB_CONFIG is like below:
    set_cachesize 0 20000 0
    set_flags db_auto_commit
    set_flags db_txn_nosync
    set_flags db_log_inmemory
    set_lk_detect db_lock_minlocks
    Edited by: user9222236 on 2010-2-28 下午5:42
    Edited by: user9222236 on 2010-2-28 下午5:45

  • Issue in enabling dbx rtc for memory leak analysis

    Any help on this is highly appreciated ...
    Following is the issue:
    pass@odcsmoke1> dbx -C xfer
    changes (topic)
    The major new features of this release relative to 6.1 are:
    o The dbx environment variable "rtc_use_traps" has been removed.
    Traps are used automatically as long as the hardware is UltraSparc.
    o There is now some basic support for looking at core files from
    different versions of Solaris. See `help core mismatch' for details.
    o Stepping to a specific function support. See `help step to' for details.
    o Fortran intrinsics support on Intel has been removed.
    o Dbx automatically translates some old dbxenv variables to their new
    names. See `help dbxenv' for details.
    o The default command-line editing mode is now emacs. See "How do I enable
    command-line editing?" in FAQ for details (`help FAQ').
    o Two new collector commands have been implemented: `pause' and `resume'.
    See `help collector' for details.
    o The collector enable_once command has been removed.
    o The collector store command has been extended to include experiment groups.
    See also `help changes61'
    To suppress this message, add the following line to your .dbxrc file:
    dbxenv suppress_startup_message 6.2
    Reading xfer
    Reading ld.so.1
    Reading librtc.so
    Reading libm.so.1
    Reading libnsl.so.1
    Reading libresolv.so.2
    Reading libc.so.1
    Reading libgen.so.1
    Reading libdl.so.1
    Reading librt.so.1
    Reading libpthread.so.1
    Reading libthread.so.1
    Reading libsocket.so.1
    Reading libxfermain.so
    Reading libpass.so
    Reading libarsapic.so
    Reading libarsrecordc.so
    Reading libiaconfig.so
    Reading libarsconfig.so
    Reading libclientsock.so
    Reading libaio.so.1
    Reading libmd5.so.1
    detected a multithreaded program
    (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) check -all
    access checking - ON
    memuse checking - ON
    (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) check -leaks
    leaks checking - ON
    (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) stop in main
    More than one identifier 'main'.
    Select one of the following:
    0) Cancel
    1) `xfer`xfer.c`main
    2) `libxfermain.so`xfer.c`main
    a) All
    1(2) stop in main
    -d ecpix.conf -g y -P n <
    Running: xfer -f rbi_1.cfg -d ecpix.conf -g y -P n
    (process id 33)
    dbx: warning: A threaded program is not initializing libthread first!
    */opt/SUNWspro/WS6U2/lib/dbxruntime/librtc.so came before it.*
    dbx: warning: A threaded program is not initializing libthread first!
    /lib/libc.so.1 came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /lib/libnsl.so.1 came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /lib/libsocket.so.1 came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /lib/libresolv.so.2 came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /lib/libgen.so.1 came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /lib/libaio.so.1 came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /lib/libmd5.so.1 came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /lib/librt.so.1 came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /usr/pass/lib/sparc-sun-solaris2.8/libpass.so came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /usr/pass/lib/sparc-sun-solaris2.8/libclientsock.so came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /usr/pass/lib/sparc-sun-solaris2.8/libarsrecordc.so came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /usr/pass/lib/sparc-sun-solaris2.8/libiaconfig.so came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /usr/pass/lib/sparc-sun-solaris2.8/libarsapic.so came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /usr/pass/lib/sparc-sun-solaris2.8/libarsconfig.so came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /usr/pass/lib/sparc-sun-solaris2.8/libxfermain.so came before it.
    dbx: warning: A threaded program is not initializing libthread first!
    /usr/pass/etc/xfer came before it.
    stopped in main at line 461 in file "xfer.c"
    461 CHAR *Etc_Dir="/usr/pass/etc/";
    (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) showmemuse
    dbx: warning: check -leaks/-memuse must be issued before the run command for showmemuse to be used(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx)
    pass@odcsmoke1> uname -a
    SunOS odcsmoke1 5.10 Generic_118822-30 sun4u sparc SUNW,Sun-Fire-V250

    Andrew is right, dbx 6.2 is very old; technically, it is supported on Solaris 10, but as you can see for yourself, there are issues to be fixed.
    Only limited support is available for this version, so if you have a support contract, please report this problem through the support channel. Better yet (and in case if you don't have support contract), upgrade to a more modern version. Since you are on Solaris 10, I'd recommend latest version of Sun Studio - 12 update 1; it is free for all uses and can be downloaded from here: http://developers.sun.com/sunstudio/downloads/.
    Should you have any questions about the upgrade, please post it here.

  • Creative Cloud Leaks Thread Handles

    I have Creative Cloud version 1.8.0.447 running on windows 7, and I notice that it leaks a Thread Handle, about 4 times, or so, per minute.  Since I leave my computer on most of the time, after a few days, the number of leaked Thread Handles is up in the tens of thousands.
    I can see the thread handles leaking using Process Explorer.
    Generally when a thread ends, its handle needs to be closed, or else the handle will stay active forever, or until the process ends.  It looks like the programming team is not closing these handles after the threads end.
    Please, adobe, fix this problem in a future release of creative cloud.
    -Todd

    Some 10.9.x links
    -next link says After Effects, but check YOUR permissions !!!
    -http://blogs.adobe.com/aftereffects/2014/06/permissions-mac-os-start-adobe-applications.ht ml
    -Mac 10.9.4 and OpenCL issue https://forums.adobe.com/thread/1514717
    -Mac 10.9.3 workaround https://forums.adobe.com/thread/1489922
    -more Mac 10.9.3 https://forums.adobe.com/thread/1491469
    -and https://forums.adobe.com/thread/1507936
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Mac Creative Cloud app "leak" problem on lastest version

    The latest download of the Mac Creative Cloud app has a bug.  After receiving the latest CC (today) my system console continues to inform me of a "leak error" at the rate of abot four per minute.  For example: "10/6/14 5:18:09.479 PM com.adobe.AdobeCreativeCloud: objc[190]: Object 0x699153a0 of class __NSCFData autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug"
    Any ideas on a fix?
    Thanks,
    Jim

    Duplicate Thread:
    Refer: Creative Cloud for Mac (latest version) has a "leak" error
    Thanks,
    Atul Saini

  • Creative Cloud has an ObjC "leak" in latest Mac release

    The latest download of the Mac Creative Cloud app has a bug.  After receiving the latest CC (today) my system console continues to inform me of a "leak error" at the rate of abot four per minute.  For example: "10/6/14 5:18:09.479 PM com.adobe.AdobeCreativeCloud: objc[190]: Object 0x699153a0 of class __NSCFData autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug"
    Any ideas on a fix?
    Thanks,
    Jim

    Duplicate thread:
    refer: Creative Cloud for Mac (latest version) has a "leak" error

Maybe you are looking for

  • Regd: Drop down option related

    hi gurus, am Created  an iView with a  drop down selection option. for example <b>Display as : Table                 : Chart</b> it's working fine and displaying in the output as per the selection in the Drop down list. my Question is it's working in

  • How to confiure sendmail in sloaris 10

    pls explain me how to setup sendmail .in my concern we 30 windows work station one solaris 10 x86 server i want to configure sendmail

  • Tracking placed files (jpeg,tiff,word,PDF,excel)

    It was recommended to ask this here vs bridge - not much luck in bridge. The situation: i have multiple sources sending a variety of files (jpeg,tiff,word,PDF,and excel). As the book is designed many of them will be placed. As long as the sources upd

  • Palm Pre Sound System WAY TOO LOW

    Omg it worked perfectly a couple of hours ago and now is really low whenver im throwin a task or window away the little sound it makes can barelly be heard I checked on sounds & ringtones and the volume is all the way up what can be wrong with it? Po

  • Web based streams for nfl game pass?

    I've read about using ATV to stream nba league pass through the appropriate app but is it possible to stream the nfl game pass on the ATV also? Thanks in advance Buzz