Memory leak and char[] ?

Hello all,
I'm not sure whether this post should be here or in WebLogic section, so correct me if I'm wrong.
I'm working on JDeveloper 11.1.1.3 while deployments are made on standalone WebLogic 10.3.3. This thing occurred in previous versions also.
With every deployment WebLogic increases it's used memory until the famous PermGen space error, which is after about 5-6 deployments.
I'm doing my best to understand how to use memleak detection tools. I've switched JDev and WL from Sun jdk which was used before to JRockit, same thing happens. Both JDev's memory profiler and JRockit mission control show something that I really do not understand. char[] uses around 30% of heap space and keeps growing with deployments, next is String with 8%. I never use char in app.
Am I looking at the wrong thing? Is it normal for char[] to increase on WebLogic on deployments? Does anyone know how to check other things and what to check? Someone on other forums mentioned it would be useful to check if ApplicationContext keeps initializing over again on deployments. Does anyone know how to check this?
One more thing, I have successfully deployed app on Tomcat, and Tomcat said there is a memory leak in app, but could not tell anything specific.
I'm kinda lost in this :(

It is normal for the PermGen space of the Sun's JVM to get filled after several re-deployments. PermGen stands for "permanent generational". This space is used by classes that is unlikely to need to be garbage-collected, so they are placed in this memory space that is never garbage-collected (for example, the Class instances). When you redeploy an application, a new class loader instance is used and it instantiates new Class instances that fill up the PermGen space. But why this happens on JRockit either, I could not explain.
We have experienced memory leaks related to classes and components that use native memory. For example, we have had significant memory leak when using Oracle's JDBC OCI driver. We were not able to solve this problem, so we switched to JDBC Thin driver (which is very performant and stable today comparing to some years ago). If you are using Oracle JRockit, you can monitor the overall memory usage by the following JRockit command executed at OS command line:
jrcmd <jrockit_pid> print_memusage>where <jrockit_pid> should be replaced by the JVM process ID.
If you suspect existence of native memory leaks, then have a look at the article Thanks for the memory for explanations about how Java uses native memory.
Dimitar

