Hi,

I am seeing a crash in the debugger module. It looks similar to http://sip-router.org/tracker/index.php?do=details&task_id=423 but is reproducible on shutdown.

I am running latest 4.2.4.

It looks like the ‘get_debug_level’ function is called after the debugger module has been destroyed.

Do we need to unset the per-module callback from the mod_destroy function (e.g. with set_module_debug_level_cb(NULL))?

 

Details of crash:

 

loadmodule "debugger.so"

# ----- debugger params -----

modparam("debugger", "mod_level_mode", 1)

modparam("debugger", "mod_hash_size", 5)

 

(gdb) bt full

#0  0x00007f24e9572990 in dbg_get_mod_debug_level (mname=0x6f9974 "core", mnlen=4, mlevel=0x7fffe76051ac) at debugger_api.c:1224

        idx = 14

        hid = 1863578990

        it = 0x0

#1  0x000000000046dd00 in get_debug_level (mname=0x6f9974 "core", mnlen=4) at dprint.c:137

        mlevel = 3

#2  0x000000000049f6f0 in handle_sigs () at main.c:803

        chld = -1

        chld_status = 0

        memlog = -748755048

        __FUNCTION__ = "handle_sigs"

#3  0x00000000004a6fbf in main_loop () at main.c:1757

        i = 4

        pid = 20691

        si = 0x0

        si_desc = "udp receiver child=3 sock=10.62.18.63:5060\000\000\000\000\000\000\016\b\000\000\377\177\000\000\260\344^\323$\177\000\000\000\000\000\020\004\000\000\000\260\344^\323$\177\000\000\060SA\000\000\000\000\000\000W`\347\001\000\000\000\220T`\347\377\177\000\000>dN\000\000\000\000\000\210q(\352z\000\000\000~~p\000\000\000\000"

        nrprocs = 4

        __FUNCTION__ = "main_loop"

#4  0x00000000004ab8e3 in main (argc=13, argv=0x7fffe7605708) at main.c:2581

        cfg_stream = 0xc56010

        c = -1

        r = 0

        tmp = 0x7fffe7605f64 ""

        tmp_len = 0

        port = 0

        proto = 32767

        options = 0x6fccc0 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:"

        ret = -1

        seed = 1220709785

        rfd = 4

        debug_save = 0

        debug_flag = 0

        dont_fork_cnt = 0

        n_lst = 0xbf

        p = 0x7fffe76055de ""

        __FUNCTION__ = "main"

(gdb) list

1219             * - use fprintf(stderr, ...) if need for troubleshooting

1220             * - it will loop otherwise */

1221            if(_dbg_mod_table==NULL)

1222                    return -1;

1223

1224            if(cfg_get(dbg, dbg_cfg, mod_level_mode)==0)

1225                    return -1;

1226

1227            if(_dbg_get_mod_debug_level!=0)

1228                    return -1;

(gdb) p dbg_cfg

$1 = (void *) 0x7f24d386298c

(gdb) p *(struct cfg_group_dbg*)dbg_cfg

Cannot access memory at address 0x7f24d386298c


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you for understanding.