SWI-Prolog has suddenly become unusable for me for unknown reasons.
When I run SWI-Prolog, it very rapidly starts consuming all available memory (many GB) until it freezes my laptop.
I notice that my ~/.pl-history file was several GB in size, so I tried removing it and trying again. Upon restarting SWI-Prolog, it rapidly jumped back to several GB in size.
I'm not sure how to debug this issue, and haven't been able to find other reports of this behavior.
Related
I am working on a 32 bit app (VC++ main exe and a couple of Delphi dlls) that slowly leaked memory (over weeks or months). While I fixed the leaks, one problem still remains - while the working set and active working memory set remain relatively low (about 50Mb), the commit size keeps creeping up to about 1.7Gb.
I do realize that Windows (especially Windows 10) can be pretty aggressive committing memory in a process, but still, I see no obvious reason for this to happen.
I patched VirtialAlloc / VirtialAllocEx / VirtialAlloc2 / etc. using Detours to see when VC++ and Delphi memory managers would be forced to request more memory from the OS, but after a few initial requests on startup, I see no calls to those functions while the commit size is still slowly growing.
What else can be responsible for the commit size growth? Any I/O operations? Memory mapped files?
Till yesterday during debugging I could freely modify views and then reload the website in the browser. But know even when I scroll it freezes completely for even 10 seconds. Sometimes works for few seconds without a lag. When I do not scroll CPU usage by VS2013 is almost 0% when I scroll it goes up to 25 and it freezes constantly.
What happenned and what can I do?
any anti-virus software sheduled file system checks? How much RAM installed in your computer? VS2013 minimal requirements is 1GB. Also whith OS do you run? It all sounds like you don't have enought. In my practice when usage of RAM is abount 75-80% VS begin freezes. Or if there is heavy CPU loading in background, caused some hidden processes.
I am experiencing the same thing, it happens randomly. I think the problem with mine is that my laptop is extremely old and couldn't handle the process. When it does happen, closing VS and the browser and then reopen them seems to solve the problem.
I use tmux (in fact byobu with tmux backend) on ubuntu 14.04.
My tmux uses 1GB of memory (VIRT and RES in top) and I have already used the clear-history command.
Now my scrollback is gone but the memory usage is not going down.
This tmux was running for a long time and lots of text scrolled through it. top shows it used more than 1 hour of CPU time in total.
What could be the reason?
Could there be a memory leak?
What could I try?
I cannot restart it or do dangerous things because the session runs an experiment that takes around one week more to complete...
There seems to have been a bug in tmux, resulting in memory not being freed on a history clear.
This bug existed up to including version 1.9a, fixed in version 2.0. I'm posting this as a late answer, as version 1.9a seems to be still in use (with me at least).
https://groups.google.com/forum/#!topic/tmux-users/WiSZy6ft1As
https://github.com/tmux/tmux/commit/28f23f18e9d79405a60348c4f7aeded33da9135b
Since no one has answered this, I'll offer my speculation on what's happening.
tmux allocates space in memory for its history, and that memory grows as you use up more of your history. Clearing history makes it invisible, but doesn't free up the actual memory. This means that tmux can use memory up the total number of lines for each open pane, regardless of whether those panes currently contain anything in them.
This is arguably a bug, or a bad feature at best.
I don't have a solution.
Necropost, but this problem has persisted for me until very recently. The memory use of tmux 2.6 from the repos on x86 xubuntu 18.04 always crept up to a gigabyte within a day or two. I removed it and built tmux 2.8 from source. Its memory usage has been minimal for several days. Problem solved, finally.
Another memory leak was fixed in tmux 2.5:
* Handle slow terminals and fast output better: when the amount of data
outstanding gets too large, discard output until it is drained and we are
able to do a full redraw. Prevents tmux sitting on a huge buffer that the
terminal will take forever to consume.
* Do not redraw a client unless we realistically think it can accept the data -
defer redraws until the client has nothing else waiting to write.
https://github.com/tmux/tmux/blob/91b220525b0406763dafb6698d2741bec580bc10/CHANGES#L257-L263
It's not a bug, tmux does free memory immediately when you clear the history. It's up to glibc to return it to the kernel and it is poor at that. You should be able to see the memory is free because if you clear the history at say 10000 lines, the memory usage will not grow again until the history again reaches 10000 lines.
I have a pretty big issue, although I only have the symptoms, and a theory on the cause.
I have a C++ application under Windows 7x64 that uses system calls to FFMPEG 0.7.13 to extract frames from videos. When running, the parent application maintains a nice, predicable memory footprint in memory profilers (task manager, RAMMap) of about 2MB. I can see the individual calls to FFMPEG also come and go without incident. The trouble is, after about 100 calls to FFMPEG, and 70,000+ PNGs created (no one directory has more than 1500 pngs), the Windows memory page size raises gradually from about 2.5GB to over 7.0GB, and the system is brought to its knees. The sum of the processes for all users is no where near the reported Memory Page amount.
I thought it might be Windows Search indexing related, so I turned off the indexing for the output directories in question using SetFileAttributes() and FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, and while it seems to be working as advertised, it does not seem to combat the issue at hand. My current running theory is that all of these extracted PNGs are either fully or partially memory mapped, by FFMPEG or something else. I can also see the output PNGs under the RAMMap Physical Pages tab as standby mapped files.
Question:
- Is there enough information here to possibly diagnose the exact problem?
- Do I have a way to combat this issue?
Thanks in advance...
We have a hybrid Web/Native application built using MonoTouch and a UIWebView. The application stores encrypted images on disk which are then requested by the UIWebView, decrypted on the fly (via an NSUrlProtocol) and then displayed in the application.
Everything works well until we have around 27-30 images at which point we receive memory warnings and the application then crashes.
Profiling the application using Instruments we see our real memory is ~ 55MB however our virtual memory is ~ 800 MB which seems quite high. Also our physical memory seems to spike near the end.
I realise this is probably an issue with our application however we are at a loss at how to diagnose the issue. If anyone has any thoughts it would be greatly appreciated.
A couple of things we have tried:
Monotouch profiler (only showing ~ 2mb usage)
GC.Collect() (No change)
Thanks,
James