System hanging during dump
Peter Jeremy
peterjeremy at optushome.com.au
Sun Nov 2 01:37:09 PDT 2008
Sorry for the late reply.
On 2008-Oct-19 11:39:02 +0300, Kostik Belousov <kostikbel at gmail.com> wrote:
>> I have built myself a looping 'ps -axl' which should let me gather more
>> information if it does re-appear. (In the process, I've found that ps
>> leaks memory, though that's not a problem until you wrap it in a loop).
>
>What memory ? Kernel one ? How did you noted this ? Could you add
>vmstat -z and vmstat -m to the loop and watch what allocation grows ?
ps(1) malloc's memory and doesn't free it. This isn't an issue in
normal operation because it's a once-through program. I hacked ps to
turn the guts of main() into a while(1){} loop and this showed the
process was growing. There were a couple of superfluous strdup()
calls that could be removed but I don't think it's worth making it
exhaustively clean up after itself (my hacking included hard-wiring
the options so I'm not sure my cleanup code is complete in the general
case). As a low priority, I'll create a PR covering the strdup's.
--
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20081102/1eff112e/attachment.pgp
More information about the freebsd-stable
mailing list