mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Boldi <a1426z@gawab.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Matthew Helsley <matthltc@us.ibm.com>, linux-kernel@vger.kernel.org
Subject: Re: Resource limits
Date: Tue, 27 Sep 2005 18:50:01 +0300	[thread overview]
Message-ID: <200509271850.01977.a1426z@gawab.com> (raw)
In-Reply-To: <20050927143651.GB5947@hmsreliant.homelinux.net>

Neil Horman wrote:
> On Tue, Sep 27, 2005 at 04:42:07PM +0300, Al Boldi wrote:
> > Neil Horman wrote:
> > > On Tue, Sep 27, 2005 at 08:08:21AM +0300, Al Boldi wrote:
> > > > Neil Horman wrote:
> > > > > On Mon, Sep 26, 2005 at 11:26:10PM +0300, Al Boldi wrote:
> > > > > > Neil Horman wrote:
> > > > > > > On Mon, Sep 26, 2005 at 08:32:14PM +0300, Al Boldi wrote:
> > > > > > > > Neil Horman wrote:
> > > > > > > > > On Mon, Sep 26, 2005 at 05:18:17PM +0300, Al Boldi wrote:
> > > > > > > > > > Rik van Riel wrote:
> > > > > > > > > > > On Sun, 25 Sep 2005, Al Boldi wrote:
> > > > > > > > > > > > Too many process forks and your system may crash.
> > > > > > > > > > > > This can be capped with threads-max, but may lead
> > > > > > > > > > > > you into a lock-out.
> > > > > > > > > > > >
> > > > > > > > > > > > What is needed is a soft, hard, and a special
> > > > > > > > > > > > emergency limit that would allow you to use the
> > > > > > > > > > > > resource for a limited time to circumvent a
> > > > > > > > > > > > lock-out.
> > > > > > > > > > >
> > > > > > > > > > > How would you reclaim the resource after that limited
> > > > > > > > > > > time is over ?  Kill processes?
> > > > > > > > > >
> > > > > > > > > > That's one way,  but really, the issue needs some deep
> > > > > > > > > > thought. Leaving Linux exposed to a lock-out is rather
> > > > > > > > > > frightening.
> > > > > > > > >
> > > > > > > > > What exactly is it that you're worried about here?
> > > > > > > >
> > > > > > > > Think about a DoS attack.
> > > > > > >
> > > > > > > Be more specific.  Are you talking about a fork bomb, a ICMP
> > > > > > > flood, what?
> > > >
> > > > Consider this dilemma:
> > > > Runaway proc/s hit the limit.
> > > > Try to kill some and you are denied due to the resource limit.
> > > > Use some previously running app like top, hope it hasn't been killed
> > > > by some OOM situation, try killing some procs and another one takes
> > > > it's place because of the runaway situation.
> > > > Raise the limit, and it gets filled by the runaways.
> > > > You are pretty much stuck.
> > >
> > > Not really, this is the sort of thing ulimit is meant for.  To keep
> > > processes from any one user from running away.  It lets you limit the
> > > damage it can do, until such time as you can control it and fix the
> > > runaway application.
> >
> > threads-max = 1024
> > ulimit = 100 forks
> > 11 runaway procs hitting the threads-max limit
>
> This is incorrect.  If you ulimit a user to 100 forks, and 11 processes
> running with that uid

Different uid.

> If you have a user process that for some reason legitimately needs to try
> use every process resource available in the system, then yes, you are prone
> to a lock out condition

Couldn't this be easily fixed in kernel-space?

Thanks!

--
Al


  reply	other threads:[~2005-09-27 15:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-25 14:12 Al Boldi
2005-09-26  3:36 ` Rik van Riel
2005-09-26 14:18   ` Al Boldi
2005-09-26 15:56     ` Neil Horman
2005-09-26 17:32       ` Al Boldi
2005-09-26 17:51         ` Neil Horman
2005-09-26 20:26           ` Al Boldi
2005-09-27  1:05             ` Neil Horman
2005-09-27  5:08               ` Al Boldi
2005-09-27 12:08                 ` Neil Horman
2005-09-27 13:42                   ` Al Boldi
2005-09-27 14:36                     ` Neil Horman
2005-09-27 15:50                       ` Al Boldi [this message]
2005-09-27 17:25                         ` Neil Horman
2005-09-27 21:35                 ` Chandra Seetharaman
2005-09-26 12:28 ` Neil Horman
2005-09-26 14:44 ` Roger Heflin
2005-09-26 17:11   ` Alan Cox
2005-09-26 17:32     ` Al Boldi
2005-09-26 21:21     ` Roger Heflin
2005-09-27  3:50   ` Coywolf Qi Hunt
2005-09-26 19:07 ` Matthew Helsley
  -- strict thread matches above, loose matches on Subject: below --
2002-10-24 12:13 Frank Cornelis
2002-10-24 16:46 ` Randolph Bentson

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=200509271850.01977.a1426z@gawab.com \
    --to=a1426z@gawab.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=nhorman@tuxdriver.com \
    /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

Powered by JetHome