Subject: Re: Machine livelock with latest (4.99.48) kernel on sparc64
To: Andrew Doran <ad@netbsd.org>
From: Tobias Nygren <tnn@NetBSD.org>
List: current-users
Date: 01/07/2008 01:03:35
On Sun, 6 Jan 2008 22:45:50 +0000
Andrew Doran <ad@netbsd.org> wrote:
> On Sun, Jan 06, 2008 at 11:11:16PM +0100, Tobias Nygren wrote:
>
> > I can reproduce this, with a LOCKDEBUG kernel.
>
> LOCKDEBUG uses a lot of wired memory.
>
> > I don't have any swap enabled so instead of death by vm thrashing I get
> > killed processes. I guess this could be a problem with the sparc64 atomic
> > ops, since the uvmexp accounting doesn't add up.
>
> I also suspect that. I'll take a look, although if someone with more sparc
> assembly knowhow could look too that would be great.
>
> Andrew
I compiled a kernel with the C fallback atomic ops with the exception
of membar and cas in asm and it still runs out of memory after a while.
This seems to be related to repeated process spawning/reaping.
Leave the following C program running for about a minute and all
your free memory will be gone:
pid_t p;
while ((p = fork()) > 0) wait(p);
-Tobias