Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #9717

Re: bad alloc

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: bad alloc
Date 2011-09-04 12:03 +1200
Message-ID <9cfti9FsstU5@mid.individual.net> (permalink)
References (6 earlier) <6bfba27a-a5bd-42df-b3b9-d1d393958665@fd21g2000vbb.googlegroups.com> <dec7cdd4-1f03-4656-84c2-430c58b4c46e@u7g2000pro.googlegroups.com> <a8ea8bd6-6402-4893-9ddc-9594c488cb70@m18g2000vbe.googlegroups.com> <9cb8rmFfcoU1@mid.individual.net> <64024153-4384-44d8-aec8-b097c44e848e@t5g2000yqj.googlegroups.com>

Show all headers | View raw


On 09/ 4/11 11:20 AM, James Kanze wrote:
> On Sep 2, 6:45 am, Ian Collins<ian-n...@hotmail.com>  wrote:
>> On 09/ 2/11 04:37 PM, Adam Skutt wrote:
>
>      [...]
>> I agree.  On a descent hosted environment, memory exhaustion is usually
>> down to either a system wide problem, or a programming error.
>
> Or an overly complex client request.

Not spotting those is a programming (or specification) error!

>> If you require an application to be "robust" then you can use
>> an external entity to manage and if necessary, restart it.
>> This is common practice for system processes.
>
> That's the correct response to a programming error or a system
> wide problem.  For a request which is part of a DOS attack, it
> seems to be playing into the attacker's hand, and for a simply
> unreasonable client request, it does seem unnecessary to abort
> all other client connections.  What's wrong with just responding
> with an "insufficient resources" error?

No, it doesn't.  Which is why it's not a good idea to allocate an 
arbitrarily large chunk of memory in response to an external request. 
Where overly complex requests are easily to discard, the more insidious 
DOS attacks are those that make many, apparently reasonable, requests. 
To protect against those, finer resource limits (such as a finite set on 
input buffers) than the size of the heap should be used.

>      [...]
>> Indeed, robustness goes beyond a single application.
>
> That's why robust servers run on dedicated machines (where they
> are the only "application").

Indeed.  That's why I run mine in their own container, with dedicated 
system resources.  Dedicated machines are so last century!

