Test the OOM situation

Peter Leonov gojpeg at gmail.com
Thu May 20 01:25:03 MSD 2010


Hi,

On 19.05.2010, at 17:31, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Wed, May 19, 2010 at 04:01:07PM +0400, Peter Leonov wrote:
>
>> On 18.05.2010, at 23:26, Maxim Dounin wrote:
>>
> [...]
>>> Injecting random errors into allocation routines proven to be much
>>> more usable.  Just for completeness: attached trivial patch which
>>> I used while searching for allocation error handling bugs in nginx
>>> itself.
>>
>> That is near what I was looking for :)
>>
>> But it gives a very interesting results. For example a crash within  
>> the core:
>>
>> 40740 Bus error               (core dumped)
>>
> [...]
> This may happen due to bugs in a module as well.
And it is so. The module may forget to finalize with NGX_ERROR the  
request on OOM situation.

> If you are able
> to reproduce the problem without non-official modules/patches -
> this probably worth further investigation.
It is impossible because the test case is written in JavaScript in  
this module.

> You may want to try to
> reproduce the problem without optimization and/or share a way to
> reproduce it.
Reproducing with ngx_random() was a pain. Now it counts the calls to  
the alloc funcs and fails at a specific moment.

IMHO, such a functionality (manageable allocation fails) is good to  
have it built into nginx. With a candy configuration and command line  
options, debug points and so on ;)

>
> Note well: last time I've tested nginx with these patches heavily
> was before 0.8.0.  But I don't see any immediate segfaults/bus
> errors while running test suite against 0.8.37 with these patches.

Thank you Maxim for your time and help, again :)

Best regards,
Peter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20100520/a85d72e1/attachment.html>


More information about the nginx-devel mailing list