public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: "linux-os (Dick Johnson)" <linux-os@analogic.com>
Cc: Helge Hafting <helge.hafting@aitel.hist.no>,
	Willy Tarreau <w@1wt.eu>, Irfan Habib <irfan.habib@gmail.com>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Maximum number of processes in Linux
Date: Thu, 17 Aug 2006 08:00:29 +0000	[thread overview]
Message-ID: <1155801629.25655.26.camel@Homer.simpson.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0608160720210.4352@chaos.analogic.com>

On Wed, 2006-08-16 at 07:33 -0400, linux-os (Dick Johnson) wrote:
> On Wed, 16 Aug 2006, Helge Hafting wrote:
> > Doesn't work here.  Without ulimit, I wasn't surprised
> > about the resulting OOM mess.
> >
> > Problem was, it never stopped.  I expected OOM to kill
> > this program, and quite possibly lots of other running programs
> > as well.  What I got, was ever-rolling OOM messages
> > with stack traces inbetween.
> > 2.6.18-rc4-mm1 never recovered and had to be killed by sysrq.
> >
> > Helge Hafting
> 

> Runs fine here. I'm using 2.6.14.24. Maybe your kernel version still
> has an OEM bug???

Hmm.  For grins, I ran it as root in 2.6.18-rc4-mm1, and didn't even get
an oom.  I did a SysRq-E, ran it again, and watched it fork off 18600
kids, then hang the box again.

SysRq : Terminate All Tasks
SysRq : Changing Loglevel
Loglevel set to 9

(start forkbomb... generates ~18600 kids, I thumb twiddle then...)

SysRq : Show Memory
Mem-info:
DMA per-cpu:
cpu 0 hot: high 0, batch 1 used:0
cpu 0 cold: high 0, batch 1 used:0
cpu 1 hot: high 0, batch 1 used:0
cpu 1 cold: high 0, batch 1 used:0
Normal per-cpu:
cpu 0 hot: high 186, batch 31 used:56
cpu 0 cold: high 62, batch 15 used:59
cpu 1 hot: high 186, batch 31 used:61
cpu 1 cold: high 62, batch 15 used:49
HighMem per-cpu:
cpu 0 hot: high 42, batch 7 used:6
cpu 0 cold: high 14, batch 3 used:13
cpu 1 hot: high 42, batch 7 used:1
cpu 1 cold: high 14, batch 3 used:11
Active:130198 inactive:1205 dirty:0 writeback:0 unstable:0 free:3009 slab:64587 mapped:518 pagetables:55775
DMA free:4096kB min:68kB low:84kB high:100kB active:3652kB inactive:4656kB present:16384kB pages_scanned:27 all_unreclaimable? no
lowmem_reserve[]: 0 880 1007
Normal free:7836kB min:3756kB low:4692kB high:5632kB active:426716kB inactive:156kB present:901120kB pages_scanned:44713 all_unreclaimable? no
lowmem_reserve[]: 0 0 1023
HighMem free:104kB min:128kB low:264kB high:400kB active:90424kB inactive:8kB present:131008kB pages_scanned:46493 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 1*4096kB = 4096kB
Normal: 1*4kB 1*8kB 1*16kB 2*32kB 1*64kB 0*128kB 4*256kB 5*512kB 0*1024kB 0*2048kB 1*4096kB = 7836kB
HighMem: 0*4kB 1*8kB 0*16kB 1*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 104kB
Swap cache: add 280, delete 69, find 0/0, race 0+0
Free swap  = 1027032kB
Total swap = 1028152kB
Free swap:       1027032kB
262128 pages of RAM
32752 pages of HIGHMEM
5276 reserved pages
521412 pages shared
211 pages swap cached
0 pages dirty
0 pages writeback
518 pages mapped
64587 pages slab
55775 pages pagetables
SysRq : Terminate All Tasks

> Since the forked process never touches any of its memory, it
> shouldn't use anything except space in the kernel for a new task-
> structure and space in user-space for stack. COW wouldn't have
> happened yet. I don't see how you get out of memory before you
> run out of PIDs!
> 
> The first instance of the fork failing should cause a signal
> to be sent to all the children, killing them:
> 
>          case -1:	// Failed
>          printf("%lu\n", i);
>              kill(0, SIGTERM);
>              exit(0);

No oom-kill action here.

	-Mike


  reply	other threads:[~2006-08-17  5:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-15 17:59 Maximum number of processes in Linux Irfan Habib
2006-08-15 18:12 ` Stephen Hemminger
2006-08-15 18:22 ` linux-os (Dick Johnson)
2006-08-15 18:22   ` Willy Tarreau
2006-08-15 19:01     ` linux-os (Dick Johnson)
2006-08-15 19:13     ` linux-os (Dick Johnson)
2006-08-15 19:13       ` Willy Tarreau
2006-08-15 19:19       ` Arjan van de Ven
2006-08-15 19:26         ` Irfan Habib
2006-08-15 21:50           ` Avi Kivity
2006-08-16 10:01       ` Helge Hafting
2006-08-16 11:33         ` linux-os (Dick Johnson)
2006-08-17  8:00           ` Mike Galbraith [this message]
2006-08-16 11:58         ` Alistair John Strachan
2006-08-15 18:29   ` linux-os (Dick Johnson)
2006-08-15 18:37 ` Alan Cox
2006-08-15 21:00 ` Valdis.Kletnieks
     [not found] <fa.evUDdOgjejpeNWKvgan3aKFF880@ifi.uio.no>
2006-08-15 23:12 ` Robert Hancock
2006-08-15 23:39   ` Michael Buesch
2006-08-16  0:04   ` Lee Revell

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=1155801629.25655.26.camel@Homer.simpson.net \
    --to=efault@gmx.de \
    --cc=helge.hafting@aitel.hist.no \
    --cc=irfan.habib@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=w@1wt.eu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox