Date: Sun, 2 Nov 2008 19:37:05 +1100 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Kostik Belousov <kostikbel@gmail.com> Cc: freebsd-stable@freebsd.org Subject: Re: System hanging during dump Message-ID: <20081102083704.GH99398@server.vk2pj.dyndns.org> In-Reply-To: <20081019083902.GP7782@deviant.kiev.zoral.com.ua> References: <20081015082428.GE26536@server.vk2pj.dyndns.org> <20081015083538.GA72190@icarus.home.lan> <48F65490.6040305@FreeBSD.org> <20081019032104.GB25796@server.vk2pj.dyndns.org> <20081019083902.GP7782@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Sorry for the late reply.
On 2008-Oct-19 11:39:02 +0300, Kostik Belousov <kostikbel@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.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
iEYEARECAAYFAkkNZrAACgkQ/opHv/APuIdOTwCfbCy7o1fVs5sdpu3OS7YbhYDV
gRcAnjlpGMG0lUosS110Zawn3WOOOymo
=r9Bg
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081102083704.GH99398>
