This is not a bug report but just a heads up to see if anybody else has seen a similar problem.
Some of our gpc programs are what I would term as server processes. By that I mean that they are intended to run in the background for several days at a time serving requests that are passed to them in various ways. We have recently realised that these programs are steadily increasing their memory usage with cpu time used such that the system, in the worst case, runs out of swap space. The problem may well be in our own code but we have not yet isolated it. I just wondered if there was any other possible explanation eg something in the run time system or whether anybody else had seen similar problems? Any advice on strategies for isolating the problem would also be appreciated.
(Sorry for the late reply.)
Martin Liddle wrote:
This is not a bug report but just a heads up to see if anybody else has seen a similar problem.
Some of our gpc programs are what I would term as server processes. By that I mean that they are intended to run in the background for several days at a time serving requests that are passed to them in various ways. We have recently realised that these programs are steadily increasing their memory usage with cpu time used such that the system, in the worst case, runs out of swap space. The problem may well be in our own code but we have not yet isolated it. I just wondered if there was any other possible explanation eg something in the run time system or whether
Both is possible. I think I've fixed/avoided all memory leaks in the RTS I'm aware of, but I haven't audited it for memory leaks recently...
anybody else had seen similar problems? Any advice on strategies for isolating the problem would also be appreciated.
There's a unit HeapMon with GPC, but it will only tell you how many pointers were allocated and not disposed.
But I it wouldn't be too difficult to log the allocated pointers together with the code position of the caller (which might give a clue to what's wrong). If you're still interested, let me know. It might take a little tweak in the RTS which means you'd have to upgrade to a new version then to do that...
Frank
Hi
suggestion: a script to take a snapshot of the /proc filesystem so you can find what's growing
take a look at dir /proc and cat /proc/<ID>/status or cat /proc/<ID>/maps
hope this helps Russ
In article Pine.LNX.4.21.0011240232590.265-100000@rusty.russwhit.com, Russ Whitaker russ@ashlandhome.net writes
suggestion: a script to take a snapshot of the /proc filesystem so you can find what's growing
take a look at dir /proc and cat /proc/<ID>/status or cat /proc/<ID>/maps
Thanks for that. We've been looking at status but we need to wade through all the output. maps is a new idea and we'll have a look. Doubtless you will hear more as and when we get closer to the root of this problem.