### Description
Hello,
I get a segfault with kamailio 5.0.6 on a centos 7
(gdb) #0 0x00007f8d37f1c35e in clean_routine (ticks=43668909, param=0x0) at pike_funcs.c:206 #1 0x000000000047deb2 in compat_old_handler (ti=698702557, tl=0x7f8d38ed01a8, data=0x7f8d38ed01a8) at core/timer.c:997 #2 0x000000000047e92d in slow_timer_main () at core/timer.c:1131 #3 0x0000000000422fc4 in main_loop () at main.c:1679 #4 0x0000000000429e4d in main (argc=7, argv=0x7ffe1787ac98) at main.c:2642 (gdb) bt full #0 0x00007f8d37f1c35e in clean_routine (ticks=43668909, param=0x0) at pike_funcs.c:206 mask = "\000\000\000\000\000\000\000\000\000 \000\020\000\000\000\000\000\000\000\000\000\000\004\002\000\000\000\000\000\000\000" head = {next = 0x7f8d3aa110f8, prev = 0x7f8d39d36470} ll = 0x0 dad = 0x29a55ad00a4c9c0 node = 0xfffffffffffffff0 i = 77 __FUNCTION__ = "clean_routine" __PRETTY_FUNCTION__ = "clean_routine" #1 0x000000000047deb2 in compat_old_handler (ti=698702557, tl=0x7f8d38ed01a8, data=0x7f8d38ed01a8) at core/timer.c:997 t = 0x7f8d38ed01a8 #2 0x000000000047e92d in slow_timer_main () at core/timer.c:1131 n = 12 ret = 4294967295 tl = 0x7f8d38ed01a8 i = 925 __FUNCTION__ = "slow_timer_main" #3 0x0000000000422fc4 in main_loop () at main.c:1679 i = 20 pid = 0 si = 0x0 si_desc = "udp receiver child=19 sock=185.190.125.3:6000\000\000\000\006\000\000\000\000\000\000\000H\342\370r\231\177\000\000\060\251\207\027\376\177\000\000p'\355\070\215\177\000\000\240\262<m\231\177\000\000\210\330Et\231\177\000\000 \202<m\231\177\000\000\003\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\200\066\070\215\177\000" nrprocs = 20 woneinit = 1 __FUNCTION__ = "main_loop" #4 0x0000000000429e4d in main (argc=7, argv=0x7ffe1787ac98) at main.c:2642 cfg_stream = 0x183e010 c = -1 r = 0 tmp = 0x7ffe1787b86e "" tmp_len = 0 port = 0 proto = 2496 options = 0x7387e0 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:" ret = -1 seed = 1816923433 rfd = 4 debug_save = 0 debug_flag = 0 dont_fork_cnt = 0 n_lst = 0x7ffe1787ab50 p = 0x7f997c3cb9ad <intel_check_word+173> "H\205\300t\025\017\266P\003\017\266\312D9\371\017\204", <incomplete sequence \316> st = {st_dev = 20, st_ino = 30979, st_nlink = 2, st_mode = 16832, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1530437017, tv_nsec = 316150519}, st_mtim = {tv_sec = 1542572308, tv_nsec = 811767469}, st_ctim = {tv_sec = 1542572308, tv_nsec = 811767469}, __unused = {0, 0, 0}} __FUNCTION__ = "main"
(gdb) info locals cfg_stream = 0x183e010 c = -1 r = 0 tmp = 0x7ffe1787b86e "" tmp_len = 0 port = 0 proto = 2496 options = 0x7387e0 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:" ret = -1 seed = 1816923433 rfd = 4 debug_save = 0 debug_flag = 0 dont_fork_cnt = 0 n_lst = 0x7ffe1787ab50 p = 0x7f997c3cb9ad <intel_check_word+173> "H\205\300t\025\017\266P\003\017\266\312D9\371\017\204", <incomplete sequence \316> st = {st_dev = 20, st_ino = 30979, st_nlink = 2, st_mode = 16832, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1530437017, tv_nsec = 316150519}, st_mtim = {tv_sec = 1542572308, tv_nsec = 811767469}, st_ctim = {tv_sec = 1542572308, tv_nsec = 811767469}, __unused = {0, 0, 0}} __FUNCTION__ = "main"
(gdb) list 201 continue; 202 203 lock_tree_branch( i ); 204 for( ll=head.next ; ll!=&head ; ) { 205 node = ll2ipnode( ll ); 206 ll = ll->next; 207 /* skip nodes from a different branch */ 208 if (node->branch!=i) 209 continue; 210 (gdb)
I have no SIP traffic and no idea how to reproduce for the moment
Laurent
Did you get any error messages in syslog at the moment of the crash?
Was you system to dump a core file per pid (files like core.pid) or you just got a `core` file?
I pushed some safety checks, but they didn't really seem necessary, so maybe this was just a core file as a side effect of another reason for crash, with the core file being overwritten.
Hello,
Sorry for my late answer, sorry I have not log in syslog I think they was too many log and they was dropped.
Regarding the core, it’s for a specific pid I think ( core.30693)
BR
Laurent
De : Daniel-Constantin Mierla notifications@github.com Envoyé : mardi, 29 janvier 2019 14:29 À : kamailio/kamailio kamailio@noreply.github.com Cc : Laurent Schweizer laurent.schweizer@peoplefone.com; Author author@noreply.github.com Objet : Re: [kamailio/kamailio] kamailio 5.0.6 segfault in pike module (#1822)
Did you get any error messages in syslog at the moment of the crash?
Was you system to dump a core file per pid (files like core.pid) or you just got a core file?
I pushed some safety checks, but they didn't really seem necessary, so maybe this was just a core file as a side effect of another reason for crash, with the core file being overwritten.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/kamailio/kamailio/issues/1822#issuecomment-458539280, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ASaPZJOT4fQ66nJ0svRHsPr3gmz3a-Wtks5vIEx-gaJpZM4aR8Pe.
Closed #1822.
I pushed some safety checks a few weeks ago, should be also backported in 5.2 branch. If still appears, reopen and add the new backtrace, be sure the patch is applied to your branch.