[asterisk-bugs] [JIRA] (ASTERISK-26312) pbx_lua: Crash occurs when lua code executing

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Wed Aug 24 20:05:56 CDT 2016


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

Richard Mudgett edited comment on ASTERISK-26312 at 8/24/16 8:05 PM:
---------------------------------------------------------------------

Thanks for the report! In order to maximize efficiently, there are project guidelines for how to report issues. Please read through the Asterisk Issue Guidelines [1]. After reading the guidelines, please clean up this issue so that bug marshals can more easily help you.

In particular:
1. Don't post extensive debug or logs inside the Description or Comment fields.
2. Use the Description field for a description of the issue, referencing *attached* debug with links or notes.
3. Use the Comment fields for discussion regarding the issue.
4. If you need to put a few lines of debug or logs into any field, surround the text with \{noformat\} tags to help us read it easily.
5. Attach files with a '.txt' extension where possible so that they can be analyzed futher by bug marshals.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines




was (Author: rnewton):
Thanks for the report! In order to maximize efficiently, there are project guidelines for how to report issues. Please read through the Asterisk Issue Guidelines [1]. After reading the guidelines, please clean up this issue so that bug marshals can more easily help you.

In particular:
1. Don't post extensive debug or logs inside the Description or Comment fields.
2. Use the Description field for a description of the issue, referencing *attached* debug with links or notes.
3. Use the Comment fields for discussion regarding the issue.
4. If you need to put a few lines of debug or logs into any field, surround the text with {noformat} tags to help us read it easily.
5. Attach files with a '.txt' extension where possible so that they can be analyzed futher by bug marshals.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines



