[asterisk-dev] [Code Review] 4463: core: Introduce chaos into memory allocations
Corey Farrell
reviewboard at asterisk.org
Mon Mar 9 08:19:22 CDT 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4463/#review14613
-----------------------------------------------------------
/branches/13/include/asterisk/utils.h
<https://reviewboard.asterisk.org/r/4463/#comment25168>
Should protect with #ifndef DEBUG_CHAOS_ALLOC_CHANGE. This way 100000 is the default unless it was already set by command-line CFLAGS.
/branches/13/include/asterisk/utils.h
<https://reviewboard.asterisk.org/r/4463/#comment25169>
Can we make this:
if (DEBUG_CHAOS_ENABLED && (ast_random() % CHANGE == 0)) { \
And above this macro we can have:
#ifndef DEBUG_CHAOS_ENABLED
#define DEBUG_CHAOS_ENABLED 1
#endif
This way it can be overridden with CFLAGS -DDEBUG_CHAOS_ENABLED=ast_fully_booted to delay chaos until initialization is completed. Would be nice so we can run tests with chaos against a correctly/fully initialized system.
/branches/13/main/utils.c
<https://reviewboard.asterisk.org/r/4463/#comment25170>
This looks like it should be applied to 11 as well.
/branches/13/main/xmldoc.c
<https://reviewboard.asterisk.org/r/4463/#comment25171>
Applies to 11.
/branches/13/main/xmldoc.c
<https://reviewboard.asterisk.org/r/4463/#comment25172>
Applies to 11.
- Corey Farrell
On March 7, 2015, 1:01 a.m., Scott Griepentrog wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4463/
> -----------------------------------------------------------
>
> (Updated March 7, 2015, 1:01 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> Introduce chaotic (random) failures into certain critical operations to force improvements to error handling.
>
> This patch introduces the DEBUG_CHAOS random failure mechanism and adds it to memory allocation wrappers in utils.h. To be activated, DEBUG_CHAOS must be enabled in menuselect.
>
> The failure rate (1 in X) is controlled by changing the define DEBUG_CHAOS_CHANCES_1IN in utils.h.
>
>
> Diffs
> -----
>
> /branches/13/main/xmldoc.c 432613
> /branches/13/main/utils.c 432613
> /branches/13/main/endpoints.c 432613
> /branches/13/main/config.c 432613
> /branches/13/main/codec_builtin.c 432613
> /branches/13/main/asterisk.c 432613
> /branches/13/include/asterisk/utils.h 432613
> /branches/13/build_tools/cflags.xml 432613
>
> Diff: https://reviewboard.asterisk.org/r/4463/diff/
>
>
> Testing
> -------
>
> I'm unable to get Asterisk to actually start with 1 in 100,000 failure rate.
>
>
> Thanks,
>
> Scott Griepentrog
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150309/65c3a214/attachment-0001.html>
More information about the asterisk-dev
mailing list