Trying to track down an apparent kenel memory leak

We are running an application compiled against a third party library and seeing strange memory usage on a Solaris 5.6 box. Program was compiled with the SWPRO 5.0 compiler.
Shortly after boot, freemem (sar -r) nearly disappears:
00:00:01 freemem freeswap
02:07:01 unix restarts
03:00:00 26004 1433872
04:00:00 23040 1430286
05:00:01 19516 1430113
06:00:00 16519 1430008
07:00:00 14335 1429783
08:00:01 12459 1429636
09:00:00 8919 1429468
10:00:00 4188 1429386
11:00:01 694 1429392
It then seems to stay around this level, with freswap dropping about 5000 in 12 hours.
Also, kernel memory allocated continues to rise (sar -k) over several days:
00:00:01 sml_mem alloc fail lg_mem alloc fail 10:05:22 unix restarts
10:20:00 1433600 1151220 0 5021696 4458912 0
23:00:00 1654784 1351760 0 5185536 4616864 0
23:00:00 1900544 1531544 0 7348224 6877536 0
23:00:01 2072576 1684888 0 8183808 7801240 0
23:00:00 2252800 1887580 0 8544256 8157064 0
23:00:00 4849664 4518304 0 8478720 8211544 0
23:00:00 4833280 4469868 0 8511488 8229592 0
However, ps -el does not show any particular process eating up memory.
Eventually the system appears to run out of swap and locks up. I'm at a loss as to where to go next to try to determine what is causing this memory usage. Any ideas?

Hi,
Just to give you another angle, use the crash command to monitor the kernel memory caches. Gather output from this one every 12 or 24 hours so you can see a 'real' growth. Remember it is normal for these to grow somewhat, just not to the point that they eat up all system memory.
# crash
kmastatIf you notice a specific cache growing then you can use the kmausers command to see whats allocating into that cache:
Eg.
kmausers kmem_alloc_48HOWEVER before you can use kmausers you will have to have kmem_flags enabled. To do this add the following line to /etc/system and reboot:
Solaris 2.6 and before:
set kmem_flags=0x1f
Solaris 7 and above:
set kmem_flags=0x3f
Regards,
Ben Humphreys
Sun Australia - Solution Centre