-- 
Ian Collins

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-29 23:26 -0700
  Re: bad alloc Krice <paulkp@mbnet.fi> - 2011-08-30 02:14 -0700
    Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 06:26 -0700
      Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 14:34 +0100
        Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 06:54 -0700
          Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 15:02 +0100
            Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 15:06 +0100
            Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:20 -0700
              Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 15:31 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:47 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 15:52 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 08:00 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 16:15 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 10:31 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 18:58 +0100
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 19:18 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 16:17 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-31 00:56 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 17:11 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-31 01:24 +0100
                Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-08-31 12:33 +1200
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 18:38 -0700
                Re: bad alloc Noah Roberts <roberts.noah@gmail.com> - 2011-08-30 20:07 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 04:04 -0700
                Re: bad alloc Noah Roberts <roberts.noah@gmail.com> - 2011-08-31 09:17 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-31 14:59 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 00:50 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 12:41 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 05:00 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 13:59 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 06:35 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 14:50 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 13:51 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 21:58 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 14:05 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 22:08 +0100
                Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 03:16 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 04:12 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-02 15:08 +0100
                Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 03:07 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 04:15 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 11:21 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 10:46 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 18:58 +0100
                Re: bad alloc "Waldek M." <wm@localhost.localdomain> - 2011-08-31 20:58 +0200
                Re: bad alloc "io_x" <a@b.c.invalid> - 2011-09-03 10:13 +0200
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:53 -0700
            Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 16:28 -0700
              Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-01 00:49 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-01 04:50 -0700
                Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 03:17 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 04:21 -0700
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-01 16:23 -0700
                Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 03:19 -0700
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 15:37 -0700
                Re: bad alloc Dombo <dombo@disposable.invalid> - 2011-09-04 09:25 +0200
        Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-01 16:20 -0700
      Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-30 06:54 -0700
        Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:12 -0700
    Re: bad alloc Dombo <dombo@disposable.invalid> - 2011-08-30 22:58 +0200
      Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 15:56 -0700
        Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-08-31 09:28 +0000
          Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 04:20 -0700
            Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-02 14:57 +0000
              Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 08:35 -0700
          Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 04:25 -0700
  Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-30 03:26 -0700
    Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 05:54 -0700
      Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 14:30 +0100
        Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:00 -0700
          Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 00:37 -0700
            Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 04:26 -0700
      Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-30 07:03 -0700
        Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 07:57 -0700
          Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 16:04 +0100
            Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 08:15 -0700
              Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 16:20 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 10:37 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-08-30 18:41 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 10:49 -0700
          Re: bad alloc Asger-P <junk@asger-p.dk> - 2011-08-31 10:33 +0200
            Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 04:22 -0700
    Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-30 16:04 -0700
      Re: bad alloc Noah Roberts <roberts.noah@gmail.com> - 2011-08-30 20:02 -0700
        Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-30 20:33 -0700
          Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 01:30 -0700
            Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-08-31 09:23 +0000
              Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 04:21 -0700
              Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 04:47 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-31 05:35 -0700
                Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-01 01:08 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 03:56 -0700
                Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-02 04:18 -0700
                Re: bad alloc Dombo <dombo@disposable.invalid> - 2011-09-03 18:37 +0200
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-03 13:39 -0700
                Re: bad alloc red floyd <no.spam.here@its.invalid> - 2011-09-03 13:45 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-03 13:51 -0700
                Re: bad alloc Sjouke Burry <burryNULNULFOUR@PPLLAANNEETT.NNLL> - 2011-09-04 00:14 +0200
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 15:51 -0700
                Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-09-04 12:15 +1200
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-04 05:00 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:13 -0700
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 15:45 -0700
                Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-02 15:40 +0000
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-02 09:33 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 14:06 -0700
                Re: bad alloc "io_x" <a@b.c.invalid> - 2011-09-03 10:12 +0200
            Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 04:21 -0700
      Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 01:22 -0700
        Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 05:18 -0700
          Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-08-31 06:36 -0700
            Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 09:33 -0700
              Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-01 00:20 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 04:25 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-01 12:51 +0100
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 06:04 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-01 06:26 -0700
              Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-01 16:58 -0700
                Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-01 17:25 -0700
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 16:02 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:20 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 19:13 -0700
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:39 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 17:26 -0700
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:35 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 17:28 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 21:01 -0700
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 16:14 -0700
                Re: bad alloc "io_x" <a@b.c.invalid> - 2011-09-05 10:31 +0200
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:36 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-06 04:09 -0700
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:49 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 17:11 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-07 00:24 -0700
          Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-08-31 09:59 -0700
            Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-31 11:24 -0700
              Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-01 16:29 -0700
                Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-01 16:42 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-01 21:37 -0700
                Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-09-02 17:45 +1200
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-03 16:20 -0700
                Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-09-04 12:03 +1200
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-04 10:56 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:50 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-06 00:12 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 03:04 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-07 00:08 -0700
                Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-07 02:33 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-07 04:28 -0700
                Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-06 13:43 +0000
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-06 07:37 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-07 00:11 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-07 04:29 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-07 05:38 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-07 18:17 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-08 00:45 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 06:58 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-06 09:21 -0700
                Re: bad alloc "Fred Zwarts \(KVI\)" <F.Zwarts@KVI.nl> - 2011-09-07 09:10 +0200
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-07 04:18 -0700
                Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-07 10:34 +0000
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-07 04:00 -0700
                Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-08 12:11 +0000
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-08 06:27 -0700
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:52 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-06 17:16 -0700
                Re: bad alloc Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-09-07 02:39 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-07 04:14 -0700
                Re: bad alloc Ian Collins <ian-news@hotmail.com> - 2011-09-06 17:00 +1200
                Re: bad alloc Miles Bader <miles@gnu.org> - 2011-09-06 14:51 +0900
                Re: bad alloc James Kanze <james.kanze@gmail.com> - 2011-09-06 15:55 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-05 18:44 -0700
                Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-07 10:20 +0000
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-07 03:40 -0700
                Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-13 17:06 +0000
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-13 12:09 -0700
                Re: bad alloc "Paul" <pchristor@yahoo.co.uk> - 2011-09-14 00:18 +0100
                Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-14 15:11 +0000
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-14 11:17 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-15 04:17 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-15 06:50 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-15 07:31 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-15 07:59 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-16 00:19 -0700
                Re: bad alloc Noah Roberts <roberts.noah@gmail.com> - 2011-09-17 10:13 -0700
                Re: bad alloc Goran <goran.pusic@gmail.com> - 2011-09-18 10:07 -0700
                Re: bad alloc yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-09-16 15:41 +0000
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-16 11:26 -0700
                Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-16 15:38 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-17 04:25 -0700
                Re: bad alloc Joshua Maurice <joshuamaurice@gmail.com> - 2011-09-01 23:17 -0700
                Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-09-02 04:03 -0700
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 04:37 -0700
                Re: bad alloc Leigh Johnston <leigh@i42.co.uk> - 2011-09-02 15:15 +0100
                Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-09-02 07:35 -0700
    Re: bad alloc Adam Skutt <askutt@gmail.com> - 2011-08-30 16:06 -0700
      Re: bad alloc Paul <pchristor@yahoo.co.uk> - 2011-08-30 16:45 -0700

csiph-web