Re: Andrea VM changes

From: Andrea Arcangeli (andrea_at_suse.de)
Date: 08/31/03

  • Next message: Romi: "."
    Date:	Sun, 31 Aug 2003 17:59:40 +0200
    To: Alan Cox <alan@lxorguk.ukuu.org.uk>
    
    

    On Sun, Aug 31, 2003 at 04:29:49PM +0100, Alan Cox wrote:
    > On Sul, 2003-08-31 at 15:59, Andrea Arcangeli wrote:
    > > And I don't see how you can avoid oom killing to ever happen if the apps
    > > recurse on the stack and growsdown some hundred megs. In such case
    > > you've to oom kill, since there's no synchronous failure path during the
    > > stack growsdown walk.
    >
    > The stack grow fails and you get a signal. Its up to you to have a
    > language that handles this or in C enjoy the delights of sigaltstack. In

    the synchronous signal sending looks fine.

    the brainer part here is what happens after sending the signal: how to
    eventually fallback to sigkill. how do you fallback from a graceful
    signal (one that can be handled in userspace) to an "hard" one like
    sigkill that guarantees the stability of the system? I mean, you could
    set a timer, and then try to kill the task with sigkill later if it's
    still there after a few seconds you sent the graceful signal. There may
    be different solutions to this.

    But we need a fallback like the above because we can't trust userspace,
    if the task doesn't go away, we've to sigkill it eventually.

    Even sending sigkill immediatly would be acceptable (despite it would
    prevent userspace to exit gracefully).

    > practice the settings are such that this case basically "doesnt happen"
    > for all normal use.

    yes, stack usage is normally very limited.

    >
    > > I just don't think it solves or hides the other issues, it seems
    > > completely orthogonal to me, because you can still run oom during stack
    > > growsdown.
    >
    > Agreed - and there will always be corner cases, people who don't want
    > strict overcommit etc. Thats why I said "as well". Its not a replacement
    > for OOM handling of some form.

    agreed.

    Andrea
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Romi: "."

    Relevant Pages

    • Re: Andrea VM changes
      ... > And I don't see how you can avoid oom killing to ever happen if the apps ... > recurse on the stack and growsdown some hundred megs. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: xmalloc
      ... OOM (out-of-memory) condition. ... The 'static solution' may cause a 'stack' overflow. ...
      (comp.lang.c)
    • Re: 2.0 conversion : w3wp.exe using GOBS of memory
      ... Chris wrote: ... determine why you are seeing this OOM. ... If an infinite loop is pushing something onto the stack, ... As for a memory leak, yes, that can cause ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: malfunctioning applications under limited stack size
      ... stack size is limited to anything fewer then exactly 2 GB ... ... Look in /var/log/messages for signs of the OutOfMemory (oom) killer. ...
      (comp.os.linux.misc)