Memory leak in solaris 2.5.1

Hi,
I have a multithreaded application running under Solaris 2.5.1 , all
created threads are dettached , but even after i call pthread_exit() function, the allocated memory is not freed up, is it normal ? Solaris only freed up the allocated memory when other program call for this ?or there is another funtion i need to call after pthread_exit() ?
Regards,

It looks like i am also facing the same problem with my application . If by some chance you were able to solve this problem do send a mail to [email protected] I just posted the question. while searching the web i found your question which looks similar but not answered. Hope you could give me some input
Thanks

Similar Messages

  • Memory leak in solaris 9

    Hi ,
    I have Oracle9i database running on Solaris 9. After every 6 days my solaris box went out of space although its a test box and there is no activity on the system. Why the hell it takes all the ram and swap space when there is no activity on the system except Oracle Instance is running with no user connection. What process are running in the background that takes all the memory and i have to restart this box every week. IS THERE ANT PATCH OF MEMORY LEAK FOR SOLARIS9?. I am not a solaris administrator and i have to fix this problem before moving my system to production. I would really appreciate your help.
    Thanks.

    Hi ,
    I have Oracle9i database running on Solaris 9. AfterI have had for some months been running oracle 9i (and 8i) under solaris 9. There have been no problems and the server has been stable.
    It sounds like you may have misconfigured the solaris kernel. It also sounds like your SGA is too large to fit in memory.
    So I guess the first step would be to check the SGA and then the /etc/system file.
    Here is what mine looks like for example:
    SQL> show sga
    Total System Global Area 219644872 bytes
    Fixed Size 730056 bytes
    Variable Size 167772160 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 811008 bytes
    SQL>
    bash-2.05$ tail /etc/system
    set shmsys:shminfo_shmmax=4294967296
    set shmsys:shminfo_shmmin=1
    set shmsys:shminfo_shmmni=100
    set shmsys:shminfo_shmseg=10
    set semsys:seminfo_semmni=100
    set semsys:seminfo_semmsl=256
    set semsys:seminfo_semmns=1024
    set semsys:seminfo_semopm=100
    set semsys:seminfo_semvmx=32767
    bash-2.05$
    bash-2.05$ vmstat
    kthr memory page disk faults cpu
    r b w swap free re mf pi po fr de sr dd dd f0 s0 in sy cs us sy id
    0 0 0 2076240 1302024 0 1 1 0 0 0 0 0 4 0 0 411 92 135 0 1 99
    bash-2.05$
    You need to gather more system information to help you troubleshoot.

  • Process memory leak issue  solaris 10

    I have a process which has a memory leak issue. I ran this process on solaris 9 as well as solaris 10. When i run prstat command i get a different output for two. Funny thing is that memory leak noted in solaris 10 is much more than that in solaris 9 e.g if it is 1 MB in solaris 9 then its 4 MB in solaris 10.
    What can be possibly causing this ? Is this related to kernel implementation on diff solaris ?

    I have a process which has a memory leak issue. I ran this process on solaris 9 as well as solaris 10. When i run prstat command i get a different output for two. Funny thing is that memory leak noted in solaris 10 is much more than that in solaris 9 e.g if it is 1 MB in solaris 9 then its 4 MB in solaris 10.
    What can be possibly causing this ? Is this related to kernel implementation on diff solaris ?

  • Memory leak in Solaris - SunOS 5.7, jre1.3.1

    Hi,
    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 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 application, running top shows that ,
    the client JVM process - uses 40 MB of memory
    WebLogic - uses 250 MB of memory
    But the 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 back
    Running JProbe, doen not show any memory leak in our application
    we are using the hotspot client version
    -Xms = 128m
    -Xmx = 128m
    Any help is appreciated

    It looks like i am also facing the same problem with my application . If by some chance you were able to solve this problem do send a mail to [email protected] I just posted the question. while searching the web i found your question which looks similar but not answered. Hope you could give me some input
    Thanks

  • Memory leak in Solaris 10?

    Dear all,
    I have installed and configured a Solution Manager 4.0 system SPS 15  on a Solaris 10 T2000 SPARC hardware with 8 core CPUs and 32 GB of RAM. The database is Oracle 10.2.0.2.   My Java virtual machine version is 1.4.2_17. When I start the system and go to st06, I see that I have 26 GB of RAM free
    A few hours (sometimes even one hour) later and without any activity on the system whatsoever (it is brand new so nobody but myself is using it) I execute st06 and it looks like I only have 1 GB of memory left.
    My saposcol is consistent with my kernel level (patch 133, which is the patch for the Support Stack 15). I had the same problem with support stack 13 as well ( so upgrading kernel didn’t make any difference)  and Java virtual machine 1.4.2_13
    I have the same problem even when I start the system without starting the Java Stack (set parameter rdisp/j2ee_start to 0), so I do not believe that it has to do with the Java virtual machine or the Java Stack in general
    Any ideas ?
    Many thanks
    Andreas

    Hello,
    Looks like Solution Manager is only using 4.4 GB from what I see in prstat. Shouldn't I worry at all then ?
       PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
      8879 root     3664K 3656K cpu0    59    0   0:00:00 0.1% prstat/1
      8859 root     9040K 7000K sleep   59    0   0:00:00 0.0% sshd/1
      4585 100      8032K 3584K sleep   59    0   0:09:10 0.0% saposcol/1
      8858 root     5672K 4888K sleep   59    0   0:00:00 0.0% ssh/1
      6873 100      1397M 1276M sleep   59    0   0:02:45 0.0% oracle/1
      7162 100      2609M  698M sleep   59    0   0:12:57 0.0% jlaunch/200
      7161 100       431M  266M sleep   59    0   0:03:52 0.0% jlaunch/116
      1833 noaccess  294M   86M sleep   59    0   0:02:51 0.0% java/55
      6869 100      1398M 1277M sleep   59    0   0:01:48 0.0% oracle/1
      1874 noaccess  211M   89M sleep   59    0   0:02:50 0.0% java/55
       945 daemon   5104K 3848K sleep   59    0   0:00:01 0.0% kcfd/5
       882 noaccess  283M   87M sleep   59    0   0:02:49 0.0% java/55
       135 daemon   4632K 2728K sleep   59    0   0:00:00 0.0% kcfd/5
       290 root     2080K  128K sleep   59    0   0:00:00 0.0% smcboot/1
       251 root     9512K 4072K sleep   59    0   0:00:03 0.0% inetd/4
       264 root     2504K  848K sleep   59    0   0:00:00 0.0% ttymon/1
       250 root     2168K  680K sleep   59    0   0:00:00 0.0% sac/1
       289 root     2080K  120K sleep   59    0   0:00:00 0.0% smcboot/1
       210 root     2536K  920K sleep  100    -   0:00:09 0.0% xntpd/1
       238 daemon   2408K  456K sleep   60  -20   0:00:00 0.0% nfs4cbd/2
       201 root     2920K 1528K sleep   59    0   0:00:00 0.0% cron/1
       233 daemon   2800K  560K sleep   59    0   0:00:00 0.0% rpcbind/1
       132 root     6896K 1752K sleep   59    0   0:00:00 0.0% devfsadm/8
       123 root     2184K  104K sleep   59    0   0:00:00 0.0% drd/2
    ZONEID    NPROC  SWAP   RSS MEMORY      TIME  CPU ZONE
         0       50  287M  260M   0.8%   0:04:46 0.1% global
         2      133   13G 4491M    14%   1:18:58 0.1% solman
         1       35  273M  186M   0.6%   0:04:24 0.0% content
    Another prstat shows the dis+work process, not sure why it was not shown in the previous prstat
       PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
      7022 100      5293M  591M sleep   59    0   0:24:00 0.1% disp+work/1
      4585 100      8032K 3584K sleep   59    0   0:09:15 0.0% saposcol/1
      8978 root     3664K 3656K cpu24   59    0   0:00:00 0.0% prstat/1
      7162 100      2609M  698M sleep   59    0   0:12:59 0.0% jlaunch/199
      7161 100       431M  266M sleep   59    0   0:03:55 0.0% jlaunch/116
      6873 100      1397M 1276M sleep   59    0   0:02:47 0.0% oracle/1
      1833 noaccess  294M   86M sleep   59    0   0:02:52 0.0% java/55
      6869 100      1398M 1277M sleep   59    0   0:01:49 0.0% oracle/1
      1874 noaccess  211M   89M sleep   59    0   0:02:51 0.0% java/55
       882 noaccess  283M   87M sleep   59    0   0:02:50 0.0% java/55
       457 root     8136K 1832K sleep   59    0   0:00:03 0.0% sendmail/1
       363 root     5080K  272K sleep   59    0   0:00:00 0.0% automountd/2
       751 root       16M 5568K sleep   59    0   0:00:07 0.0% svc.startd/12
       364 root     5512K 3392K sleep   59    0   0:00:00 0.0% automountd/2
       397 root     3592K  560K sleep   59    0   0:00:00 0.0% rpc.metad/1
       268 root     2560K  464K sleep   59    0   0:00:00 0.0% ttymon/1
       407 root       15M 6648K sleep   59    0   0:00:04 0.0% fmd/18
       287 root     2088K  320K sleep   59    0   0:00:00 0.0% smcboot/1
       290 root     2080K  192K sleep   59    0   0:00:00 0.0% smcboot/1
       251 root     9512K 4072K sleep   59    0   0:00:03 0.0% inetd/4
       264 root     2504K  848K sleep   59    0   0:00:00 0.0% ttymon/1
       250 root     2168K  680K sleep   59    0   0:00:00 0.0% sac/1
       289 root     2080K  184K sleep   59    0   0:00:00 0.0% smcboot/1
       210 root     2536K  920K sleep  100    -   0:00:09 0.0% xntpd/1
       238 daemon   2488K 2048K sleep   60  -20   0:00:00 0.0% nfs4cbd/2
       201 root     2920K 1528K sleep   59    0   0:00:00 0.0% cron/1
       233 daemon   2800K  560K sleep   59    0   0:00:00 0.0% rpcbind/1
       132 root     6896K 1816K sleep   59    0   0:00:00 0.0% devfsadm/8
       123 root     2184K  104K sleep   59    0   0:00:00 0.0% drd/2
       113 root     2640K  160K sleep   59    0   0:00:00 0.0% syseventd/14
       244 daemon   2392K  520K sleep   60  -20   0:00:00 0.0% lockd/2
       135 daemon   4632K 2728K sleep   59    0   0:00:00 0.0% kcfd/5
    Many thanks
    Andreas
    Edited by: support team on Mar 7, 2008 1:15 PM

  • Very high memory usage..possible memory leak?  Solaris 10 8/07 x64

    Hi,
    I noticed yesterday that my machine was becoming increasingly slow, where once it was pretty snappy. It's a Compaq SR5250NX with 1GB of RAM. Upon checking vmstat, I noticed that the "Free" column was ~191MB. Now, the only applications I had open were FireFox 2.0.11, GAIM, and StarOffice. I closed all of them, and the number reported in the "Free" column became approximately 195MB. "Pagefile" was about 5.5x that size. There were no other applications running and it's a single user machine, so I was the only one logged in. System uptime: 9 days.
    I logged out, logged back in, to see if that had an affect. It did not. Rebooted and obviously, that fixed it. Now with only FireFox, GAIM, and a terminal open, vmstat reports "Free" as ~450MB. I've noticed if I run vmstat every few seconds, the "Free" total keeps going down. Example:
    unknown% vmstat
    kthr      memory            page            disk          faults      cpu
    r b w   swap  free  re  mf pi po fr de sr cd s0 s1 s2   in   sy   cs us sy id
    0 0 0 870888 450220  9  27 10  0  1  0  8  2 -0 -0 -0  595 1193  569 72  1 28
    unknown% vmstat
    kthr      memory            page            disk          faults      cpu
    r b w   swap  free  re  mf pi po fr de sr cd s0 s1 s2   in   sy   cs us sy id
    0 0 0 870880 450204  9  27 10  0  1  0  8  2 -0 -0 -0  596 1193  569 72  1 28
    unknown% vmstat
    kthr      memory            page            disk          faults      cpu
    r b w   swap  free  re  mf pi po fr de sr cd s0 s1 s2   in   sy   cs us sy id
    0 0 0 870828 450092  9  27 10  0  1  0  8  2 -0 -0 -0  596 1193  570 71  1 28
    unknown%Output of prstat -u Kendall (my username ) is as follows:
       PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
      2026 Kendall   124M   70M sleep   59    0   0:01:47 1.4% firefox-bin/7
      1093 Kendall    85M   77M sleep   59    0   0:07:15 1.1% Xsun/1
      1802 Kendall    60M   15M sleep   59    0   0:00:08 0.1% gnome-terminal/2
      1301 Kendall    93M   23M sleep   49    0   0:00:30 0.1% java/14
      1259 Kendall    53M   15M sleep   49    0   0:00:32 0.1% gaim/1
      2133 Kendall  3312K 2740K cpu1    59    0   0:00:00 0.0% prstat/1
      1276 Kendall    51M   12M sleep   59    0   0:00:11 0.0% gnome-netstatus/1
      1247 Kendall    46M   10M sleep   59    0   0:00:06 0.0% metacity/1
      1274 Kendall    51M   13M sleep   59    0   0:00:05 0.0% wnck-applet/1
      1249 Kendall    56M   17M sleep   59    0   0:00:07 0.0% gnome-panel/1
      1278 Kendall    48M 9240K sleep   59    0   0:00:05 0.0% mixer_applet2/1
      1245 Kendall  9092K 3844K sleep   59    0   0:00:00 0.0% gnome-smproxy/1
      1227 Kendall  8244K 4444K sleep   59    0   0:00:01 0.0% xscreensaver/1
      1201 Kendall  4252K 1664K sleep   59    0   0:00:00 0.0% sdt_shell/1
      1217 Kendall    55M   16M sleep   59    0   0:00:00 0.0% gnome-session/1
       779 Kendall    47M 2208K sleep   59    0   0:00:00 0.0% gnome-volcheck/1
       746 Kendall  5660K 3660K sleep   59    0   0:00:00 0.0% bonobo-activati/1
      1270 Kendall    49M   10M sleep   49    0   0:00:00 0.0% clock-applet/1
      1280 Kendall    47M 8904K sleep   59    0   0:00:00 0.0% notification-ar/1
      1199 Kendall  2928K  884K sleep   59    0   0:00:00 0.0% dsdm/1
      1262 Kendall    47M 2268K sleep   59    0   0:00:00 0.0% gnome-volcheck/1
    Total: 37 processes, 62 lwps, load averages: 0.11, 0.98, 1.63System uptime is 9 hours, 48 minutes. I'm just wondering why the memory usage seems so high to do...nothing. It's obviously a real problem as the machine turned very slow when vmstat was showing 195MB free.
    Any tips, tricks, advice, on which way to go with this?
    Thanks!

    Apologies for the delayed reply. School has been keeping me nice and busy.
    Anyway, here is the output of prstat -Z:
       PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
      2040 Kendall      144M   76M sleep   59    0   0:04:26 2.0% firefox-bin/10
    28809 Kendall     201M  193M sleep   59    0   0:42:30 1.9% Xsun/1
      2083 Kendall      186M   89M sleep   49    0   0:02:31 1.2% java/58
      2260 Kendall       59M   14M sleep   59    0   0:00:00 1.0% gnome-terminal/2
      2050 Kendall       63M   21M sleep   49    0   0:01:35 0.6% realplay.bin/4
      2265 Kendall     3344K 2780K cpu1    59    0   0:00:00 0.2% prstat/1
    29513 Kendall     71M   33M sleep   39    0   0:07:25 0.2% gaim/1
    28967 Kendall     56M   18M sleep   59    0   0:00:24 0.1% gnome-panel/1
    29060 Kendall     93M   24M sleep   49    0   0:02:58 0.1% java/14
    28994 Kendall     51M   13M sleep   59    0   0:00:23 0.1% wnck-applet/1
    28965 Kendall     49M   14M sleep   59    0   0:00:33 0.0% metacity/1
       649 noaccess   164M   46M sleep   59    0   0:09:54 0.0% java/23
    28996 Kendall     51M   12M sleep   59    0   0:00:50 0.0% gnome-netstatus/1
      2264 Kendall    1352K  972K sleep   59    0   0:00:00 0.0% csh/1
    28963 Kendall  9100K 3792K sleep   59    0   0:00:03 0.0% gnome-smproxy/1
    ZONEID    NPROC  SWAP   RSS MEMORY      TIME  CPU ZONE
         0           80          655M  738M    73%       1:18:40 7.7% global
    Total: 80 processes, 322 lwps, load averages: 0.27, 0.27, 0.22Sorry about the bad formatting, it's copied from the terminal.
    In any event, we can see that FireFox is sucking up 145MB (??!?!!? crazy...) XSun, 200MB, and java 190MB. I'm running Java Desktop System (Release 3) so I assume that is what accounts for the the high memory usage RE: java process. But, XSun, 200MB?
    Is this normal and I just need to toss another gig in, or what?
    Thanks

  • Find memory leak

    Hi All ,
    In our SAP application server (Solaris 10 X86 running on hardware HP ProLiant BL685c G5) physical memory available is day to day decreasing drastically. We suspect, there is a memory leak.
    Could you please let us know how to find memory leak in Solaris.
    Regards,
    Rajesh.

    Hi Rajesh
    Memory leaks have a large number of possible causes, including:
    •Unsupported hardware or software
    •Custom Scripting
    •Misconfiguration
    •Third party hardware and software issues
    The prstat command can be used to gather basic performance data to help identify if there are any processes consuming a large amount of memory. For example, the data below is sorted by the SIZE column. SIZE is the total virtual memory size of the process:
    prstat -s size
    If you are experiencing some of the symptoms described above or if you suspect a memory leak, it is particularly important that performance data is captured so the memory leak can be confirmed. It is important to gather at least the following pieces of information:
    •Process ID (PID)
    •Size of the process
    •The executing command
    •The timestamp information showing exactly when the data was captured.
    while true
    do
    for pid in `cat pids`
    do var=`date|cut -d' ' -f4`
    echo "$var :\c" >> ps.log.$pid
    ps -eo pid,vsz,rss,pcpu,args | grep $pid |grep -v grep >> ps.log.$pid
    done
    sleep 30
    done
    You could check the memory utilisation details through
    #mdb -k
    ::memstat
    kmastatRegards
    Sadiq

  • Memory leak when redirecting to a remote XFree86 server

    Hi,
    I'm running a Java application, which controlls our network equipment.
    The application is written by our development team. It installs a graphical
    user frontend in order to allow interoperation with the network administrators.
    The application is run using the following environments:
    * Windows NT 4.0
    * Sun Solaris 8, local Xsun X11 server
    * Sun Solaris 8, XFree86 X11 server located on a linux host
    * Sun Solaris 8, CygWin/XFree86 X11 server running on a Windows NT host
    It turns out, that the application runs fine, if the application and the GUI either
    run both on a Windows NT host or the Sun workstation. However, if the application
    is launched on a Sun workstation and the X display is redirected to any XFree86
    X11 server, each change of the GUI focus - either forced by a mouse-click, or
    an canvas being changed by the application itsself - consumes an amount of
    3 MB of memory and never releases this again.
    So I suppose any memory leak in the Swing/X11 interface ...
    I've already searched SunSolve and installed all patches addressing memory leaks
    in Solaris 8 and Xsun ...
    Also our development team already has profiled the application using tools
    like OptimizeIt without being able to locate any memory leak.
    Has anyboday seen this before? Is there any bugfix/workaround available?
    Thx in advance,
    Jens Hamisch

    We just noticed the same problem for our Swing Applet using JDK 1.4 on Solaris 8 displayed to any remote X server running on Windows 2000 or Linux. If we let the applet run long enough (the plot in the applet updated every second), we could easily use up 500-600 Mb. Again, on the local console on Solaris or Windows 2000 the memory was stable at around 70 Mb.

  • Memory leak in WLS6.1 sp3 on Solaris?

    We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
    JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum heap
    of 512M (-Xms256m -Xmx512m).
    The issue is that we are now seeing (via pmap) the resident memory growing
    to ~1GB. Yet, the WLS management console is reporting memory usage of ~200M.
    So, if we are to believe WLS, then the JVM (or some native library) is
    chewing up the extra memory.
    Having examined the results of "pmap -x <pid>", I see the heap (and some
    anon) mem/file are quite large.
    Address Kbytes Resident Shared Private Permissions Mapped File
    00026000 418912 416096 - 416096 read/write/exec [ heap ]
    D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
    total Kb 1083832 981136 37960 943176
    Questions:
    - Are there any known memory leaks with 6.1 sp3 on Solaris?
    - Should it be possible for pmap's value of "heap" to grow larger than the
    "Xms" setting? We have observed this recently, but the numbers above don't
    reflect this.
    - Any idea what the "anon" is or how to determine what it is?
    - Do you know of any tools that might help me determine what is using that
    memory or what is in it?
    Any suggestions will be greatly appreciated...
    Thanks in advance,
    Erik

    If you set -Xmx512m then the java heap will grow no larger than 512MB.
    WLS is reporting the size of the java heap. (It is a java program after
    all and doesn't know a lot about what native code might be doing.)
    My first thought is try running with Oracle's thin (type-4) driver.
    Since this is java code, it will use the java heap. If the memory usage
    drastically changes, then you can point the finger at the jDriver.
    Are you using any other native code / libraries?
    -- Rob
    Erik Westland wrote:
    We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
    JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum
    heap
    of 512M (-Xms256m -Xmx512m).
    The issue is that we are now seeing (via pmap) the resident memory growing
    to ~1GB. Yet, the WLS management console is reporting memory usage of
    ~200M.
    So, if we are to believe WLS, then the JVM (or some native library) is
    chewing up the extra memory.
    Having examined the results of "pmap -x ", I see the heap (and some
    anon) mem/file are quite large.
    Address Kbytes Resident Shared Private Permissions Mapped File
    00026000 418912 416096 - 416096 read/write/exec [ heap ]
    D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
    total Kb 1083832 981136 37960 943176
    Questions:
    - Are there any known memory leaks with 6.1 sp3 on Solaris?
    - Should it be possible for pmap's value of "heap" to grow larger than the
    "Xms" setting? We have observed this recently, but the numbers above don't
    reflect this.
    - Any idea what the "anon" is or how to determine what it is?
    - Do you know of any tools that might help me determine what is using that
    memory or what is in it?
    Any suggestions will be greatly appreciated...
    Thanks in advance,
    Erik

  • Memory leak in xerces on Solaris platform

    We are seeing memory leaks with xerces 2.5.0 on the Solaris platform. Has anyone encountered a similar problem and is there a fix for it.

    I have seen other apps sucessfully running in AppStore. Is there something which I am missing ??????. Help me with the issue Guys.......... it's putting  me out of businness.

  • Memory Leak in 8.1.6.0.1 JDBC/OCI for Solaris

    Hello,
    there is a memory leak in the 8.1.6.0.1 JDBC-OCI driver for solaris.
    The leak causes your jvm to eat up all memory
    if you reuse callable statements
    (calling one statement multiple times with
    different values).
    The thin driver has no such problem. Is
    there any fix available ?

    Ok. The code spans multiple classes and
    most of it comes from a customized version
    of the Enhydra Java Application server.
    I have a class called "StandardDBConnection"
    which caches CallableStatements and is a
    wrapperclass for java.sql.DBConnection. The
    interesting method here is "prepareCall":
    * Get a callable statement given an SQL string. If the statement is
    * cached, return that statement, otherwise prepare and save in the
    * cache.
    * @param sql The SQL statement to be called.
    * @return a new CallableStatement object containing the
    * pre-compiled SQL statement.
    * @exception java.sql.SQLException If a database access error occurs
    * statement.
    public synchronized CallableStatement prepareCall(String sql)
    throws SQLException {
    PreparedStatement preparedStmt;
    logDebug ("Prepare call: " + sql);
    validate();
    preparedStmt = (PreparedStatement)preparedStmtCache.get(sql);
    // Check if the object returned by the cache really is a
    // callable statement. if it is not, someone did call first
    // prepareStatement() and now prepareCall() with the same
    // sql. Silently replace the existing cache entry by a
    // callable statement in this case.
    if (preparedStmt instanceof CallableStatement) {
    preparedStmt.clearParameters();
    else {
    // Need to close the old PreparedStatement in case we have to
    // replace it with a CallableStatement
    if (preparedStmt != null) {
    preparedStmt.close();
    else if (preparedStmtCache.size() >= maxPreparedStmts) {
    String key = (String)preparedStmtCache.keys().nextElement();
    ((PreparedStatement) preparedStmtCache.remove(key)).close();
    preparedStmt = connection.prepareCall(sql);
    preparedStmtCache.put(sql, preparedStmt);
    return (CallableStatement)preparedStmt;
    The statements get closed when I close the
    connection:
    boolean closeStmts = true;
    // Close the prepared statements.
    Enumeration e = preparedStmtCache.keys();
    while (e.hasMoreElements() && closeStmts) {
    String key = (String)e.nextElement();
    try {
    ((PreparedStatement)
    preparedStmtCache.remove(key)).close();
    } catch (SQLException except) {
    // Ignore errors, we maybe handling one.
    closeStmts = false;
    log.write(Logger.NOTICE,
    "DBConnection[" + id + "]: " + url +
    "\nUnable to close statements. Continuing....\n");
    In my classes using database queries I just
    use the prepareCall method of DBConnection
    and do not have to care about anything.
    Works perfectly with the thin driver, but
    as soon as I switch to oci... :-|
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDBC Dev Team:
    Soda, Rupper,
    Do you mind posting some code that shows us what your code was doing when you notice this leak?
    Thanks.<HR></BLOCKQUOTE>
    null

  • Memory Leak with 4.5.1/Java/Solaris

    Hi,
    We are currently running a Java Application using RMI/Weblogic 4.5.1/Solaris 5.7/Java 1.22.
    Behavior that has been observered during the day is that memory usage reaches a stage in which it begins increasing and GC doesn't recover any memory, until the heap reaches an extremly large size, then recovers a significant amount of memory.
    We have even seen the java process grab more memory than specified in the -Xmx parameter and experience a java.lang.OutOfMemory error.
    I have seen postings that describe similar issues in this newsgroup, but none that define a solution.
    This problem is intermittent, and our application can run an entire day without experiencing this memory leak. On the other hand there are days when the memory leak occurrs even when the system is idle overnight.
    Please let me know any information you have gathered on this subject.
    Regards,
    Mark Evans

    try increasing your virtual memory on your NT system...
    "Parasher K. Joshi" <[email protected]> wrote:
    >
    Hi,
    I observed the same confusing stuff in my tests. But I run weblogic 4.5.1 on Windows NT with JDK 1.2.2-w
    Usually, I would get a "Low virtual memory" message from windows
    and if I click ok & shuffle thourgh my windows I would be ok.
    But since last 2 days, I would keep the server running overnight.
    When I return in morning,
    I would find a "Low virtual memory" message and
    on clicking OK. I would find another message tell me that java.exe (which was running weblogic) crashed!!
    Now today I tried to watch the memory usage in Task Manager. And I found the most wierd thing.
    I saw that even when the system was doing virtually nothing,
    except print a string at intervals, the memory usage would go
    up steadyly.
    Even doing a forced finalization and gc did not seem to stop it.
    BUT, BY CHANCE I HAPPEN TO MINIMISE AND MAXIMISE THE WEBLOGIC
    CONSOLE OUTPUT WINDOW.
    WHAT I SAW IN THE TASK MANAGER AMAZED ME!
    THE MEMORY USAGE IN TASK MANAGER HAD GONE DOWN TO 24XXKB, WHILE
    IT WAS ABOUT 20000K OR EVEN MORE.
    This seems to support the fact that during my test, I would
    get the "low virtual memory" message and if OKed it and shuffled
    though application windows (maybe minimise, maximise the weblogic
    console output window in process), I would be able to complete
    my application. But when the message appears during night runs,
    nothing is done and by morning, when I reach to work,
    I would see that weblogic had crashed!!
    You may try that and see if it helps you.
    Parasher
    Mark Evans <[email protected]> wrote:
    Hi,
    We are currently running a Java Application using RMI/Weblogic 4.5.1/Solaris 5.7/Java 1.22.
    Behavior that has been observered during the day is that memory usage reaches a stage in which it begins increasing and GC doesn't recover any memory, until the heap reaches an extremly large size, then recovers a significant amount of memory.
    We have even seen the java process grab more memory than specified in the -Xmx parameter and experience a java.lang.OutOfMemory error.
    I have seen postings that describe similar issues in this newsgroup, but none that define a solution.
    This problem is intermittent, and our application can run an entire day without experiencing this memory leak. On the other hand there are days when the memory leak occurrs even when the system is idle overnight.
    Please let me know any information you have gathered on this subject.
    Regards,
    Mark Evans

  • Memory leak detecting tools for Solaris 10 X86

    Hi All,
    Greetings!
    We are experiencing a crash defect while porting our application from Sol4 to Sol10.
    Stack trace :
    (dbx) where
    =>[1] realfree(0x81b7d60), at 0xfeac3237
    [2] freeunlocked(), at 0xfeac37e9
    [3] free(0x831f1a8), at 0xfeac376f
    [4] tLList_Done(0x831f1a8), at 0x8074255
    [5] tKeyFile_Free(0x8306c60), at 0x8075af5
    [6] tKeyFile_Done(0x8306c60), at 0x8075c6c
    [7] tBGA_Var_Adj_LD(0x81b5eb0, 0x8302b48, 0x0), at 0x807a5f7
    [8] tGen_Var_GenLead(0x81b5eb0, 0x8302b48, 0x0, 0x1), at 0x807b6e7
    [9] tBGA_Var_GenLead(0x81b5eb0, 0x8302b48, 0x0, 0x1), at 0x807a7f8
    [10] tCPD_DevProc_Init_Lead(0x825e6e8, 0x8302b48, 0x0, 0x1), at 0x809b363
    [11] tCPD_DevProc_Init_Data(0x825e6e8, 0x8302b48, 0x0, 0x0, 0x0, 0x0, 0x1), at 0x809b970
    [12] TrayRep_Execute(0x81b1cb4), at 0x80aab45
    [13] TrayRep_RunFrom(0x0, 0x0), at 0x80a997a
    [14] main(0x0, 0x804770c, 0x8047710), at 0x80a946a
    We suspect it to be a memory leak issue. Are there memory leak debugging tools for sol10.
    we were unable to use dbx as we got the following error.
    (dbx) check -memuse
    dbx: Incompatible libthread.so/libthread_db.so found. Error checking disabled
    See `help rtc mt' for details.
    Also dbx's 'check -access' option is not supported for X86.
    Waiting eagerly for any support/guidance.
    Thanks in advance.
    Deepak

    I had the same problem on Solaris 10 sparc. The problem seems to relate to symbolic links with
    long names not being extracted correctly from the tar file (resulting in @LongLink files popping
    up around the place). If you use the .zip source file then the build goes fine.
    Philip.

  • Memory leak using 10.2.0.3 OCCI client on Solaris 10

    Hi,
    We are using OCCI client libraries to connect our C++ program to the Oracle Database. The program does a lot of selects, inserts and SP calls.
    Oracle client and Oracle server both are 10.2.0.3 on Solaris 10.
    We have been observing a memory leak of 4M bytes in the C++ program every few minutes since last few days. On debugging through Purify, libumem, and Sun Studio 12, we finally managed to narrow down the problem to the Oracle client library OCI calls.
    The Sun Studio leak check shows the following -
    Leak #37, Instances = 157, Bytes Leaked = 655004
    kpummapg + 0x00000098
    kghgex + 0x00000648
    kghfnd + 0x000005BC
    kghalo + 0x00000A6C
    kghgex + 0x000003BC
    kghfnd + 0x000005BC
    kghalo + 0x00000A6C
    kghgex + 0x000003BC
    kghfnd + 0x000005BC
    kghalo + 0x00000A6C
    kpuhhalo + 0x00000558
    kpugdesc + 0x00000AD4
    kpugparm + 0x00000374
    COCIResultSet::InterpretData() + 0x000001B4
    COCIResultSet::COCIResultSet(COCIStatement*,OCIStmt*,OCIError*) + 0x000000A4
    COCIStatement::PrepareResult() + 0x00000190
    A select is executed, a resultset is fetched and the resultset is immeidately closed. The same piece of code has been running at various production systems without any problems. Most of the other sites are either 10.2.0.4 or 9i.
    On searching Metalink and various other forums, I found similar issues faced in 10.2.0.1.
    Could someone advise if there are any bugs corresponding to this which have been closed. Would upgrading to 10.2.0.4 solve the problem?
    Thanks.

    Please ... one post and one post only in the group most appropriate to your inquiry. Please open an SR at metalink.

  • Detecting a memory leak in a process running on Solaris 5.7

    Hi,
    Iam running my application on solaris 5.7 platform.
    I can see clear memory leak in that process.
    Is there any tool or in-built functionality on solaris 5.7 to detect/fix that leak.
    Thanks in advance,
    Avvaru

    Thanks for the reply. I already turned it off in both Safari and Spotlight preferences. However the problem persists. The process still runs, and from time to time it decides to leak all the memory as well. I really can't understand what the reason might be.
    To be clear, in Safari-->Preferences-->Search-->Smart search field-->"Include Spotlight Suggestions" is un-checked. In Spotlight preferences all three "Spotlight Suggestions", "Bookmarks & History" and "Bing Web Searches" are un-checked. Process still runs under Spotlight as can be seen here:
    After the last post I let it run for a while when it happened again, and below is just before i terminated it. Look at the memory usage!

Maybe you are looking for

  • Problem in posting period

    hi, we have not closed the previous period (1/2008), bcoz still some work is pending. Now we want to do goods movement for the present month(2/2008). Can anybody help in this. thanks/regards vish

  • Getting error while importing schema with ORACLE TEXT

    IMP-00003: ORACLE error 20000 encountered ORA-20000: Oracle Text error: DRG-52204: error while registering index DRG-10507: duplicate index name: WORKORDER_Q, owner: SYS ORA-06512: at "CTXSYS.DRUE", line 160 ORA-06512: at "CTXSYS.DRIIMP", line 115 OR

  • Objects/text in pdf from InDesing in Windows looks strange on a mac

    Hey people, I really hope someone can help me. I'm having problems with the pdf documents I create in InDesign CS5 in Windows, when they are viewed in Safari or Firefox on a mac. I export as high quality print and haven't made any other changes in th

  • Custom mapping is obviously not reflected in the Entity Framework designer

    Hi, I use the Oracle Data Provider for .NET 11.2.0.2.50 Beta 3 with the Entity Framework. I added a custom mapping to the app.config that maps NUMBER(1,0) to bool: <oracle.dataaccess.client> <settings> <add name="bool" value="edmmapping number(1,0)"

  • Apple tv wont start up

    Just got a 3rd gen apple tv. Connected to tv and power. Get the apple tv logo for a few seconds then nothing. Do I need to do a restore with a micro usb cable (that i don't have) even though it's straight out of the box?? If so, I won't be buying a m