public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arvind Kandhare <arvind.kan@wipro.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Forking shell bombs
Date: Wed, 09 Jul 2003 16:35:55 +0530	[thread overview]
Message-ID: <3F0BF713.4080005@wipro.com> (raw)

The problem can be attacked in two steps:

1. Stop new forks from being created
2. Kill the process causing the forks

The current ulimit implementation, afaik, can only control the
processes which will be created from the current moment onwards.
Ther processes which are already started will continue creating forks.
New processes created by the fork wil have this limit.

Basically it does not ensure that first step is completely executed.
So if your rate of killing is less than the processes being created and
resources are exausted, your system hangs.

There was a RFC patch  "[RFC][PATCH 2.5.70] Dynamically tunable
maxusers, maxuprc and max_pt_cnt" posted on 2003-06-06. It implements
maxuprc (maxuprc: maximum number of processes per user) as a dynamic tunable
parameter. It can be useful to overcome this problem. By setting maxuprc to a
very low value, new creation of the process is stopped. Then root can kill ('cos
this limit is not applicable to root) the erring processes.
There is no race against time as there is no chance of new process getting created once
this value is reduced.

cheers ..
Arvind ...








             reply	other threads:[~2003-07-09 10:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-09 11:05 Arvind Kandhare [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-07-08 22:26 Forking shell bombs Perez-Gonzalez, Inaky
     [not found] <20030708193401.24226.95499.Mailman@lists.us.dell.com>
2003-07-08 20:28 ` Ryan Underwood
2003-07-08 20:37   ` vlad
2003-07-08 20:43   ` jhigdon
2003-07-08 21:25     ` Ryan Underwood
2003-07-08 22:43       ` Sir Ace
2003-07-09 15:07       ` David Ford
2003-07-09 21:10         ` Ryan Underwood
2003-07-13  9:10         ` Riley Williams
2003-07-13  9:40           ` Jan-Benedict Glaw
2003-07-13 14:17           ` Gene Heskett
2003-07-08 21:59     ` system_lists
2003-07-08 17:18       ` Max Valdez
2003-07-08 22:25         ` Alan Cox
2003-07-08 22:26         ` Svein Ove Aas
2003-07-08 22:51     ` Ryan Underwood
2003-07-10 12:32     ` Luiz Capitulino
2003-07-08 23:05   ` Wakko Warner
2003-07-09 11:36   ` Michael Buesch
2003-07-08 18:45 Ryan Underwood
2003-07-08 18:55 ` Charles Cazabon
2003-07-08 22:01   ` Alan Cox
2003-07-08 19:23 ` jhigdon
2003-07-08 20:35 ` vlad

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=3F0BF713.4080005@wipro.com \
    --to=arvind.kan@wipro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox