[asterisk-bugs] [JIRA] (ASTERISK-24774) Segfault in ast_context_destroy

Corey Farrell (JIRA) noreply at issues.asterisk.org
Thu Feb 12 11:31:35 CST 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224885#comment-224885 ] 

Corey Farrell commented on ASTERISK-24774:
------------------------------------------

I've reproduced this with a simpler test - using the following modules.conf:
{noformat}
[modules]
autoload=no
load => pbx_config.so
load => res_ael_share.so
load => pbx_ael.so
{noformat}

Start Asterisk with the attached extensions.conf.  extensions.ael can have anything or nothing more than "globals {};".

>From Asterisk CLI:
{noformat}
*CLI> module unload pbx_config.so 
    -- Remove test/agi4/1, registrar=pbx_config; con=<nil>((nil)); con->root=(nil)
    -- Remove test/agi4/2, registrar=pbx_config; con=<nil>((nil)); con->root=(nil)
[Feb 12 12:20:42] ERROR[19590]: pbx.c:7192 ast_context_remove_extension_callerid2: Could not find priority 2 of exten agi4 in context test!
    -- Remove test/agi4/1, registrar=pbx_config; con=<nil>((nil)); con->root=(nil)
Unloaded pbx_config.so
*CLI> module load pbx_config.so
  == Parsing '/home/cfarrell/svn/origsvn/11-2/live/etc/asterisk/extensions.conf': Found
    -- Registered extension context 'test'; registrar: pbx_config
    -- Added extension 'agi4' priority 1 to test
    -- Added extension 'agi4' priority 2 to test
    -- Added extension 'agi4' priority 1 (CID match '') to test
  == Parsing '/home/cfarrell/svn/origsvn/11-2/live/etc/asterisk/users.conf': Found

Program received signal SIGSEGV, Segmentation fault.
#0  0x00000000004fdda8 in ast_hashtab_start_traversal (tab=0x0) at hashtab.c:711
#1  0x000000000054e1d6 in context_merge (extcontexts=0x7ffff5606d18 <local_contexts>, exttable=0xe860e0, context=0xe79af0, registrar=0x7ffff5402d50 <registrar> "pbx_config") at pbx.c:8846
#2  0x000000000054e62d in ast_merge_contexts_and_delete (extcontexts=0x7ffff5606d18 <local_contexts>, exttable=0xe860e0, registrar=0x7ffff5402d50 <registrar> "pbx_config") at pbx.c:8962
#3  0x00007ffff5402b9c in pbx_load_module () at pbx_config.c:1872
#4  0x00007ffff5402c6f in load_module () at pbx_config.c:1894
#5  0x000000000050b695 in start_resource (mod=0xe81cc0) at loader.c:897
#6  0x000000000050ba77 in load_resource (resource_name=0x8a73ec "pbx_config.so", global_symbols_only=0, resource_heap=0x0, required=0) at loader.c:985
#7  0x000000000050bcfe in ast_load_resource (resource_name=0x8a73ec "pbx_config.so") at loader.c:1001
#8  0x000000000049bfc7 in handle_load (e=0x850db0 <cli_cli+2800>, cmd=-4, a=0x7fffffffbb50) at cli.c:253
#9  0x00000000004a46fe in ast_cli_command_full (uid=-1, gid=-1, fd=1, s=0x8a79f0 "module load pbx_config.so ") at cli.c:2691
#10 0x00000000004460dc in consolehandler (s=0x8a79f0 "module load pbx_config.so ") at asterisk.c:2094
#11 0x000000000044d28d in main (argc=2, argv=0x7fffffffe138) at asterisk.c:4412
{noformat}

After unloading pbx_config other dialplan related operations (like dialplan show) will cause crashes as well, but the backtrace is less useful.

> Segfault in ast_context_destroy
> -------------------------------
>
>                 Key: ASTERISK-24774
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24774
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/PBX
>    Affects Versions: 11.16.0
>            Reporter: Corey Farrell
>         Attachments: backtrace_11054.txt, backtrace_noload-pbx_lua.txt, extensions.conf, testsuite-pbx-callerid_match.patch
>
>
> While attempting to resolve open channels in testsuite/tests/pbx/callerid_match I am experiencing a segfault every time.  I do not know AGI enough to understand why, but running 'agi.finish()' on the calls in this test seems to cause a segfault on shutdown (somehow contexts become corrupted).



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list