Similar Messages

  • Trying to track down process bound to port ucp/513

    A security audit has detected one of our Solaris 8 servers(Generic_117350-38) has udp port 513 open. I've verified this using nmap and can even see it in netstat output, but can't track down which process is the culprit.
    # netstat -an
    UDP: IPv4
       Local Address         Remote Address     State
    <snip>
          *.32775                               Idle
          *.513                                 Idle
    <snip>
    # nmap  -n -sU -p 513 10.65.11.228
    Starting nmap 3.93 ( http://www.insecure.org/nmap/ ) at 2006-06-30 10:48 NZST
    Interesting ports on 10.65.11.228:
    PORT    STATE         SERVICE
    513/udp open|filtered who
    MAC Address: 08:00:20:EF:88:A4 (SUN Microsystems)
    Nmap finished: 1 IP address (1 host up) scanned in 13.176 secondslsof shows only rlogin stuff on tcp/513:
    inetd       556     root   16u  IPv6 0x30026f653e8        0t0       TCP *:513 (LISTEN)
    in.rlogin 18394     root    0u  IPv4 0x3002785fcd8        0t2       TCP aklxd051-pub:513->aklxp061-pub.airnz.co.nz:729 (ESTABLISHED)
    in.rlogin 18394     root    1u  IPv4 0x3002785fcd8        0t2       TCP aklxd051-pub:513->aklxp061-pub.airnz.co.nz:729 (ESTABLISHED)
    in.rlogin 18394     root    2u  IPv4 0x3002785fcd8        0t2       TCP aklxd051-pub:513->aklxp061-pub.airnz.co.nz:729 (ESTABLISHED)
    in.rlogin 24139     root    0u  IPv4 0x300557e3830        0t2       TCP aklxd051-pub:513->aklxd041-pub.airnz.co.nz:902 (ESTABLISHED)
    in.rlogin 24139     root    1u  IPv4 0x300557e3830        0t2       TCP aklxd051-pub:513->aklxd041-pub.airnz.co.nz:902 (ESTABLISHED)
    in.rlogin 24139     root    2u  IPv4 0x300557e3830        0t2       TCP aklxd051-pub:513->aklxd041-pub.airnz.co.nz:902 (ESTABLISHED)
    rlogin    28865   oracle    5u  IPv4 0x300aaf8ef40   0t167482       TCP aklxd051-pub:975->aklxd041-pub.airnz.co.nz:513 (ESTABLISHED)
    rlogin    28870   oracle    5u  IPv4 0x300aaf8ef40   0t167482       TCP aklxd051-pub:975->aklxd041-pub.airnz.co.nz:513 (ESTABLISHED)All servers have port udp/513 disabled by having the whod line commented out of /etc/services and /etc/inet/inetd.conf.
    I've even stopped inetd temporarily and both nmap and netstat still show udp/513 as being idle/open.
    All other servers show udp/513 as being closed and I can't find any difference on this one server.
    Any help appreciated!

    Hi,
    Just to give you another angle, use the crash command to monitor the kernel memory caches. Gather output from this one every 12 or 24 hours so you can see a 'real' growth. Remember it is normal for these to grow somewhat, just not to the point that they eat up all system memory.
    # crash
    kmastatIf you notice a specific cache growing then you can use the kmausers command to see whats allocating into that cache:
    Eg.
    kmausers kmem_alloc_48HOWEVER before you can use kmausers you will have to have kmem_flags enabled. To do this add the following line to /etc/system and reboot:
    Solaris 2.6 and before:
    set kmem_flags=0x1f
    Solaris 7 and above:
    set kmem_flags=0x3f
    Regards,
    Ben Humphreys
    Sun Australia - Solution Centre

  • Apparent Photoshop Memory Leak

    Over the last couple months I have been having what seems to be a memory leak problem with Photoshop. I'll be working on a document nice as can be, my screen will freeze, go black, then return with my graphics drivers telling me that it has just recovered from a failiure. At this time photoshop will not respond, and I am forced to close it, and lose all the work I have done.
    The crashes usually happen when I am transforming objects, however it has happened while using vector, and raster tools like the pen, and brush.
    I have been having this problem ever since I switched laptops from an Acer Aspire (Pentium 6 integrated win8 4gb RAM), to an Acer V3 (AMD A10 amd radeon 7660m win8 6gb RAM). On my last laptop that was noticably worse in terms of hardware, with this new laptop I've been having worse problems.
    I use CS6 on both systems.
    I have up to date graphics drivers, and I have updated photoshop to the latest patch (as of 16th December).
    I am also not able to limit the amount of vram photoshop is allowed to use through the preferences, and it keeps resetting itself (every time the program crashes).
    Part of me wants to blame the AMD APU that's in their A10 CPU, but I am not able to pin it on that system just yet.

    xzenocrimzie wrote:
    I have up to date graphics drivers
    With an ATI card, unfortunately that's not the right approach.  AMD has fallen on its face lately.  Maybe they lost the guy who knows what he's doing, I don't know.
    Try switching Photoshop's advanced GPU setting to Basic, and close and restart Photoshop.
    If you've already done that, and it's not working, seek out Catalyst 12.8 and see if it's available for Windows 8.  That's a decent (though not perfect) recent version.  You'll have to uninstall the current version first in order to install the earlier one.
    I have some hope for 12.12, but so far they've been completely unresponsive to my reports of problems with 12.10 and the newer betas.  Apparently the Adobe engineering people can't get them to move on these problems either.  Somehow it seems Windows 8 caught them off guard, even though Microsoft had released all those previews.  But don't fret; 12.10 and newer don't work worth a darn in Windows 7 either.
    -Noel

  • Trying to track down network problem

    I'm trying to decide if this is trouble with my mac or my router, so I figured I'd see if anyone here has experienced this.
    Periodically my wireless signal is dying. It only does it, however, when I'm connecting to it with my Mac Book Pro -- my sister's mini has no problem. It does the router in pretty well, requiring reboot.
    Anyone else seen this? I'd have guessed it was a router problem, if it wasn't for the mini not killing the router.

    Uzuri,
    What brand of router do you have? I had a dying Belkin router that exhibited the same symptoms, but it was a G4 iBook that would take it down every few days. I thought it was the computer until other problems occurred. At the end, the router was cutting my internet throughput in half. I replaced the router, and have now gone 2 weeks without losing a wireless signal on three computers and 2 iPhones, and no need to reboot the router at all.
    Does you MBP have problems with routers in other locations, such as at work, school, or coffee shops? If not, I would venture a guess that the router is going.

  • Trying to track down and verify an ip address

    Ok when i have skype open i notice that it polls this IP address
    74.57.165.79 modemcable079.165-57-74.mc.videotron.ca.
    which is a videotron ip in montreal does that jive as a skype location?

    A free app called Fing will tell you what devices are connected to your network and what IP addresses they are using. Rebooting/resetting each of your devices will probably resolve things.
    tt2

  • Trying to track down Activation Code

    A gentleman in our department at work has been using Adobe Premiere Pro since March of 2009. He retired recently and the license was moved over to someone else in the department. The system has been working fine since January, however there has been an upgrade to the PC in the office the software was loaded on, and we need to re install and activate. The problem is no one can find the disk, box it came in, or any emails that would have the activation code. Is there anyway to find out this information?

    Hello,
    first of all you could have a look there: https://www.adobe.com/account.html  >>> see My productsView all >>> These registered products are associated with your Adobe ID. >>> Name >>> Serial number
    If not successful use http://helpx.adobe.com/x-productkb/global/find-serial-number.html  >>> I lost my serial number >> see comment
    Another option would be that you use Contact Customer Care = http://helpx.adobe.com/contact.html, by clicking through the headlines.
    Good luck!
    Hans-Günter

  • Trying to Open Certain InDesign Files Causes Memory Leak Message

    Photoshop and Premiere running fine - as soon as I go to open a certain group of related InDesign files I get the pinwheel spinning, then InDesign shuts down...  Other times it opens the file and when I quickly try to drag the Master pages into a new project I get the "System Application Memory" error and Force Quit window opens.
    I absolutely need to get images from the Master Pages of this InDesign file to a new InDesign file.  They aren't in the package that came with the layout template. 
    I am using Adobe InDesign CC (latest update) - pictured below is my computer's info.
    Thank you for your help!
    NOTE:  by "related files" I mean they are saves of a project that had been building on top of itself over time and was saved as an InDesign project as certain points.

    I tried fixing permissions and then resetting computer's PRAM - the whole rundown...  Issue continues when trying to get any one of the mentioned files open.

  • How to track down php service fault

    I have a small FlashBuilder4 project that runs fine on my local computer under Apache, PHP and MySQL.The first thing it does is populate a DataGrid with data from a MySQL table (the grid's creationcomplete event triggers a PHP service call and has its dataprovider hooked to the callresponder's lastresult property).
    As is often the case, I'm having trouble deploying the project to a remote, hosted server. I have uploaded the Zend framework, the release build, transferred my tables to the remote server, set the paths, etc. After several initial problems I believe I've got the ini file and everything else set up correctly (if I browse to my gateway.php and open it in notepad I get "Zend endpoint" with no errors). I have entered the credentials in each php service file. However, when I browse to the html wrapper page the grid displays fine but the phpservice call is apparently generating a fault. Unfortunately, there is no error information returned by the fault; i.e. the Alert box is blank.
    Can anyone suggest a methodical way of trying to track down what is going on?
    Thanks in advance.

    You cannot. Sorry.  You could try calling it via facetime, if  you have facetime, and listen for the ringing.
    BTW, typing in all caps indicates shouting, is considered rude and is difficult to read.
    Many simply do not read such posts.

  • I am getting a memory leak that sometimes leads to an unresponsive Firefox, but does not crash per se.

    Hello, For the last couple of months, I am having issues with one of my tabs or the program itself causing a memory leak. I was hoping that subsequent releases would fix the problem, but when I downloaded V.11 it did not help.
    I use tab mix plus and at any time, usually have about 25 tabs open. Everything functioned okay for 8 or so months up until recently.
    I am wondering if there is a way to try to track down what is causing the leak. If it is one of my open pages, i will get rid of it. I tried opening one page at a time from scratch, but could not find the issue. .
    I always have flash block enabled to cut down on the website junk.
    using OSX firefox v11.

    Now, I'm not going to say it's an Add-On problem because from the research I've been doing on this problem for the last half hour shows that everyone has DIFFERENT add-ons, but everyone's having the SAME problem....
    So I went through my add-ons and disabled them one by one, and the single add-on that has been giving me grief is the latest WOT add-on. So, I have Firefox 11 (so does my wife) and we both have the WOT add-on. But that's where the similarity ends... I have Windows 7 x64, she has Windows XP x86.... but she doesn't have the memory leak problem.
    What I see is a sawtooth pattern over time. Memory goes up a little over 30+ seconds, then drops down. But over half an hour, the peaks of the sawtooth are larger, and it doesn't drop back down to the same level again - always a little more than before. And before you know it, FF is peaking at 1.5+GB, dropping down to 1.2GB... and FF is running very, very slowly.... excessive disk accesses (paging probably, though I apparently I still have 1.5 to 2.0 GB of free RAM). Killing FF frees it all up, and if I open FF again, it's back to using 250MB of RAM.
    So, it's not the add-ons per se, but how they're interacting with FF (or the other way round).... most likely, it's this plug-in container they created to stop add-ons from taking FF with them when they crashed. Seems to have created more problems than it has solved..... would be great if you could choose not to use it....

  • Memory leak with ThreadStackTrace in libjvm.so (jdk 1.5.0_11)

    I posted this initially in "Desktop > Runtime Environment > Java Runtime Environment (JRE)", but am reposting here since this may be a more appropriate place. Here's a link to the original post:
    http://forum.java.sun.com/thread.jspa?threadID=5156031&tstart=0
    I'm trying to track down the cause of some memory growth in a java application. In my tests, the java heap appears to remain stable, but the overall memory footprint of the jvm process continues to grow (observed with pmap).
    I've run my application with libumem and have found what appears to be the culprit, but the memory allocation is in libjvm.so and I'm looking for ideas what might cause it.
    uname -a for my host
    SunOS thehost 5.10 Generic_118822-18 sun4u sparc SUNW,Netra-440
    and I'm using Java 1.5.0_11
    Here is the trace from libumem:
    1f81c4c0::bufctl_auditADDR BUFADDR TIMESTAMP THREAD
    CACHE LASTLOG CONTENTS
    1f81c4c0 1f81a470 ac018b4577a0 7
    1f43f188 8cda6a4 0
    libumem.so.1`umem_cache_alloc+0x210
    libumem.so.1`umem_alloc+0x60
    libumem.so.1`malloc+0x28
    libjvm.so`void*os::malloc+0x28
    libjvm.so`void*ResourceObj::operator new+0x38
    libjvm.so`ThreadStackTrace::ThreadStackTrace #Nvariant 1+0x34
    libjvm.so`void VM_ThreadDump::doit+0xcc
    libjvm.so`void VM_Operation::evaluate+0x80
    libjvm.so`void VMThread::run+0x6e0
    libjvm.so`void*_start+0x208
    libc.so.1`_lwp_start
    It looks like this leak occurrs when getStackTrace() is called on a Thread.
    I've found that the included program will continually allocate memory on the process heap until the JVM cannot allocate memory and it exits with the following exception.
    Exception java.lang.OutOfMemoryError: requested 16 bytes for C_Heap: ResourceOBJ. Out of swap space?
    import java.lang.StackTraceElement;
    import java.lang.Thread;
    public class TraceIt {
    public static void main(String[] args) {
    System.out.println("Starting trace");
    int i = 0;
    while (true)
    if (i%100 == 0) System.out.println(i);
    StackTraceElement[] se = Thread.currentThread().getStackTrace();
    i++;
    } Any ideas what would cause this? Is it a JVM bug?

    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6469701
    BTW, when you register to post on this site why isn't Cuba in the list of countries?

  • Memory Leak with GotoAndStop()

    I am trying to track down a solution to a memory leak within an embedded video.  If I embed a video on the timeline and then run gotoAndStop or gotoAndPlay to a specific frame every time the frame changes it takes in more memory until it crashes at about 1.7GB however if I run a straight play() on the same clip the memory usage remains constant.  I have also tried System.gc() as it is an AIR App and have tried unloadAndStop() with the embeded video being loaded into a Loader and neither can reclaim any memory.
    I am looking for a a way to resolve the memory leak or another way to be able to rapidly jump to specific frames of video as far as I know this is not possible with external flvs.
    Thanks
    Dave

    video is much like a .gif file.  if you start at frame 0 and jump to frame 30 it needs to redraw what it does nt have in frame 30  which means tellign it to start at frame 30 is the same as telling it to get all information from when it last changed which might be frame 27 to complete the frame of what should display on frame 30.
    this is why its slow to play backwards.  and best to play an flv forward.
    what i would suggest if you do not need video persay, would be to use png sequences.  but if your videos are long then i suppose it would be a greater advantage to keep it compressed.
    what is the quality as well of the video and its size and your frame rate?
    You mention that you are creating a 3d view, how is that?  do you use more than 1 swf ?
    I still think this does not sound like a play head issue, since the video is already compiled.

  • JVM 1.5.0_11 and libumem -- need stack trace help for memory leak

    I'm trying to track down the cause of some memory growth in a java application. In my tests, the java heap appears to remain stable, but the overall memory footprint of the jvm process continues to grow (observed with pmap).
    I've run my application with libumem and have found what appears to be the culprit, but the memory allocation is in libjvm.so and I'm looking for ideas what might cause it.
    uname -a for my host
    SunOS thehost 5.10 Generic_118822-18 sun4u sparc SUNW,Netra-440
    Here is the trace from libumem:
    1f81c4c0::bufctl_auditADDR BUFADDR TIMESTAMP THREAD
    CACHE LASTLOG CONTENTS
    1f81c4c0 1f81a470 ac018b4577a0 7
    1f43f188 8cda6a4 0
    libumem.so.1`umem_cache_alloc+0x210
    libumem.so.1`umem_alloc+0x60
    libumem.so.1`malloc+0x28
    libjvm.so`void*os::malloc+0x28
    libjvm.so`void*ResourceObj::operator new+0x38
    libjvm.so`ThreadStackTrace::ThreadStackTrace #Nvariant 1+0x34
    libjvm.so`void VM_ThreadDump::doit+0xcc
    libjvm.so`void VM_Operation::evaluate+0x80
    libjvm.so`void VMThread::run+0x6e0
    libjvm.so`void*_start+0x208
    libc.so.1`_lwp_start
    What causes this invocation in the JVM? Is there a known memory leak associated with this?
    Thanks in advance for the assistance.

    More on this issue. The included program will continually allocate memory on the process heap until the JVM cannot allocate memory and it exits with the following exception.
    Exception java.lang.OutOfMemoryError: requested 16 bytes for C_Heap: ResourceOBJ. Out of swap space?
    import java.lang.StackTraceElement;
    import java.lang.Thread;
    public class TraceIt {
         public static void main(String[] args) {
              System.out.println("Starting trace");
              int i = 0;
              while (true)
                   if (i%100 == 0) System.out.println(i);
                   StackTraceElement[] se = Thread.currentThread().getStackTrace();
                   i++;
    }

  • Memory Leak - macromedia.util.UtilPagedTempBuffer

    Hi,
    I've been trying to track down a slow memory leak on a ColdFusion 8 server for a month, and have stalled a bit.
    I've been through all the usual techniques for debugging memory leaks in coldfusion, without any success, so I started using Java memory Profilers to see what's clogging up the heap.
    I've been using the MAT plugin for eclipse, and it keeps pointing to the macromedia.util.UtilPagedTempBuffer class as the problem. The retained size of each instance isn't too large at about 66k, but thousands of them can build up in a few days, which causes the problem. For some reason, the instances of this class just aren't being released for garbage collection.
    I'm stuck now, as googling this class doesn't give me any further information.
    I would appreciate any information you have on this class, even just knowing the basics of what it does? Any explanation as to why it doesn't clear would help a lot.
    Thanks in advance

    Thanks for the reply.
    There shouldn't be any file uploads going on, so I'm starting to think it could be an sql issue.
    Although googling this class only seemed to bring it up in stack traces, the adjacent stack places seemed to be SQL related classes.
    I'm starting to think that it's either a problem with the SQL drivers or some configuration setting I've used for the datasource.
    I'm using CF8 standard on a 64bit windows vps (iis running in 32bit compatiblity mode). The database is MS SQL 2005, presumably running as a 64bit application.
    Do you think this could be the issue? Is it worth changing the database drivers (and how would I go about this)?

  • Fortran memory leaks

    I'm trying to determine whether we have any memory leaks in our Fortran 95 program using check -leaks. We use several allocate and deallocate statements and using the showleaks command in dbx does show a memory leak, but nothing seems to change whether deallocate is used or not. Does check -leaks work correctly for Fortran memory leaks? We're using deallocate(obj.array) where the array is allocatable and obj is nullified after deallocating. Removing the deallocate statement doesn't increase the number of leaks reported.
    Also, I'd like to clarify when Fortran memory leaks are possible. It is my understanding that local allocatable arrays (when not saved) are automatically deallocated when they go out of scope. Is this true? Do I only need to worry about memory leaks from global variables (i.e., declared in modules)?

    Local allocatable variables in a subroutine or function are freed when the program exits the subprogram. If an allocatable variable is allocated, it cannot be freed without an intervening deallocation. Pointers are more likely to be the cause of leaks than allocatable variables. Leaks of allocatable variables are possible in mixed language programs. For example, if a C program does a longjmp over a Fortran subprogram that allocated an allocatable variable, the allocatable variable will not be deallocated.
    Dbx might report a possible leak for reasons other than explicitly allocated variables that are not deallocated. For example, if a file is opened and is not closed before execution terminates, the i/o buffer allocated for the file might not be freed and might be reported as a leak.
    Bob Corbett

  • Tracking down a memory leak in LV8.2 when you can't use the profiler

    I am working with this large application. I have satisfied myself that it does have a memory leak by watching the Window's Task Manager while using the app.
    My first preference is to use the Profiler. However when I press 'Start' on the profiler, it instantly crashes LV. It does not do this for all VIs. I have tried to find the offending VI as narrowly as possible, but a VI that crashes profiler on one machine doesn't on another, so I gave that path up.
    If someone knows of a thread about the profiler crashing, please point me that way.
    Failing that, what kind of tips are there for tracking this leak down?
    Thanks!

    Hiya,
    Don't know of anything that will crash the profiler right off-hand, but it never struck me as the most... ah, robust bit of code in LV.
    As far as pre-existing tools, you could try the memmon.llb that lives in the National Instruments/<labview>/examples folder.  It should show the memory load of each vi in memory, though it may require a little retooling to get things into a view that you like.
    If you're on Windows, there are a number of tricks you can play with the SysInternals (now Microsoft) tools.  This usually boils down to watching lower level accesses to the operating system for patterns that look suspicious.  Not a high yield path, but occasionally it works.
    For methods, I like divide and conquer.  The more portions you can eliminate as NOT having the problem, the fewer portions of your code you have left to look for problems in.
    Tracking down memory leaks can be very difficult, but most show up in the end.
    Good bug hunting!
    Joe Z.

Maybe you are looking for

  • Acrobat Pro 9 - Chose Greyscale in print properties, but it is not changing it to greyscale

    Acrobat Pro 9 - Chose Greyscale in print properties, but it is not changing it to greyscale.  I tried to go through all the settings, but I cannot figure it out.  I am printing a color PDF document to a greyscale document. Not sure if I am in the cor

  • Error importing 11.2.0.1 export to 11.2.0.3

    Hi all, we have two machines. let's call them db_1 and db_2. db_1 has version 11.2.0.1, db_2 is a clone of db_! and has been updated by our dba to 11.2.0.3. Now I need move a schema with its data from db_1 to db_2. I used datapump for creating the ex

  • Images are not loaded in KM Navigational iViews

    Hi All I have uploaded documents & folders in Content Management. Created KM navigational iViews, assigned to pages, worksets & role. Role has been granted to other users, and when they click on the role, images of documents types are not loaded. Whe

  • MTO Process : Values shown in Balance sheet

    Dear Experts, One of my client using MTO process in PP. In MTO first create Sales Order. On base of Sales Order then create Production Order. After complition of Production order & at the time GRN of production Order Raw Material Cost & Production co

  • Console: PS CS5 - can't allocate region

    System 10.6.3; 8 gigs RAM, 32-bit PSCS5, 100% of 2100Megs allocated No crashes but -thousands- of these console entries: 5/9/10 2:28:04 PM [0x0-0x80080].com.adobe.Photoshop[2104] Adobe Photoshop CS5(2104,0xa00224e0) malloc: *** mmap(size=11284480) fa