[sr-dev] crash at f_malloc.c

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 22 23:09:06 CEST 2015


I think I found the issue in domain module and pushed a fix for it -- 
the hash tables used by domain module were not properly filled with 0
affer allocation. Can you try with latest master of latest 4.3 branch?

Cheers,
Daniel

On 22/09/15 18:20, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> bt full
>>
>> frame 0
>> p *np
> below without -O2,
>
> -- juhabt full
> #0  0x00007f806f885870 in hash_table_free (hash_table=0x7f8075320e40) at hash.c:230
>         i = 128
>         np = 0x298bd800
>         next = 0x7f0100000001
>         ap = 0x0
>         next_ap = 0x94ba8dd1faa09900
> #1  0x00007f806f87e168 in reload_tables () at domain.c:305
>         cols = {0x1, 0x7f8075321270, 0x415f40 <_start>, 0x74f35850}
>         res = 0x0
>         row = 0x7ffc76d29bd0
>         new_hash_table = 0x7f8074f351f8
>         i = 32640
>         type = 31884
>         did = {s = 0x623c5f <split_frag+201> "\270", len = 16}
>         domain = {s = 0x7f8075321260 "\020", len = 1962061824}
>         name = {s = 0x7f8075321260 "\020", len = 29400432}
>         value = {s = 0x7f8075321280 "\020", len = 1966215824}
>         val = {n = 1993514000, s = {s = 0x176d29c10 <error: Cannot access memory at address 0x176d29c10>, 
>             len = 1962104912}, re = 0x176d29c10}
>         __FUNCTION__ = "reload_tables"
> #2  0x00007f806f88806c in mod_init () at domain_mod.c:231
>         __FUNCTION__ = "mod_init"
> #3  0x000000000053570b in init_mod (m=0x7f807c8d8580) at sr_module.c:943
>         __FUNCTION__ = "init_mod"
> #4  0x0000000000535476 in init_mod (m=0x7f807c8d8910) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #5  0x0000000000535476 in init_mod (m=0x7f807c8d8cd0) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #6  0x0000000000535476 in init_mod (m=0x7f807c8d8f40) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #7  0x0000000000535476 in init_mod (m=0x7f807c8d95b0) at sr_module.c:940
> ---Type <return> to continue, or q <return> to quit---
>         __FUNCTION__ = "init_mod"
> #8  0x0000000000535476 in init_mod (m=0x7f807c8d9890) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #9  0x0000000000535476 in init_mod (m=0x7f807c8d9c90) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #10 0x0000000000535476 in init_mod (m=0x7f807c8da560) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #11 0x0000000000535476 in init_mod (m=0x7f807c8daa70) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #12 0x0000000000535476 in init_mod (m=0x7f807c8dada0) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #13 0x0000000000535476 in init_mod (m=0x7f807c8db380) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #14 0x0000000000535476 in init_mod (m=0x7f807c8db5f0) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #15 0x0000000000535476 in init_mod (m=0x7f807c8db940) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #16 0x0000000000535476 in init_mod (m=0x7f807c8dc230) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #17 0x0000000000535476 in init_mod (m=0x7f807c8dc8a0) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #18 0x0000000000535476 in init_mod (m=0x7f807c8dcc80) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #19 0x0000000000535476 in init_mod (m=0x7f807c8dd900) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #20 0x0000000000535476 in init_mod (m=0x7f807c8ddae0) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #21 0x0000000000535476 in init_mod (m=0x7f807c8ddcc0) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #22 0x0000000000535476 in init_mod (m=0x7f807c8ddfa0) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> ---Type <return> to continue, or q <return> to quit---
> #23 0x0000000000535476 in init_mod (m=0x7f807c8de180) at sr_module.c:940
>         __FUNCTION__ = "init_mod"
> #24 0x0000000000535a0b in init_modules () at sr_module.c:972
>         t = 0x2cb3d66f
>         i = 2089519184
>         __FUNCTION__ = "init_modules"
> #25 0x000000000052c1b0 in main (argc=17, argv=0x7ffc76d2a568) at main.c:2474
>         cfg_stream = 0x18c2010
>         c = -1
>         r = 0
>         tmp = 0x7ffc76d2bf69 ""
>         tmp_len = 32640
>         port = 1
>         proto = 0
>         options = 0x7223c0 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:"
>         ret = -1
>         seed = 2169338037
>         rfd = 4
>         debug_save = 0
>         debug_flag = 0
>         dont_fork_cnt = 0
>         n_lst = 0xf0b6ff
>         p = 0x6e471d <__libc_csu_init+77> "H\203\303\001H9\353u\352H\203\304\b[]A\\A]A^A_\303ff.\017\037\204"
>         __FUNCTION__ = "main"
> (gdb) frame 0
> #0  0x00007f806f885870 in hash_table_free (hash_table=0x7f8075320e40) at hash.c:230
> 230	in hash.c
> (gdb) p *np
> Cannot access memory at address 0x298bd800
>
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat




More information about the sr-dev mailing list