All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Friesen <cfriesen@nortelnetworks.com>
To: Linux kernel <linux-kernel@vger.kernel.org>
Subject: [BUG]  oom killer not triggering in 2.6.9-rc3
Date: Fri, 08 Oct 2004 18:14:02 -0600	[thread overview]
Message-ID: <41672D4A.4090200@nortelnetworks.com> (raw)


I have an Xserve running 2.6.9-rc3 and patched to run the ppc kernel rather than 
the ppc64 kernel.  It's configured with 2GB of memory, no swap.

If I run one instance of the following program, it allocates all but about 3MB 
of memory, and the memory hog spins with 100% of the cpu.

If I run two instances of the program, the machine locks up, doesn't respond to 
pings, and is basically dead to the world.

Shouldn't the oom-killer be kicking in?

Chris







#include <stdlib.h>
#include <unistd.h>

#define PAGES 1000
#define BLOCKSIZE (pgsz * PAGES)

int main()
{
	int pgsz = sysconf(_SC_PAGESIZE);

	while(1) {
		char *p = (char *)malloc(BLOCKSIZE);
		if (p)
			for (int i=0;i<PAGES;i++)
				*(p+(i*pgsz)) = 1;
	}
	return 0;
}

             reply	other threads:[~2004-10-09  0:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-09  0:14 Chris Friesen [this message]
2004-10-09  0:26 ` [BUG] oom killer not triggering in 2.6.9-rc3 Chris Wright
2004-10-11 13:58 ` Alan Cox
2004-10-12  5:03   ` Chris Friesen
2004-10-12  5:22     ` William Lee Irwin III
2004-10-12 15:24       ` Chris Friesen
2004-10-12 16:28         ` William Lee Irwin III
2004-10-12  9:44     ` Andries Brouwer
2004-10-12 15:32       ` Chris Friesen
2004-10-12 20:08         ` Chris Wright
2004-10-12 20:41           ` [BUG] oom killer not triggering in 2.6.9-rc3 -- FIXED in -rc4 Chris Friesen
2004-10-12 20:54             ` Chris Wright
2004-10-12 21:02     ` [BUG] oom killer not triggering in 2.6.9-rc3 Alan Cox
2004-10-12 22:25       ` Chris Friesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41672D4A.4090200@nortelnetworks.com \
    --to=cfriesen@nortelnetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.