Similar Messages

  • Firefox has a memory leak and I need to update it, but I want to keep 3.5 because I don't like how the newest version of Firefox is set up.

    My computer is running low on RAM, and when I look at what processes are using the most memory, firefox is the number one using between 28,000 to 93,000k, so I'm guessing that it has a memory leak.
    And because of that memory leak I have to update firefox, however I really dislike the newest version of firefox and I'd prefer to stick with the version I have, which is 3.5.

    Often the memory problems are not just from Firefox in isolation, but partly relating to all the extensions available for it and then the videos and animations it runs on media rich sites.
    The first thing to do is to upgrade to firefox 3.6 which is at least a supported version (Maybe not for much longer)
    * see [[updating firefox]]
    Next version after 3.6 is 4, you should avoid that, it did have some memory problems, that were worse than 3,6 and firefox 4 is no longer secure or supported.
    The techies at Firefox have been working on memory problems recently and have made many improvements, but some of these improvements are only seen in the trial versions of Firefox.
    I would in fact suggest you upgrade to Firefox 5 the current release version (soon to be replaced with Firefox 6)
    I am able to run Firefox v3.6 to v8 on legacy XPs with less than 1GB RAM. Firefox in itself is not necessarily very demanding in terms of RAM. I am not sure what the figures are you are quoting, or whether they are high. ( Note 1Gb is in the order of 1 000 000 k )
    As for not liking the set-up of new versions of Firefox, there is quite abit that can be changed, maybe you would be able to configure it more to your liking with little effort.

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

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

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

  • Yosemite and Mail massive memory leak and excessive CPU usage

    I've just installed Yosemite and upgraded to 10.10.2 via the AppStore. Now I have a problem with Mail sucking up all the CPU (>106% !) and memory (>8Gb and rising while doing nothing). Everything runs fine when I quit Mail. Very disturbing behaviour!
    I've tried several suggestions found elsewhere on the board here, such as turning off and even removing all Mail plug-ins including SpamSieve, but without positive results. I've tried un-selecting 'Store draft msgs on server', as well as the option for junk and sent msgs. but again without any difference. Going Offline within Mail also makes no difference to its memory hogging or CPU usage.
    I notice this is an issue that's been around since last year (wish I'd known that before upgrading to Yosemite today) and I am just completely flabbergasted that it still exists. Would've thought Apple'd have fixed it in the first but certainly in the second incremental OSX Yosemite release.
    Is there anything else I could try that's proven to be effective in stopping Mail's massive memory leak?

    Okay, I've run Disk Util and restarted. Seems to have made a little bit of a difference to the RAM gobbling in that it appears to be going at a slower rate, but it's still up at around the 45Gb after an hour. Here's the EtreCheck report in the hope that it helps.
    EtreCheck version: 2.1.6 (109)
    Report generated 28 January 2015 4:38:22 pm AEDT
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
        MacBook Pro (Retina, 15-inch, Mid 2014) (Technical Specifications)
        MacBook Pro - model: MacBookPro11,3
        1 2.5 GHz Intel Core i7 CPU: 4-core
        16 GB RAM Not upgradeable
            BANK 0/DIMM0
                8 GB DDR3 1600 MHz ok
            BANK 1/DIMM0
                8 GB DDR3 1600 MHz ok
        Bluetooth: Good - Handoff/Airdrop2 supported
        Wireless:  en0: 802.11 a/b/g/n/ac
        Battery Health: Normal - Cycle count 16
    Video Information: ℹ️
        Intel Iris Pro
            Color LCD spdisplays_2880x1800Retina
        NVIDIA GeForce GT 750M - VRAM: 2048 MB
    System Software: ℹ️
        OS X 10.10.2 (14C109) - Time since boot: 1:1:19
    Disk Information: ℹ️
        APPLE SSD SM0512F disk0 : (500.28 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
            Macintosh HD (disk1) / : 499.05 GB (413.24 GB free)
                Core Storage: disk0s2 499.42 GB Online
    USB Information: ℹ️
        Apple Internal Memory Card Reader
        Asmedia ASM107x
            Asmedia ASM107x
        Apple Inc. Apple Internal Keyboard / Trackpad
        Apple Inc. BRCM20702 Hub
            Apple Inc. Bluetooth USB Host Controller
        Asmedia ASM107x
            Asmedia ASM107x
                Logitech Logitech USB Optical Mouse
                Apple, Inc. Keyboard Hub
                    Apple, Inc Apple Keyboard
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Configuration files: ℹ️
        /etc/hosts - Count: 2
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Kernel Extensions: ℹ️
            /Applications/DiskWarrior.app
        [not loaded]    com.alsoft.Preview (5 - SDK 10.5) [Support]
            /Applications/ibVPN.app
        [not loaded]    net.tunnelblick.tap (1.0) [Support]
        [not loaded]    net.tunnelblick.tun (1.0) [Support]
            /Library/Extensions
        [loaded]    at.obdev.nke.LittleSnitch (4231 - SDK 10.8) [Support]
        [loaded]    com.sophos.kext.sav (9.2.50 - SDK 10.8) [Support]
        [loaded]    com.sophos.nke.swi (9.2.50 - SDK 10.8) [Support]
        [loaded]    jp.plentycom.driver.SteerMouse (4.2.2 - SDK 10.6) [Support]
    Problem System Launch Agents: ℹ️
        [killed]    com.apple.AirPlayUIAgent.plist
        [killed]    com.apple.CallHistoryPluginHelper.plist
        [killed]    com.apple.CallHistorySyncHelper.plist
        [killed]    com.apple.cloudd.plist
        [killed]    com.apple.icloud.fmfd.plist
        [killed]    com.apple.nsurlsessiond.plist
        [killed]    com.apple.pluginkit.pkd.plist
        [killed]    com.apple.security.cloudkeychainproxy.plist
        [killed]    com.apple.spindump_agent.plist
        [killed]    com.apple.telephonyutilities.callservicesd.plist
        10 processes killed due to memory pressure
    Problem System Launch Daemons: ℹ️
        [killed]    com.apple.awdd.plist
        [killed]    com.apple.ctkd.plist
        [killed]    com.apple.icloud.findmydeviced.plist
        [killed]    com.apple.ifdreader.plist
        [killed]    com.apple.nehelper.plist
        [killed]    com.apple.nsurlsessiond.plist
        [killed]    com.apple.softwareupdated.plist
        [killed]    com.apple.wdhelper.plist
        8 processes killed due to memory pressure
    Launch Agents: ℹ️
        [running]    at.obdev.LittleSnitchUIAgent.plist [Support]
        [not loaded]    com.adobe.AAM.Updater-1.0.plist [Support]
        [running]    com.adobe.AdobeCreativeCloud.plist [Support]
        [running]    com.sophos.uiserver.plist [Support]
    Launch Daemons: ℹ️
        [running]    at.obdev.littlesnitchd.plist [Support]
        [running]    com.adobe.adobeupdatedaemon.plist [Support]
        [loaded]    com.adobe.fpsaud.plist [Support]
        [loaded]    com.microsoft.office.licensing.helper.plist [Support]
        [running]    com.sophos.common.servicemanager.plist [Support]
        [running]    com.synium.cleanappdaemon.plist [Support]
        [running]    com.syniumsoftware.CleanAppDaemon.plist [Support]
    User Launch Agents: ℹ️
        [loaded]    com.adobe.ARM.[...].plist [Support]
        [running]    com.c-command.SpamSieve.LaunchAgent.plist [Support]
        [loaded]    com.google.keystone.agent.plist [Support]
        [not loaded]    com.linotype.FontFolderProtector.plist [Support]
        [failed]    com.wondershare.mobilegodaemon.plist [Support]
        [not loaded]    info.lokiware.attachmenttamer.cleanup.plist [Support]
        [invalid?]    info.lokiware.attachmenttamer.setupagent.plist [Support]
    User Login Items: ℹ️
        Letter Opener Updater    Application  (/Library/Mail/Bundles/Letter Opener.mailbundle/Contents/Resources/Software Update.app)
        iTunesHelper    Application  (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
        Default Folder X Helper    Application Hidden (/Users/[redacted]/Library/PreferencePanes/Default Folder X.prefPane/Contents/Resources/Default Folder X Helper.app)
        FontExplorer X Pro    Application Hidden (/Applications/FontExplorer X Pro.app)
        Calendar    Application Hidden (/Applications/Calendar.app)
        SteerMouse Manager    Application  (/Applications/Utilities/SteerMouse.app/Contents/MacOS/SteerMouse Manager.app)
        Mail    Application Hidden (/Applications/Mail.app)
        Android File Transfer Agent    Application  (/Users/[redacted]/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app)
        DiskWarriorStarter    Application  (/Applications/DiskWarrior.app/Contents/Helpers/DiskWarriorStarter.app)
        finderpop-daemon    Application  (/Users/[redacted]/Library/PreferencePanes/FinderPop.prefPane/Contents/Resource s/finderpop-daemon.app)
        XtraFinder    Application Hidden (/Applications/XtraFinder.app)
    Internet Plug-ins: ℹ️
        AdobeAAMDetect: Version: AdobeAAMDetect 2.0.0.0 - SDK 10.7 [Support]
        FlashPlayer-10.6: Version: 16.0.0.296 - SDK 10.6 [Support]
        QuickTime Plugin: Version: 7.7.3
        AdobePDFViewerNPAPI: Version: 11.0.10 - SDK 10.6 [Support]
        AdobePDFViewer: Version: 11.0.10 - SDK 10.6 [Support]
        Flash Player: Version: 16.0.0.296 - SDK 10.6 [Support]
        Default Browser: Version: 600 - SDK 10.10
        SharePointBrowserPlugin: Version: 14.4.7 - SDK 10.6 [Support]
    User internet Plug-ins: ℹ️
        iGetter Plugin: Version: 2.9.3 [Support]
        iGetterScriptablePlugin: Version: 2.9.3 [Support]
    Safari Extensions: ℹ️
        1Password [Installed]
        iGetter Extension [Installed]
    3rd Party Preference Panes: ℹ️
        Default Folder X  [Support]
        FinderPop  [Support]
        FUSE for OS X (OSXFUSE)  [Support]
        SteerMouse  [Support]
    Time Machine: ℹ️
        Time Machine not configured!
    Top Processes by CPU: ℹ️
          105%    Mail
            3%    WindowServer
            2%    sysmond
            2%    Activity Monitor
            0%    fontd
    Top Processes by Memory: ℹ️
        4.10 GB    Mail
        103 MB    Finder
        86 MB    SophosScanD
        86 MB    InterCheck
        86 MB    WindowServer
    Virtual Memory Information: ℹ️
        84 MB    Free RAM
        2.92 GB    Active RAM
        2.87 GB    Inactive RAM
        2.76 GB    Wired RAM
        2.57 GB    Page-ins
        23 MB    Page-outs
    Diagnostics Information: ℹ️
        Jan 28, 2015, 03:37:41 PM    Self test - passed
        Jan 28, 2015, 02:49:01 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/Android File Transfer Agent_2015-01-28-144901_[redacted].crash
        Jan 28, 2015, 09:31:04 AM    /Library/Logs/DiagnosticReports/Mail_2015-01-28-093104_[redacted].cpu_resource. diag [Details]
        Jan 28, 2015, 07:39:17 AM    /Library/Logs/DiagnosticReports/AdobeCrashDaemon_2015-01-28-073917_[redacted].c rash
        Jan 27, 2015, 07:54:29 PM    /Library/Logs/DiagnosticReports/AdobeCrashDaemon_2015-01-27-195429_[redacted].c rash

  • Flash player 11.6 r602 memory leak and crash in FF 19.0

    I have seen similar questions like this but have never witnessed it myself until today when Flash updated on FF 19.0. I'd like to see if this is Firefox or Adobe as the later is quick to say "this is normal".
    I watch two streams (uStream and live.twit.tv) almost all the time that use flash on both sites. Usually it caps out at around 250MB and worked just fine this morning on uStream and is stable. Just got the Flash 11.6 update and neither currently work and will lock-up Firefox and eventually crash Adobe, which then frees up Firefox to allow me to use it again. It slowly creeps up to 1.9G before Adobe crashes.
    I have tried, as suggested elsewhere on a very similar issue, to roll back to Adobe 10, add "ProtectedMode = 0" to the mms.cfg file in the macromed folders, and disabling hardware acceleration in Firefox options. This allowed Firefox to play flash media, but only after it as reached 2.8G of memory on an 8G physical memory machine (Adobe claims 10% is normal, which this is far beyond 10% of 8G)
    I'd be quicker to blame Adobe on this, but I just got Firefox 19 the past 7 days, Adobe had always worked on Firefox before this update, but now even rolling back doesn't seem to work well at all. I'm not sure how to post my reports from about:crashes here, but...
    bp-492ad7e0-2bf8-46cb-b558-596252130228 2/27/20134:01 PM
    ...is my latest (Eleven reports today). I have screenshots of both Adobe v10 and v11 leaking memory, but don't feel it's useful at this time.
    Any help would be awesome and if it's not Firefox at all I guess I'll head back to Adobe with some more meat and potatoes for a more thorough support ticket over there. I just don't like having to use Chrome since it seems to work just fine on these pages ;)

    Thanks for your prompt and helpful reply.....
    When dealing with such a large problem with frequent FF lockups the temptation is to lump all information in an attempt to solve. LOL
    Chasing multiple threads to help solve the problem may be helpful to the developers but it takes far too much time following and posting in each thread. As you can see it's taken a couple of days to get back to this post.
    First thing we did is dump cache and cookies both through the interface and then manually in the profile. We changed the version of Flash installed manually and even changed the version of FF. There are many "flash" enabled pages we encountered which caused the lockup.....so MSN is not specifically the issue.
    But when Flash is removed or disabled the browser no longer locks up.....suffice to say we get an error when visiting a website with flash content on it.
    That is why I chose to post here as the problem is directly attributable to Flash in FF on all of our machines.
    Paul

  • Memory leak and problem with polymorh vi when calling vi from dll

    Two problems appear for me when using the setup below.
    First, I have a vi for opening a secondary vi:
    Then I have a vi for calling the opened, secondary vi:
    These two are compiled to a dll. The first one is called once, calling a function "open(char *)". The second one is called over and over, calling a function nextevent(double *, int). A simple example of an opened, secondary vi looks like this:
    The code used to send data looks approximately like this:
    dataout = malloc(dx->numelems * sizeof(double));
    datain = (COMPLEX *) dx->cont;
    for (i = 0; i < dx->numelems; ++i)
        dataout[cnt][i] = sqrt(datain[i].re * datain[i].re + datain[i].im * datain[i].im);
    nextevent(dataout, dx->numelems);
    free(dataout);
    This code is called in a loop. dataout is a double array to be sent to the secondary vi, datain is the source data.
    The problem now is that there is something eating up memory, and I fail to see why.
    My second question is this:
     I want to insert a Hamming window, or some other form of windowing function. It doesn't work however, and the help tells me it is because a vi opened this way cannot contain any polymorphic vi. Is there a convenient way around this problem?
    Lars Melander
    Uppsala Database Laboratory, Uppsala University

    Regarding your second question:
    As you say not possible to use a polymorphic vi in a DLL and in your case it is the windowing VI that is polymorphic. What you can do is to use only one instance of the windowing VI in the short cut menu. 
    Here is a link to a report about this error in the knowledgeBase:
    http://digital.ni.com/public.nsf/allkb/755CE99505A1C9FF8625693C00508DDE?OpenDocument

  • Memory leaks and multi threading issues in managed client.

    In our company we use a lot of Oracle, and after the release of the managed provider we migrated all applications to it. First the  things were very impressive : the new client was faster, but after some days applications that uses 100MB with old client goes to 1GB and up. The memory is not the only issue, we use a lot of multi threading, and we experience connection drops and not disposal, after 1 days working one of the application had over 100 sessions on the server. I think there is something wrong with connection pool and multi threading.
    Is someone experience same problems.
    Yesterday we went back with unmanaged provider. Now things are back to normal.

    connection drops: did you try to use "Validate Connection=true" parameter in your connection string?
    the new client was faster: are you sure with this statement? Even in 64bit environment? I got quite serious performance problems when running application under 64bit process: https://forums.oracle.com/thread/2595323

  • Memory Leak and 100% CPU in slapd process when using Open Directory OS X 10.8.5

    Has anyone seen the slapd (LDAP daemon from OpenLDAP which OS X Server uses) run away when running Open Directory? We've tried disabling replication but it doesn't seem to matter. The slapd process will start up and take up about 400MB and then at night will consume all the available memory and crashing the server.
    Any thoughts? Any benefit in upgrading to Mavericks' Server app?
    Thanks,
    John

    @Strontium90
    Found this in opendirectory.log which seems to just show ldap requests starting to slow down.
    2013-12-06 09:54:19.736670 PST - State information (some requests have been active for extended period):
              Sessions: {
                  2839 -- opendirectoryd:
                              Session ID: CBAE3152-1A3B-4C7E-89D6-2F836C28F5BA
                              Refs: singleton
                              Type: Default
                              Target: localhost
              Nodes: {
                  2839 -- opendirectoryd:
                              Node ID: CC6FC6C3-AD02-4068-9E8F-8FDC228F4C48
                              Nodename: /Search
                              Session ID: <Default>
                              Refs: 3
                              Internal Use: X
                  2816 -- automount:
                              Node ID: 8FC03A24-46F2-4DAA-A0EC-3FF98B458FB4
                              Nodename: /Search
                              Session ID: <Default>
                              Refs: 2
                  277 -- SystemUIServer:
                              Node ID: FFF97865-2FBE-474A-BD53-43A35DA09D3A
                              Nodename: /Search
                              Session ID: <Default>
                              Refs: 3
                              Internal Use: X
              Requests: {
                  2816 -- automount:
                              Nodename: /Search
                              Refs: 5
                              Active Time: 65170959
                              Type: ODNodeCopySubnodeNames
                              Current Module: search
                              Node ID: 8FC03A24-46F2-4DAA-A0EC-3FF98B458FB4
                              Request ID: 5
                  2839 -- opendirectoryd:
                              Nodename: /Search
                              Refs: 5
                              Active Time: 65971987
                              Type: ODQueryCreateWithNode
                              Current Module: search
                              Node ID: CC6FC6C3-AD02-4068-9E8F-8FDC228F4C48
                              Request ID: 4
                  277 -- SystemUIServer:
                              Current Module: SystemCache
                              Type: getpwuid
                              Request ID: 10
                              Refs: 4
                              Active Time: 13397955
                              Nodename: /Search
                              Parent Request: 10
                              Refs: 5
                              Active Time: 11041999
                              Type: ODQueryCreateWithNode
                              Current Module: search
                              Request ID: 12
                              Node ID: FFF97865-2FBE-474A-BD53-43A35DA09D3A
                  68 -- coreservicesd:
                              Current Module: SystemCache
                              Type: getpwuid
                              Request ID: 8
                              Refs: 3
                              Active Time: 13484131
                  2832 -- sshd:
                              Current Module: SystemCache
                              Type: getpwnam
                              Request ID: 9
                              Refs: 3
                              Active Time: 13483916
                  640 -- SystemUIServer:
                              Current Module: SystemCache
                              Type: getpwuid
                              Request ID: 7
                              Refs: 3
                              Active Time: 13522530
    2013-12-06 09:54:19.737704 PST - requesting spindump generation
    In slapd.log around the same time:
    Dec  6 06:55:23 dms-out-01.int.payoff.com slapd[118]: conn=-1 op=0: attribute "entryCSN" index delete failure
    Dec  6 06:58:25 dms-out-01.int.payoff.com slapd[118]: connection_read(46): no connection!
    Dec  6 07:00:23 dms-out-01.int.payoff.com slapd[118]: connection_read(48): no connection!
    Dec  6 07:27:34 dms-out-01.int.payoff.com slapd[118]: connection_read(47): no connection!
    Dec  6 07:56:30 dms-out-01.int.payoff.com slapd[118]: connection_read(47): no connection!
    Dec  6 08:10:24 dms-out-01.int.payoff.com slapd[118]: => bdb_idl_delete_key: c_get failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30994)
    Dec  6 08:10:24 dms-out-01.int.payoff.com slapd[118]: conn=-1 op=0: attribute "entryCSN" index delete failure
    Dec  6 08:10:25 dms-out-01.int.payoff.com slapd[118]: => bdb_idl_delete_key: c_get failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30994)
    Dec  6 08:10:25 dms-out-01.int.payoff.com slapd[118]: conn=-1 op=0: attribute "entryCSN" index delete failure
    Dec  6 08:18:29 dms-out-01.int.payoff.com slapd[118]: connection_input: conn=12372 deferring operation: binding
    Dec  6 08:18:55 dms-out-01.int.payoff.com slapd[118]: connection_input: conn=12373 deferring operation: binding
    Dec  6 08:19:50 dms-out-01.int.payoff.com slapd[118]: connection_read(53): no connection!
    Dec  6 08:27:16 dms-out-01.int.payoff.com slapd[118]: => bdb_idl_delete_key: c_get failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30994)
    Dec  6 08:27:16 dms-out-01.int.payoff.com slapd[118]: conn=-1 op=0: attribute "entryCSN" index delete failure
    Dec  6 09:08:00 dms-out-01.int.payoff.com slapd[118]: connection_input: conn=12871 deferring operation: binding
    Dec  6 09:16:10 dms-out-01.int.payoff.com slapd[118]: connection_input: conn=12871 deferring operation: pending operations
    The deadlock from what I can tell is a more of a warning from OpenLDAP, but it is a common pattern and occurring every few minutes.
    Not much useful in slapconfig.log.
    Any insights? Thanks so much.
    ~john

  • I seem to have what used to be called a memory leak and need to restart FF every 45 minutes or so - can I fix it?

    2fter about 2 weeks of closely monitoring 2 PC's with roughly the same specs running the same Facebook game it has become clear that as minutes go by the amount of memory being consumed by Firefox goes up. It starts at about 250 megs and runs up to about 1 gig in ~45 minutes. Both machines are 3 ghz, 3gb machines running 32 bit XP home. (Older P4 CPU's) One of the machines is running DDR2 and the other DDR
    When the memory get's to about 750 megs used by FF the entire system bogs down noticeably and gets almost unusable beyond that. Is there something I can do about it or is there a way for me to automate the shut down and restart of FF and have it return to the game?

    A tiny suggestion,
    I heard that a lot of the time this is caused by extensions and add-ons. Try to disable all of them and see if it is any difference. If its better just enable one extension at the time until you found the problem.
    If you cant solve the memory issue, here is a fix that should work making ff restart, if not at a specific memory usage, but on a specific time at least:
    Open notepad and write the following:
    ''taskkill /f firefox.exe''
    Name it FFShutdown.bat and save it
    Open a new page of notepad with this line:
    start firefox.exe https://support.mozilla.com/
    Save that file as FFstart.bat
    Now go to windows task scheduler
    Start > Programs > Accessories > System Tools > Scheduled Tasks
    Browse to your FFShutdown.bat and choose daily and set a time.
    Do the same for FFStart.bat but set it one minute later.
    Repeat this if you want it happen more than once per day.
    Hope that helps

  • Possible causes for memory leak in Java and Tomcat

    I would like to enquire what are the typical mistakes done by programmers that will cause memory leak in Java and Tomcat.

    Please refer the below site. It will give more points about the memory leak and how to rectify it.
    http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Q_20981562.html?cid=336

  • Callbacks without excessive thread creation and memory leaks?

    Hi JNI experts,
    I haven't done any serious JNI programming in a couple years and I'm currently stuck with a tricky JNI problem:
    My JNI code is connected to a system driver and needs to do frequent callbacks into Java code. The standard way of doing this involves calling AttachCurrentThread and DetachCurrentThread before/after the callback to Java code. However, I noticed that AttachCurrentThread creates a new java.lang.Thread each time it is invoked. Let's just say that the callback is invoked from JNI very freqently, and creating a new Thread each time that happens is not acceptable behavior for my application. Among other things, it prevents me from using the Eclipse debugger because the large number of threads being created and destroyed effectively locks up Eclipse's debugger UI. Also, it creates a CPU load that is way higher than it should be for a light-weight operation.
    So, I deviated from the standard Attach/DetachCurrentThread pattern and moved the DetachCurrentThread to code that is only called when the native JNI service is terminated. As that effectively renders repeated AttachCurrentThread calls a no-op, the problem of excessive creation and destruction of threads went away, but instead I had a memory leak on my hands now. The JNI code needs to create some Java objects because it's easier to create those objects right away rather than passing a bunch of primitives to Java and assembling them into objects there. When I moved the DetachCurrentThread, those newly created objects were no longer garbage-collected even after the Java code had released all references.
    When you print the stack trace of the Java callback method there is always only one frame on the stack (since it is being invoked directly from JNI). However, I suspect that older stack frames from previous invocations keep hanging around somewhere else in memory if DetachCurrentThread is not called. In other words, moving DetachCurrentThread out of the callback is an even worse option. I tried using PopLocalFrame to get rid of left over stack frames, but that didn't seem to work.
    So, my question is: is there a way to make (natively initiated) callbacks from JNI to Java without memory leaks and without creating a new thread each time? Would it work if I created my own native thread that runs some sort of dispatch loop? What other options are there?
    Thanks for any ideas!

    Thanks for the quick reply, ejp! :-)
    Your comments were very helpful; let me clarify a few things:
    I don't know where you get this 'standard Attach/DetachCurrentThread pattern', but if the native callbacks always happen on the same native thread, you only need to attach it once when you get the first callback, and detach it when you get the last, if you can tell. ;-)Yes, the callback is always coming from the same native thread, but, unfortunately, I cannot tell when I get the last callback, and essentially the native service keeps running as long as the VM is running. When I say "standard pattern" I'm referring to the fact that pretty much every book, tutorial, or web site that talks about JNI callbacks shows code snippets where AttachCurrentThread is called, then the callback, and then DetachCurrentThread.
    The JNI code needs to create some Java objects because it's easier to create those objects right away rather than passing a bunch of primitives to Java and assembling them into objects there.Is it really? Are you sure?I'm pretty sure in this case, though your point is well taken. The native API that calls my JNI code produces packets of that contain about 15 pieces of information of different types (ints, longs, doubles). Several packets may arrive together in a single group. Handling the data on the Java side requires a Java callback method with 15 parameters for a single packet, and it's hard to reconstruct which packets belong to one group at that point. Creating corresponding Java objects in JNI and passing them inside an array to the callback function indeed turned out to be easier.
    I don't think just 'moving' the DetachCurrentThread is correct. You need to attach the thread that is doing the callbacks, as often as necessary but no oftener, and detach it when you can.I think I found the solution: my native code is starting a separate dispatcher thread that, as you suggested, attaches itself only once and then enters a dispatcher loop. The low-level call back function notifies that thread of new data via the standard Pthread API. The detach happens in JNI_OnUnload. This works without creating a new thread each time and garbage-collects the created objects properly. As the dispatcher method essentially never returns I also had to insert some DeleteLocalRef calls, because otherwise the local references prevented garbage collection.
    So, for now, it looks like I'm good to go. Thanks again for the reply!

  • Memory leaks continuing in Safari and Web Kit

    Will Apple ever fix the Safari memory leak?
    As many of you know lots of reports over the years of Safari & Webkit having problems with memory leaks, and haven't seen a fix to it yet. This is a very important factor for usability of Safari.
    A memory leak is when, after a period of time, your browser, which is the online field that's designed to function like a page and is used to access web pages and surf the World Wide Web, consumes more and more of your computer's memory until it reaches a point where it literally becomes impossible to use your computer. It's like your computer's stuck in cyber mud. You have to close any open software program or restart the entire computer.
    Safari starts about 426.9 MB of real memory and 412.6 MB of virtual memormy and can go up to 1Gb of memory.
    Has anyone come up with a fix to this problem ? If anyone has a workaround for this, please share it.
    Meanwhile, Apple really should eliminate this problem once and for all.
    FYI, I'm using Safari version 5.0.3 and the latest WebKit r72487 which was built on 21 November 2010.

    My experience is that the same thing happens with Firefox and Chrome. The only difference with Chrome is that since the tabs are separate threads, they consume memory separately. The nice thing about that is that once the tab is closed memory is instantly freed. However, the helper thread always gets larger. Whether this is a memory leak or a consequence of having an application open over a long period of time is -I believe- open to discussion. I have experienced similar results with Eclipse (a memory intensive application). Daily shutdown/reboot and a few "Quit"s per a few hours fixes this issue. I don't know whether you would like to do this, though.
    Using Safari 5.0.2.

  • Memory leak in Application

    Hi,
    we're load testing an application using Coherence. It uses a distributed cache, with an web application as the client, and separate cache servers implementing a Cache Store.
    We're getting several memory leaks and one area that was reported was a great number of instances for the com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$GetRequest class.
    Does anybody know what could cause these instances to be left hanging around? I think the Coherence classes ar a symptom of another problem rather than an issue with Coherence itself but it would be useful to know what could cause these objects to be left in the heap.
    Thanks
    Mike

    After further load testing, our application definitely seems to be leaking Coherence objects.
    The classes seem to be com.tangosol.util.Binary &
    com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$GetRequest.
    During testing, the number of Binary objects rose 0 to about 9000 and the number of GetRequest objects rose from 0 to about 3600 in two hours.
    The application stores objects in the cache and updates them, the main operation being to add to a very long log string required by the client to these objects, which represent sessions.
    Our test keeps a constant number of these objects in the cache during the run, removing the same number it creates after it has ramped up to full load testing.
    The application is stateless, it recieves frequent requests to get an object from the cache, work on it and put it back in the cache. The cache also has a cache store to persist the data to a database.
    Are there any references to the cache objects that would stop them being garbage collected?
    Our whole application is based in a simple stateless reqest/response operation and I cannot see where the huge number of objects is coming from.
    Mike

  • Memory Leak in .swf

    Memory Leak issue with CS4
    Using CS4, we have a memory leak and I can not find the
    source of the problem.
    http://tiny.cc/O7D3e here is the
    link to the testing site. If you take a look at your task manager
    you will see it your RAM will continue to increase even after two
    or three cycles. It does not stabilize.
    We are using FlashEff | Flash Effects Component in order to
    generate the smooth transitions. However, I have done some
    debugging and even completely deleted the plug n from the file and
    it still continually leaks memory. Does anyone have any possible
    solutions or causes for this.

    One idea - there is a separate stack of memory in the flash
    player where loaded classes in separate application domains exist,
    and these classes are not being garbage collected....however, there
    is a line in adobe's documentation here:
    http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00000327.html
    under "Usage C" :
    quote:
    Having a new application domain also allows you to unload all
    the class definitions for garbage collection, if you can ensure
    that you do not continue to have references to the child SWF.
    Given that, as far as I can see from this code, there is no
    reference to the loaded .swf maintained....it seems to me like the
    loaded data (graphical assets AND classes) should be garbage
    collected - but, while you WILL see a slight drop in memory after
    the removal of the SWF, the overall memory continues to increase
    the more you do it. Could Adobe be mistaken?

  • Oracle 8.1.5 Linux Memory Leak?

    We have been running Oracle 8.1.5 Server and Client on Redhat 6.1
    kernel 2.2.12-20
    glibc-2.1.2-11
    Blackdown's JDK 1.2 RC3
    We are having bad memory leaks and we have verified that they are
    not in our source code using a memory profiler for Java-linux.
    We are using the JDBC calls and the OCI JDBC driver.
    We think that the memory leak is in libocijdbc8.so but we're not
    sure. It could also be in glibc but the 2.1.2-11 version should
    be pretty stable. It could also be in the Blackdown jvm.
    Anyone have any ideas?
    null

    Oracle8iR2's JDBC works fine with Oracle8.1.5.
    You can download the new JDBC driver.
    null

Maybe you are looking for

  • Can't print complete web pages in Ver 5.0

    Just upgraded to Ver 5.0. OS is XP SP3. Printer is Brother MFC-7225N. When trying to print a page from a site, instead of the one page, I got multiple pages that were the frame by frame pages. The "Print Frame" section is greyed out under the print c

  • Email Template

    Hi, I have a new requirement that the standard text mail should be sent out as an HTML Email. I was thinking of a HTML template which would have "customized tags" which I can replace at run time based on the data from some datasource. The Email Templ

  • Product id on dos

    I am trying to upload a multifolio app on dps profesionnal.What is the product id on the dps folio producer and how i get it?Is it just a name that i give on my own or i have to find it from somewhere? Thanks in advance.

  • How to process a Blanket Purchase order?

    Hi, Can you please let me know how to process a blanket purchase order received from a customer? Can we create a sales order based on the customer's blanket purchase order? Please help me out with this issue. Sincerely, Puja

  • How to identify field associated with a parameter ID

    Hi All, Im trying to identify the fields associated with different parameters ID in User Profile(SU3) transaction. \[removed by moderator\] Thanks Edited by: Jan Stallkamp on Aug 6, 2008 2:39 PM