> pbx_lua: Crash occurs when lua code executing
> ---------------------------------------------
>
>                 Key: ASTERISK-26312
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26312
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: PBX/pbx_lua
>    Affects Versions: 1.8.15.1, 13.8.0, 13.11.0
>         Environment: Linux 3.19.0-66-generic #74-Ubuntu SMP Tue Jul 19 15:07:04 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Yuriy Topin
>            Assignee: Yuriy Topin
>            Severity: Minor
>
> Hi,
> We uses asterisk and from time to time improve logic in extensions.lua. After some changes in extensions.lua, asterisk has been crached. I've tried to make some changes but realy for me not clear why after some changes in lua asterisk  craches. 
> I've tried different version of asterisk, try reinstall lua but without success.
> Have found simillar question on the forum but it without answer.
> Lua code example:
> bt's output:
> #0  0x00007ffff59b4267 in __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
> #1  0x00007ffff59b5eca in __GI_abort () at abort.c:89
> #2  0x00007ffff59f7c53 in __libc_message (do_abort=do_abort at entry=1, fmt=fmt at entry=0x7ffff5b101a8 "*** Error in `%s': %s: 0x%s ***\n")
>     at ../sysdeps/posix/libc_fatal.c:175
> #3  0x00007ffff5a00391 in malloc_printerr (ptr=<optimized out>, str=0x7ffff5b0c2dd "corrupted double-linked list", action=1) at malloc.c:4965
> #4  _int_free (av=0x7fff74000020, p=<optimized out>, have_lock=0) at malloc.c:3981
> #5  0x00007ffff5a0389c in __GI___libc_free (mem=<optimized out>) at malloc.c:2950
> #6  0x00007fff8f9d22d9 in l_alloc () from /usr/lib/asterisk/modules/pbx_lua.so
> #7  0x00007fff8f9ca4fe in luaM_realloc_ () from /usr/lib/asterisk/modules/pbx_lua.so
> #8  0x00007fff8f9ce868 in luaH_free () from /usr/lib/asterisk/modules/pbx_lua.so
> #9  0x00007fff8f9c9455 in sweeplist () from /usr/lib/asterisk/modules/pbx_lua.so
> #10 0x00007fff8f9ca231 in luaC_freeall () from /usr/lib/asterisk/modules/pbx_lua.so
> #11 0x00007fff8f9cdafe in close_state () from /usr/lib/asterisk/modules/pbx_lua.so
> #12 0x00007fff8f9c0c62 in lua_state_destroy (data=0x7fff74003520) at pbx_lua.c:129
> #13 0x00000000004f91a1 in ast_datastore_free (datastore=0x7fff74001f30) at datastore.c:71
> #14 0x00000000004b324f in ast_channel_destructor (obj=0x7fff6400d518) at channel.c:2209
> #15 0x000000000045de08 in internal_ao2_ref (user_data=0x7fff6400d518, delta=-1, file=0x628cab "astobj2.c", line=516, 
>     func=0x628ed1 <__FUNCTION__.8824> "__ao2_ref") at astobj2.c:445
> #16 0x000000000045e0b9 in __ao2_ref (user_data=0x7fff6400d518, delta=-1) at astobj2.c:516
> #17 0x00000000004b4a26 in ast_hangup (chan=0x7fff6400d518) at channel.c:2692
> #18 0x000000000057b121 in __ast_pbx_run (c=0x7fff6400d518, args=0x0) at pbx.c:4459
> #19 0x000000000057b4f1 in pbx_thread (data=0x7fff6400d518) at pbx.c:4551
> #20 0x0000000000601cd5 in dummy_start (data=0x7fff64012810) at utils.c:1237
> #21 0x00007ffff649d6aa in start_thread (arg=0x7fff6cda9700) at pthread_create.c:333
> #22 0x00007ffff5a85eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
> bt-full's output
> #0  0x00007ffff59b4267 in __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
>         resultvar = 0
>         pid = 7323
>         selftid = 7371
> #1  0x00007ffff59b5eca in __GI_abort () at abort.c:89
>         save_stage = 2
>         act = {__sigaction_handler = {sa_handler = 0x200000000, sa_sigaction = 0x200000000}, sa_mask = {__val = {21163024, 140735019648224, 
>               8594514105, 21162992, 21162912, 140735019648592, 4583756, 32, 140735019648296, 104, 140734871177040, 326417514571, 51, 0, 21162992, 
>               140735019648368}}, sa_flags = 1946157088, sa_restorer = 0x5}
>         sigs = {__val = {32, 0 <repeats 15 times>}}
> #2  0x00007ffff59f7c53 in __libc_message (do_abort=do_abort at entry=1, fmt=fmt at entry=0x7ffff5b101a8 "*** Error in `%s': %s: 0x%s ***\n")
>     at ../sysdeps/posix/libc_fatal.c:175
>         ap = {{gp_offset = 40, fp_offset = 32767, overflow_arg_area = 0x7fff6cda87d0, reg_save_area = 0x7fff6cda8760}}
>         fd = 22
>         on_2 = <optimized out>
>         list = <optimized out>
>         nlist = <optimized out>
>         cp = <optimized out>
>         written = <optimized out>
> #3  0x00007ffff5a00391 in malloc_printerr (ptr=<optimized out>, str=0x7ffff5b0c2dd "corrupted double-linked list", action=1) at malloc.c:4965
>         buf = "00007fff74071b60"
>         cp = <optimized out>
> #4  _int_free (av=0x7fff74000020, p=<optimized out>, have_lock=0) at malloc.c:3981
>         size = 176
>         fb = <optimized out>
>         nextchunk = <optimized out>
>         nextsize = 1552
>         prevsize = <optimized out>
>         bck = <optimized out>
>         fwd = <optimized out>
>         errstr = 0x0
>         locked = <optimized out>
> #5  0x00007ffff5a0389c in __GI___libc_free (mem=<optimized out>) at malloc.c:2950
>         ar_ptr = <optimized out>
>         p = <optimized out>
>         hook = <optimized out>
> #6  0x00007fff8f9d22d9 in l_alloc () from /usr/lib/asterisk/modules/pbx_lua.so
> No symbol table info available.
> #7  0x00007fff8f9ca4fe in luaM_realloc_ () from /usr/lib/asterisk/modules/pbx_lua.so
> No symbol table info available.
> #8  0x00007fff8f9ce868 in luaH_free () from /usr/lib/asterisk/modules/pbx_lua.so
> No symbol table info available.
> #9  0x00007fff8f9c9455 in sweeplist () from /usr/lib/asterisk/modules/pbx_lua.so
> No symbol table info available.
> #10 0x00007fff8f9ca231 in luaC_freeall () from /usr/lib/asterisk/modules/pbx_lua.so
> No symbol table info available.
> #11 0x00007fff8f9cdafe in close_state () from /usr/lib/asterisk/modules/pbx_lua.so
> No symbol table info available.
> #12 0x00007fff8f9c0c62 in lua_state_destroy (data=0x7fff74003520) at pbx_lua.c:129
> No locals.
> #13 0x00000000004f91a1 in ast_datastore_free (datastore=0x7fff74001f30) at datastore.c:71
>         res = 0
> #14 0x00000000004b324f in ast_channel_destructor (obj=0x7fff6400d518) at channel.c:2209
>         chan = 0x7fff6400d518
>         vardata = 0x7fff6400d4c0
>         f = 0x63728b
>         headp = 0x53ccc6 <__ast_pthread_mutex_unlock+39>
>         datastore = 0x7fff74001f30
>         device_name = "\302/c\000\000\000\000\000\374Ac\000\000\000\000\000\260\212\332l\254\016\000\000\313\rc\000\000\000\000\000`\213\332l\377\177\000\000\370\324\000d\000\000\000\000 \213\332l\377\177\000\000A\331E\000\000\000\000\000Єc\000\000\000\000\000\030\325\000d\377\177\000"
>         callid = 0x54265e <ast_log+343>
>         __PRETTY_FUNCTION__ = "ast_channel_destructor"
> #15 0x000000000045de08 in internal_ao2_ref (user_data=0x7fff6400d518, delta=-1, file=0x628cab "astobj2.c", line=516, 
>     func=0x628ed1 <__FUNCTION__.8824> "__ao2_ref") at astobj2.c:445
>         obj = 0x7fff6400d4f8
>         obj_mutex = 0x63728b
>         obj_rwlock = 0x7fff6400d518
>         current_value = 0
>         ret = 1
>         __PRETTY_FUNCTION__ = "internal_ao2_ref"
> #16 0x000000000045e0b9 in __ao2_ref (user_data=0x7fff6400d518, delta=-1) at astobj2.c:516
>         __FUNCTION__ = "__ao2_ref"
> #17 0x00000000004b4a26 in ast_hangup (chan=0x7fff6400d518) at channel.c:2692
>         __PRETTY_FUNCTION__ = "ast_hangup"
> #18 0x000000000057b121 in __ast_pbx_run (c=0x7fff6400d518, args=0x0) at pbx.c:4459
>         found = 1
> ---Type <return> to continue, or q <return> to quit---
>         res = -1
>         autoloopflag = 0
>         error = 1
>         pbx = 0x7fff74001c50
>         callid = 0x0
>         __PRETTY_FUNCTION__ = "__ast_pbx_run"
> #19 0x000000000057b4f1 in pbx_thread (data=0x7fff6400d518) at pbx.c:4551
>         c = 0x7fff6400d518
> #20 0x0000000000601cd5 in dummy_start (data=0x7fff64012810) at utils.c:1237
>         __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {0, -4826640983371337144, 0, 140735207204863, 140735019653568, 0, 
>                 -4826640983396502968, 4826322696954917448}, __mask_was_saved = 0}}, __pad = {0x7fff6cda8ef0, 0x0, 0x0, 0x0}}
>         __cancel_routine = 0x45153f <ast_unregister_thread>
>         __cancel_arg = 0x7fff6cda9700
>         __not_first_call = 0
>         ret = 0x0
>         a = {start_routine = 0x57b4cc <pbx_thread>, data = 0x7fff6400d518, 
>           name = 0x7fff64014370 "pbx_thread", ' ' <repeats 11 times>, "started at [ 4577] pbx.c ast_pbx_start()"}
> #21 0x00007ffff649d6aa in start_thread (arg=0x7fff6cda9700) at pthread_create.c:333
>         __res = <optimized out>
>         pd = 0x7fff6cda9700
>         now = <optimized out>
>         unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140735019652864, 4826321873244467784, 0, 140735207204863, 140735019653568, 0, 
>                 -4826640983373434296, -4826338452604374456}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, 
>               cleanup = 0x0, canceltype = 0}}}
>         not_first_call = <optimized out>
>         pagesize_m1 = <optimized out>
>         sp = <optimized out>
>         freesize = <optimized out>
>         __PRETTY_FUNCTION__ = "start_thread"
> #22 0x00007ffff5a85eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
> No locals.



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



More information about the asterisk-bugs mailing list