You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using cfg_get in async_workers, the values cannot be retrieved. You either get a 'soft' fail with kamailio failing to assign the value, or you get a 'hard' fail and kamailio core dumps. The difference in behaviour appears to be determined by where the cfg variable is defined. If its defined in kamailio.cfg, you get a soft failure. If its defined in a cfg file which you included, you get a hard failure.
Troubleshooting
Tried MANY combinations of setting the variable in different places, different length of variable names, including different characters.
Reproduction
test_crash.cfg
#!KAMAILIO
debug=8
fork=yes
children=1
async_workers=1
listen=udp:127.0.0.1:12345
loadmodule "kex.so"
loadmodule "mi_fifo.so"
loadmodule "tm.so"
loadmodule "tmx.so"
loadmodule "sl.so"
loadmodule "uac.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "async.so"
loadmodule "xlog.so"
modparam("mi_fifo", "fifo_name", "./kamailio.fifo")
include_file "test_crash_included.cfg"
info.var = 1 desc "Info Variable"
request_route {
if(@cfg_get.info.var == 1) {
# This gets printed
xlog("Variable is 1 in request route\n");
}
if(@cfg_get.info.var_from_other_file == 1) {
# This gets printed
xlog("Variable from other file is 1 in request route\n");
}
if(t_newtran()) {
async_task_route("ASYNC_REQUEST_ROUTE");
}
exit;
}
route[ASYNC_REQUEST_ROUTE] {
if(@cfg_get.info.var == 1) {
# This doesn't get printed
xlog("Variable is 1 in async route\n");
} else {
# This assignment fails with error:
# 5(19705) ERROR: <core> [lvalue.c:405]: lval_assign(): assignment failed at pos: (48,39-48,39)
$var(test) = @cfg_get.info.var;
xlog("Variable is $var(test)\n");
}
# Crash occurs on this line
if(@cfg_get.info.var_from_other_file == 1) {
xlog("Variable from other file is 1 in async route\n");
}
t_reply("200", "OK");
}
test_crash_included.cfg
#!KAMAILIO
info.var_from_other_file = 1 desc "Var from other file"
Debugging Data
#0 0x0000000000bce7ed in select_cfg_var (res=0x7fff330e40a0, s=0x7fe5c008d400, msg=0x7fff330e5560) at cfg/cfg_select.c:215
group = 0x7fe5c0085220
var = 0x7fe5c00a1780
p = 0x4
i = 0
buf = '\000' <repeats 21 times>
__FUNCTION__ = "select_cfg_var"
#1 0x00000000007e2b56 in run_select (res=0x7fff330e40a0, s=0x7fe5c008d400, msg=0x7fff330e5560) at select.c:425
ret = 0
orig_level = 0
__FUNCTION__ = "run_select"
#2 0x000000000077735c in rval_get_tmp_str (h=0x7fff330e53a0, msg=0x7fff330e5560, tmpv=0x7fff330e40a0, rv=0x7fe5c008d3f8, cache=0x0, tmp_cache=0x7fff330e40b0) at rvalue.c:1140
r_avp = 0x7fe5c00a1a80
i = 936
__FUNCTION__ = "rval_get_tmp_str"
#3 0x00000000007796b1 in rval_convert (h=0x7fff330e53a0, msg=0x7fff330e5560, type=RV_STR, v=0x7fe5c008d3f8, c=0x0) at rvalue.c:1312
i = 0
tmp_cache = {cache_type = RV_CACHE_EMPTY, val_type = RV_NONE, c = {avp_val = {n = 0, s = {s = 0x0, len = 0}, re = 0x0}, pval = {rs = {s = 0x0, len = 0}, ri = 0, flags = 0}}, i2s = '\000' <repeats 20 times>, "\061"}
tmp = {s = 0x7fff330e40e4 "1", len = -1073079680}
ret = 0x7fe5c008f8c8
val = {p = 0x0, l = 0, s = {s = 0x0, len = -1073164176}, avps = {type = 0, name = {n = -1073164176, s = {s = 0x7fe5c008d070 "4", len = 0}, re = 0x7fe5c008d070}, index = 0}, sel = {f = {0x0, 0x7fe5c008d070, 0x0, 0x0}, param_offset = {0, 0, 0, 0, 0},
params = {{type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {
i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0},
p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 10474042, s = {s = 0x9fd23a <fm_info+46> "H\213E\370H\213P\bH\213E\340H\211\020H\213E\340H\307@(\b", len = 856571536}, p = 0x9fd23a <fm_info+46>}}, {type = 3221590032, v = {i = 0, s = {s = 0x0,
len = 282501052}, p = 0x0}}, {type = 4287552, v = {i = 856582480, s = {s = 0x7fff330e6950 "\016", len = 0}, p = 0x7fff330e6950}}, {type = SEL_PARAM_INT, v = {i = 856572832, s = {s = 0x7fff330e43a0 "`N\016\063\377\177", len = 4490637},
p = 0x7fff330e43a0}}, {type = 222472, v = {i = 296344, s = {s = 0x48598 <error: Cannot access memory at address 0x48598>, len = 297816}, p = 0x48598}}, {type = 8, v = {i = 20, s = {s = 0x14 <error: Cannot access memory at address 0x14>,
len = 0}, p = 0x14}}, {type = 3221887544, v = {i = -1073377264, s = {s = 0x7fe5c0059010 "\001", len = 0}, p = 0x7fe5c0059010}}, {type = 13319353, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = 856572032, v = {i = 10429161, s = {
s = 0x9f22e9 <fm_free+13183> "H\215e\330[A\\A]A^A_]\303UH\211\345AWAVAUATSH\201\354\230\001", len = 0}, p = 0x9f22e9 <fm_free+13183>}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = 13084848, v = {i = 0, s = {
s = 0x8100000000 <error: Cannot access memory at address 0x8100000000>, len = 13118840}, p = 0x8100000000}}, {type = 856577376, v = {i = -1073168304, s = {s = 0x7fe5c008c050 "0", len = 856576928}, p = 0x7fe5c008c050}}, {
type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0,
s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = -1073079680, s = {s = 0x7fe5c00a1a80 "\002", len = 0}, p = 0x7fe5c00a1a80}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {
i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = -1073079752}, p = 0x0}}, {type = SEL_PARAM_INT, v = {i = 0, s = {s = 0x0, len = -1073079680}, p = 0x0}}, {type = 3221813440, v = {i = 856574096,
s = {s = 0x7fff330e4890 "", len = -1073377264}, p = 0x7fff330e4890}}, {type = SEL_PARAM_INT, v = {i = 282501052, s = {s = 0x10d69fbc <error: Cannot access memory at address 0x10d69fbc>, len = 4287552}, p = 0x10d69fbc}}, {type = 856582480,
v = {i = 0, s = {s = 0x0, len = 0}, p = 0x0}}, {type = 856572224, v = {i = 7801638, s = {
s = 0x770b26 <rval_destroy+2485> "H\215e\330[A\\A]A^A_]\303UH\211\345H\203\354\020H\211}\370H\213E\370\213@\004\215P\377H\213E\370\211P\004H\213E\370\213@\004\205\300u\fH\213E\370H\211\307\350\337\340\377\377\311\303UH\211\345AWAVAUATSH\201\354", <incomplete sequence \310>, len = 0}, p = 0x770b26 <rval_destroy+2485>}}}, n = 0}, pvs = {type = PVT_NONE, getf = 0x7fe5c008d070, setf = 0x0, pvp = {pvn = {type = 0, nfree = 0x0, u = {isname = {type = 0, name = {n = 0, s = {s = 0x0, len = 0}, re = 0x0}},
dname = 0x0}}, pvi = {type = 0, u = {ival = 0, dval = 0x0}}}, trans = 0x0}, action = 0x0, bexpr = 0x0, re = {s = {s = 0x0, len = -1073164176}, regex = 0x0}}
__FUNCTION__ = "rval_convert"
#4 0x000000000077ee21 in rval_str_lop2 (h=0x7fff330e53a0, msg=0x7fff330e5560, res=0x7fff330e4890, op=RVE_STREQ_OP, l=0x7fe5c008d3f8, c1=0x0, r=0x7fe5c008db08, c2=0x0) at rvalue.c:1748
rv1 = 0x0
rv2 = 0x0
ret = 0
#5 0x000000000078207c in rval_expr_eval_int (h=0x7fff330e53a0, msg=0x7fff330e5560, res=0x7fff330e4890, rve=0x7fe5c008e210) at rvalue.c:2127
i1 = 0
i2 = 32767
ret = -1
c1 = {cache_type = RV_CACHE_EMPTY, val_type = RV_NONE, c = {avp_val = {n = 0, s = {s = 0x0, len = -1064513568}, re = 0x0}, pval = {rs = {s = 0x0, len = -1064513568}, ri = 14930880, flags = 0}},
i2s = "\000\000\000\000\000\000\000\000Z\356\210\300\345\177\000\000\300\323\343\000\000"}
c2 = {cache_type = 856572866, val_type = 32767, c = {avp_val = {n = 14930880, s = {s = 0xe3d3c0 "\364\323", <incomplete sequence \343>, len = 8191}, re = 0xe3d3c0}, pval = {rs = {s = 0xe3d3c0 "\364\323", <incomplete sequence \343>, len = 8191},
ri = -1064511906, flags = 32741}}, i2s = "\300\323\343\000\000\000\000\000:\035\214\300\000\000\000\000́\005\301\345\177"}
rv1 = 0x7fe5c008d3f8
rv2 = 0x7fe5c008db08
__FUNCTION__ = "rval_expr_eval_int"
#6 0x000000000042c222 in do_action (h=0x7fff330e53a0, a=0x7fe5c008e920, msg=0x7fff330e5560) at action.c:1030
ret = -5
v = 0
dst = {send_sock = 0x7ffffbad8000, to = {s = {sa_family = 37152, sa_data = "\276\300\345\177\000\000\004\200\255\373\377\177\000"}, sin = {sin_family = 37152, sin_port = 49342, sin_addr = {s_addr = 32741}, sin_zero = "\004\200\255\373\377\177\000"},
sin6 = {sin6_family = 37152, sin6_port = 49342, sin6_flowinfo = 32741, sin6_addr = {__in6_u = {__u6_addr8 = "\004\200\255\373\377\177\000\000Z(\016\063\377\177\000", __u6_addr16 = {32772, 64429, 32767, 0, 10330, 13070, 32767, 0}, __u6_addr32 = {
4222451716, 32767, 856565850, 32767}}}, sin6_scope_id = 0}}, id = 32767, proto = 106 'j', send_flags = {f = 40 '(', blst_imask = 14 '\016'}}
tmp = 0x7fe5c008cc20 "2"
new_uri = 0x0
end = 0x7fe5c0863600 <incomplete sequence \324>
crt = 0x7fff330e53b0 "\274\237\326\020"
cmd = 0x7fff00000000
len = 32741
user = -1056830379
uri = {user = {s = 0x7fe5c08be170 <funlockfile> "H\213\227\210", len = -1061252832}, passwd = {s = 0x7fe5fbad8004 <error: Cannot access memory at address 0x7fe5fbad8004>, len = -1061252832}, host = {
s = 0x7fe5fbad8004 <error: Cannot access memory at address 0x7fe5fbad8004>, len = -1061252832}, port = {s = 0x7fff330e26f0 "", len = 856565498}, params = {s = 0x7fff330e2700 "", len = 856565514}, sip_params = {
s = 0x7fff330e4700 "\004\200\255\373\345\177", len = -1064705906}, headers = {s = 0x0, len = 0}, port_no = 0, proto = 0, type = ERROR_URI_T, flags = (unknown: 466944), transport = {s = 0xfbad8004 <error: Cannot access memory at address 0xfbad8004>,
len = 465880}, ttl = {s = 0xfbad8004 <error: Cannot access memory at address 0xfbad8004>, len = 0}, user_param = {s = 0x7fff330e2760 "\022", <incomplete sequence \307>, len = 0}, maddr = {s = 0x7fff330e2770 "pN\016\063\377\177", len = 856565626},
method = {s = 0x7fff330e4ea0 "\001\200\255", <incomplete sequence \373>, len = 856575632}, lr = {s = 0xe <error: Cannot access memory at address 0xe>, len = 856576000}, r2 = {s = 0x7fe5c11d4a92 "", len = -1064706089}, gr = {s = 0x7fe5c11d4a92 "",
len = 0}, transport_val = {s = 0x1 <error: Cannot access memory at address 0x1>, len = 856565706}, ttl_val = {s = 0x7fe5c08be170 <funlockfile> "H\213\227\210", len = -1061252832}, user_param_val = {s = 0x7fe5c08be170 <funlockfile> "H\213\227\210",
len = -1061252832}, maddr_val = {s = 0x7fff330e4d80 "\030", len = -1061252832}, method_val = {s = 0x7fe5c11d4a8a "%x%c%x%c", len = -1061252832}, lr_val = {s = 0x7fff330e4f10 "PO\016\063", len = 0}, r2_val = {s = 0x7fff330e4dec "\345\177",
len = 856575496}, gr_val = {s = 0xfbad8004 <error: Cannot access memory at address 0xfbad8004>, len = 856575528}}
next_hop = {user = {s = 0x490 <error: Cannot access memory at address 0x490>, len = 1508521681}, passwd = {s = 0x0, len = 1508521681}, host = {s = 0x0, len = 1509247364}, port = {s = 0x2a28f71 <error: Cannot access memory at address 0x2a28f71>,
len = -1056853284}, params = {s = 0x0, len = -1064895236}, sip_params = {s = 0x7fe5c1219990 "", len = -1056881366}, headers = {s = 0x0, len = -1054683136}, port_no = 27162, proto = 49436, type = 32741, flags = (unknown: 2147483648), transport = {
s = 0x7fe5fbad8004 <error: Cannot access memory at address 0x7fe5fbad8004>, len = 1}, ttl = {s = 0xfbad8004 <error: Cannot access memory at address 0xfbad8004>, len = -2147483648}, user_param = {s = 0x7fff330e25e0 "\001", len = 856565226}, maddr = {
s = 0x7fff330e25f0 " M\016\063\377\177", len = 856565242}, method = {s = 0x7fff330e45f0 "\004\200\255", <incomplete sequence \373>, len = 0}, lr = {s = 0x7fe5fbad8004 <error: Cannot access memory at address 0x7fe5fbad8004>, len = 10}, r2 = {
s = 0x7fff330e2620 " M\016\063\377\177", len = 856565290}, gr = {s = 0x330e2630 <error: Cannot access memory at address 0x330e2630>, len = 856565306}, transport_val = {s = 0x330e4630 <error: Cannot access memory at address 0x330e4630>, len = 0},
ttl_val = {s = 0x340 <error: Cannot access memory at address 0x340>, len = 0}, user_param_val = {s = 0x0, len = 4063235}, maddr_val = {s = 0x3e60 <error: Cannot access memory at address 0x3e60>, len = 64}, method_val = {
s = 0xffffffff <error: Cannot access memory at address 0xffffffff>, len = 0}, lr_val = {s = 0x230024ffffffff <error: Cannot access memory at address 0x230024ffffffff>, len = -1061262400}, r2_val = {
s = 0x7fe5c0be9120 <_IO_2_1_stderr_> "\207(\255", <incomplete sequence \373>, len = -1061262400}, gr_val = {s = 0x7fe5c0be9120 <_IO_2_1_stderr_> "\207(\255", <incomplete sequence \373>, len = 504}}
u = 0x7fff330e6950
port = 0
dst_host = 0x0
i = 4287552
flags = 0
avp = 0x7fff330e5370
st = {flags = 1, id = 0, name = {n = 33261, s = {s = 0x81ed <error: Cannot access memory at address 0x81ed>, len = 0}, re = 0x81ed}, avp = 0x0}
sct = 0x7fe5c08be170 <funlockfile>
sjt = 0x1c0be9120
rve = 0x7fe5c008e210
mct = 0x0
rv = 0x6262e
rv1 = 0x10d69fbc
c1 = {cache_type = 3239864858, val_type = 32741, c = {avp_val = {n = -1054678688, s = {s = 0x7fe5c122e160 <_r_debug> "\001", len = 3}, re = 0x7fe5c122e160 <_r_debug>}, pval = {rs = {s = 0x7fe5c122e160 <_r_debug> "\001", len = 3}, ri = 856573560,
flags = 32767}}, i2s = "\006\000\000\000\000\000\000\000\270\060(\000\000\000\000\000\001\312\000\000\000"}
s = {s = 0x0, len = 14649792}
srevp = {0x7fff330e4470, 0x0}
mod_f_params = {{type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}, {
type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}, {
type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}, {
type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}}
__FUNCTION__ = "do_action"
#7 0x000000000044858d in run_actions (h=0x7fff330e53a0, a=0x7fe5c008cc20, msg=0x7fff330e5560) at action.c:1557
t = 0x7fe5c008e920
ret = 1
mod = 0x7fe5bfb62074 <futex_release+29>
ms = 0
__FUNCTION__ = "run_actions"
#8 0x00000000004495ec in run_top_route (a=0x7fe5c008cc20, msg=0x7fff330e5560, c=0x0) at action.c:1643
ctx = {rec_lev = 1, run_flags = 0, last_retcode = 1, jmp_env = {{__jmpbuf = {282501052, 5686532009867973823, 4287552, 140734049970512, 0, 0, 5686532010841052351, -5686647577353153345}, __mask_was_saved = 0, __saved_mask = {__val = {10391354,
140734049965120, 140624742206134, 140624743041843, 140624672980704, 140624672962336, 3146215424, 3148726632, 140734049965152, 140624672980688, 140624672980696, 18446744069414584320, 14591360, 140734049965200, 140624742321173, 11738677032}}}}}
p = 0x7fff330e53a0
ret = 856577376
sfbk = 0
#9 0x00007fe5bfd470eb in t_continue (hash_index=65369, label=1337035286, route=0x7fe5c008cc20) at t_suspend.c:278
t = 0x7fe5bbadfd20
faked_req = ***redacted*** , via1 = 0x7fe5bbae1cc8, via2 = 0x0, headers = 0x7fe5bbae1c88, last_header = 0x7fe5bbae21b8, parsed_flag = 18446744073709551615, h_via1 = 0x7fe5bbae1c88, h_via2 = 0x0, callid = 0x7fe5bbae20b8, to = 0x7fe5bbae1df0,
cseq = 0x7fe5bbae2048, from = 0x7fe5bbae2008, contact = 0x7fe5bbae21b8, maxforwards = 0x7fe5bbae20f8, route = 0x0, record_route = 0x0, content_type = 0x0, content_length = 0x7fe5bbae2138, authorization = 0x0, expires = 0x0, proxy_auth = 0x0,
supported = 0x0, require = 0x0, proxy_require = 0x0, unsupported = 0x0, allow = 0x0, event = 0x0, accept = 0x0, accept_language = 0x0, organization = 0x0, priority = 0x0, subject = 0x0, user_agent = 0x7fe5bbae2178, server = 0x0,
content_disposition = 0x0, diversion = 0x0, rpid = 0x0, refer_to = 0x0, session_expires = 0x0, min_se = 0x0, sipifmatch = 0x0, subscription_state = 0x0, date = 0x0, identity = 0x0, identity_info = 0x0, pai = 0x0, ppi = 0x0, path = 0x0, privacy = 0x0,
body = 0x0, eoh = 0x7fe5bbae1c81 "\r\n", unparsed = 0x7fe5bbae1c81 "\r\n", rcv = {src_ip = {af = 2, len = 4, u = {addrl = {140733210165375, 0}, addr32 = {16777343, 32767, 0, 0}, addr16 = {127, 256, 32767, 0, 0, 0, 0, 0},
addr = "\177\000\000\001\377\177\000\000\000\000\000\000\000\000\000"}}, dst_ip = {af = 2, len = 4, u = {addrl = {16777343, 0}, addr32 = {16777343, 0, 0, 0}, addr16 = {127, 256, 0, 0, 0, 0, 0, 0},
addr = "\177\000\000\001", '\000' <repeats 11 times>}}, src_port = 12345, dst_port = 12345, proto_reserved1 = 0, proto_reserved2 = 0, src_su = {s = {sa_family = 2, sa_data = "09\177\000\000\001\000\000\000\000\000\000\000"}, sin = {
sin_family = 2, sin_port = 14640, sin_addr = {s_addr = 16777343}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 14640, sin6_flowinfo = 16777343, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>,
__u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, bind_address = 0x7fe5c0079c18, proto = 1 '\001'},
buf = 0x7fe5bbae1ab0 ***redacted, len = 467,
new_uri = {s = 0x0, len = 0}, dst_uri = {s = 0x0, len = 0}, parsed_uri_ok = 0, parsed_uri = {user = {s = 0x0, len = 0}, passwd = {s = 0x0, len = 0}, host = {
s = 0x7fe5bbae1abc ***redacted***..., len = 9},
port = {s = 0x7fe5bbae1ac6 ***redacted***...,
len = 5}, params = {s = 0x0, len = 0}, sip_params = {s = 0x0, len = 0}, headers = {s = 0x0, len = 0}, port_no = 12345, proto = 0, type = SIP_URI_T, flags = (unknown: 0), transport = {s = 0x0, len = 0}, ttl = {s = 0x0, len = 0}, user_param = {
s = 0x0, len = 0}, maddr = {s = 0x0, len = 0}, method = {s = 0x0, len = 0}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x0, len = 0}, transport_val = {s = 0x0, len = 0}, ttl_val = {s = 0x0, len = 0}, user_param_val = {s = 0x0,
len = 0}, maddr_val = {s = 0x0, len = 0}, method_val = {s = 0x0, len = 0}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x0, len = 0}, gr_val = {s = 0x0, len = 0}}, parsed_orig_ruri_ok = 0, parsed_orig_ruri = {user = {s = 0x0, len = 0}, passwd = {
s = 0x0, len = 0}, host = {s = 0x0, len = 0}, port = {s = 0x0, len = 0}, params = {s = 0x0, len = 0}, sip_params = {s = 0x0, len = 0}, headers = {s = 0x0, len = 0}, port_no = 0, proto = 0, type = ERROR_URI_T, flags = (unknown: 0), transport = {
s = 0x0, len = 0}, ttl = {s = 0x0, len = 0}, user_param = {s = 0x0, len = 0}, maddr = {s = 0x0, len = 0}, method = {s = 0x0, len = 0}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x0, len = 0}, transport_val = {s = 0x0, len = 0},
ttl_val = {s = 0x0, len = 0}, user_param_val = {s = 0x0, len = 0}, maddr_val = {s = 0x0, len = 0}, method_val = {s = 0x0, len = 0}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x0, len = 0}, gr_val = {s = 0x0, len = 0}}, add_rm = 0x0,
body_lumps = 0x0, reply_lump = 0x0, add_to_branch_s = '\000' <repeats 57 times>, add_to_branch_len = 0, hash_index = 65369, msg_flags = 144, flags = 0, set_global_address = {s = 0x0, len = 0}, set_global_port = {s = 0x0, len = 0},
force_send_socket = 0x0, force_tcp_connid = 0, path_vec = {s = 0x0, len = 0}, claim = {s = 0x0, len = 0}, instance = {s = 0x0, len = 0}, reg_id = 0, ruid = {s = 0x0, len = 0}, location_ua = {s = 0x0, len = 0}, ldv = {flow = {decoded = 0, rcv = {
src_ip = {af = 0, len = 0, u = {addrl = {0, 0}, addr32 = {0, 0, 0, 0}, addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, addr = '\000' <repeats 15 times>}}, dst_ip = {af = 0, len = 0, u = {addrl = {0, 0}, addr32 = {0, 0, 0, 0}, addr16 = {0, 0, 0, 0, 0, 0, 0,
0}, addr = '\000' <repeats 15 times>}}, src_port = 0, dst_port = 0, proto_reserved1 = 0, proto_reserved2 = 0, src_su = {s = {sa_family = 0, sa_data = '\000' <repeats 13 times>}, sin = {sin_family = 0, sin_port = 0, sin_addr = {
s_addr = 0}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 0, sin6_port = 0, sin6_flowinfo = 0, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0,
0, 0, 0}}}, sin6_scope_id = 0}}, bind_address = 0x0, proto = 0 '\000'}}}}
cancel_data = {cancel_bitmap = 3148726832, reason = {cause = 15545, u = {text = {s = 0x7fff330e56c0 "", len = 10413150}, e2e_cancel = 0x7fff330e56c0, packed_hdrs = {s = 0x7fff330e56c0 "", len = 10413150}}}}
branch = 0
uac = 0x7fe5bbadff28
ret = 0
cb_type = 2
msg_status = 0
last_uac_status = 0
reply_status = 32767
do_put_on_wait = 1
hdr = 0x7fe5c101a420 <_dl_fixup+224>
prev = 0x0
tmp = 0x0
route_type_bk = 1
__FUNCTION__ = "t_continue"
#10 0x00007fe5c10849a5 in async_exec_task (param=0x7fe5bbae2250) at async_sleep.c:206
act = 0x7fe5c008cc20
p = 0x7fe5bbae2258
tindex = 65369
tlabel = 1337035286
#11 0x0000000000453896 in async_task_run (idx=1) at async_task.c:235
ptask = 0x7fe5bbae2240
received = 8
__FUNCTION__ = "async_task_run"
#12 0x000000000044f104 in async_task_child_init (rank=0) at async_task.c:151
pid = 0
i = 0
__FUNCTION__ = "async_task_child_init"
#13 0x000000000084f706 in init_child (rank=0) at sr_module.c:944
No locals.
#14 0x00000000005ae002 in main_loop () at main.c:1690
i = 1
pid = 19703
si = 0x0
si_desc = "udp receiver child=0 sock=127.0.0.1:12345\000\a\300\345\177\000\000\325b\306\000\000\000\000\000\b\000\000\000\000\000\000\000\370\260\255\273\345\177\000\000\000p\207\273\345\177\000\000H\261\255\273\004\000\000\000\271<\313\000\000\000\000\000@c\016\063\377\177\000\000^\344\236\000\000\000\000\000@c\016\063\377\177\000\000\254\344\236\000\000\000\000"
nrprocs = 1
woneinit = 1
__FUNCTION__ = "main_loop"
#15 0x00000000005c188e in main (argc=14, argv=0x7fff330e6958) at main.c:2628
cfg_stream = 0xdf3020
c = -1
r = 0
tmp = 0x0
tmp_len = 0
port = 0
proto = 0
options = 0xc5b8b8 ":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 = 4243487007
rfd = 4
debug_save = 1
debug_flag = 1
dont_fork_cnt = 0
n_lst = 0x1
p = 0x7fff330e682e "\377\377"
st = {st_dev = 51713, st_ino = 9313319, st_nlink = 3, st_mode = 16877, st_uid = 4046719, st_gid = 100, __pad0 = 0, st_rdev = 0, st_size = 4096, st_blksize = 4096, st_blocks = 8, st_atim = {tv_sec = 1507927113, tv_nsec = 240715393}, st_mtim = {
tv_sec = 1513026263, tv_nsec = 5575277}, st_ctim = {tv_sec = 1513026263, tv_nsec = 5575277}, __unused = {0, 0, 0}}
__FUNCTION__ = "main"
Description
When using cfg_get in async_workers, the values cannot be retrieved. You either get a 'soft' fail with kamailio failing to assign the value, or you get a 'hard' fail and kamailio core dumps. The difference in behaviour appears to be determined by where the cfg variable is defined. If its defined in kamailio.cfg, you get a soft failure. If its defined in a cfg file which you included, you get a hard failure.
Troubleshooting
Tried MANY combinations of setting the variable in different places, different length of variable names, including different characters.
Reproduction
test_crash.cfg
test_crash_included.cfg
Debugging Data
Log Messages
SIP Traffic
Possible Solutions
Additional Information
kamailio -v
The text was updated successfully, but these errors were encountered: