[OpenSIPS-Users] cachedb_redis crash ...
Samuel Muller
sml at l33.fr
Wed Apr 23 19:42:20 CEST 2014
Hello,
After upgrading to the latest github version, I always have the
cachedb_redis module that crashed when using raw queries (SIGCHILD
11).
-> redis data :
HMSET 10932.sip.anydomain.com uri "10932 at sip.anydomain.com" ha1
"ha1passwd" frtimer "3" frinvtimer "15" stimeout "3600" cli "Sam
10932" clip "0123456789" clir "0" e164 "+33123456789" cfbk "none" cfby
"none" cfna "none" cfu "none" rtpp "vrf" vrfid "5411" siteid "10" dpcc
"33" srv "none" fork "none" ua "snom"
HMSET 10102.sip.anydomain.com uri "10102 at sip.anydomain.com" ha1
"ha1passwd" frtimer "3" frinvtimer "15" stimeout "3600" cli "Room X"
clip "0123456789" clir "0" e164 "+33123456789" cfbk "none" cfby "none"
cfna "none" cfu "none" rtpp "vrf" vrfid "5411" siteid "10" dpcc "33"
srv "none" fork "none" ua "snom"
-> config sample :
loadmodule "cachedb_redis.so"
modparam("cachedb_redis","
cachedb_url","redis://172.21.43.65:6379/")
-> routing :
$var(hash) = "10932.sip.anydomain.com";
if (cache_raw_query("redis","HMGET $var(hash) uri ha1 frtimer
frinvtimer stimeout clip clir e164 cfbk cfby cfna cfu rtpp vrfid
siteid dpcc srv fork ua","$avp(e)")) {
$var(i) = 0;
while ($(avp(e)[$var(i)]) != NULL) {
xlog("L_INFO","$var(log) at index $var(i) value is:
$(avp(e)[$var(i)])");
$var(i) = $var(i) + 1;
}
-> debug log :
log scp1a[14884]: DBG:core:cachedb_raw_query: from script [redis] - no grp
log scp1a[14884]: DBG:cachedb_redis:redis_raw_query_handle_reply:
Unexpected data type 4 found in array - skipping
log scp1a[14884]: DBG:cachedb_redis:redis_raw_query_handle_reply:
Unexpected data type 4 found in array - skipping
log scp1a[14884]: DBG:cachedb_redis:redis_raw_query_handle_reply:
Unexpected data type 4 found in array - skipping
log scp1a[14878]: DBG:core:handle_sigs: status = 139
log scp1a[14878]: INFO:core:handle_sigs: child process 14884 exited by
a signal 11
log scp1a[14878]: INFO:core:handle_sigs: core was generated
log scp1a[14878]: INFO:core:handle_sigs: terminating due to SIGCHLD
log scp1a[14900]: INFO:core:sig_usr: signal 15 received
-> core dump / bt :
it's f**cking huge, so I only indicates the beginning here, you can
retrieve the full backtrace here :
http://pastebin.com/mBTa60i5
here's the few first lines :
(gdb) bt full
#0 0x0000000000504f0d in fm_free (qm=0x7ffad7276010, p=0x8) at
mem/f_malloc.c:448
f = 0xfffffffffffffff0
n = <optimized out>
#1 0x000000000057c2a0 in free_raw_fetch (reply=0x7ffad7365de0,
no_key=no_key at entry=1, no_val=21) at cachedb/cachedb.c:764
i = <optimized out>
j = <optimized out>
#2 0x000000000042222d in do_action (a=a at entry=0x7ffad72e3ae0,
msg=msg at entry=0x7ffad7362590) at action.c:1482
val_s = {s = 0xa1298a18 <Address 0xa1298a18 out of bounds>, len = 0}
i = -1
avp_val = {n = -684303888, s = {s = 0x7ffad73659f0 "ibrowse", len = 7}}
j = <optimized out>
key_number = 21
adv_addr = {s = 0xa1298a18 <Address 0xa1298a18 out of bounds>, len = 0}
increment = <optimized out>
decrement = <optimized out>
avp_type = 2
aux = {s = 0xa1298a18 <Address 0xa1298a18 out of bounds>, len = 0}
cdb_reply = 0x7ffad7365de0
val_number = 1
it = <optimized out>
avp_name = {n = 64, s = {s = 0x40 <Address 0x40 out of
bounds>, len = 8224}}
ret = 1
v = <optimized out>
to = <optimized out>
p = <optimized out>
tmp = <optimized out>
new_uri = <optimized out>
end = <optimized out>
crt = <optimized out>
len = <optimized out>
i = <optimized out>
user = 0
expires = 0
vals = {{s = 0xa1298a18 <Address 0xa1298a18 out of bounds>,
len = 0}, {s = 0x80c780 "`\233\200", len = -1591112528}, {s = 0x6
<Address 0x6 out of bounds>,
len = -1591112512}, {s = 0x80c780 "`\233\200", len =
-666036215}, {s = 0x0, len = 1}}
result = {s = 0x1 <Address 0x1 out of bounds>, len = 0}
uri = {user = {s = 0x1 <Address 0x1 out of bounds>, len = 0},
passwd = {s = 0x7ffad85dbff2 "", len = 0}, host = {
s = 0x300000006 <Address 0x300000006 out of bounds>, len =
-1591112432}, port = {s = 0x8089d0 "", len = 0}, params = {s = 0x0,
len = 1}, headers = {
s = 0x1 <Address 0x1 out of bounds>, len = 0}, port_no =
25, proto = 0, type = 32767, transport = {s = 0x0, len = 0}, ttl = {
s = 0x7ffad84d5e20 "\354\301\020", len = 5978651},
user_param = {s = 0xa1298b78 <Address 0xa1298b78 out of bounds>, len =
-1}, maddr = {
s = 0x3a24 <Address 0x3a24 out of bounds>, len = 8439680},
method = {s = 0x7fffa1298d90 "\200ǀ", len = 32}, lr = {s =
0x7fffa1298ea0 " ", len = 8439680},
r2 = {s = 0x7ffad84d1809 "f\203;", len = -664944656}, gr =
{s = 0x6 <Address 0x6 out of bounds>, len = 1}, transport_val = {
s = 0x7ffad85034d6 "H\211E(\353\277\017\037@", len =
-762346944}, ttl_val = {s = 0x7ffad84d5e3c "\200\275\250\372\377\377",
len = -664944656},
user_param_val = {s = 0x7fffa1298764 "", len = -1591112840},
maddr_val = {s = 0x0, len = -664944657}, method_val = {
s = 0xa1298c57a1298830 <Address 0xa1298c57a1298830 out of
bounds>, len = 0}, lr_val = {s = 0x0, len = 33}, r2_val = {s = 0x0,
len = 0}, gr_val = {
s = 0x715720 "", len = -1591122080}, u_name = {{s =
0xa1298c58 <Address 0xa1298c58 out of bounds>, len = -1}, {s = 0x1
<Address 0x1 out of bounds>,
len = -662614432}, {s = 0x30 <Address 0x30 out of
bounds>, len = 32}, {s = 0x7fffa1298c57 "", len = 0}, {s =
0x7ffad8814e60 "", len = 5}, {
s = 0x19 <Address 0x19 out of bounds>, len =
-1591112617}, {s = 0x30 <Address 0x30 out of bounds>, len = 32}, {
s = 0x7ffad84d5e3c "\200\275\250\372\377\377", len =
-762346951}, {s = 0x64 <Address 0x64 out of bounds>, len =
-1591112616}, {s = 0x0, len = -762346965}},
u_val = {{s = 0xd8509c00 <Address 0xd8509c00 out of bounds>,
len = 0}, {s = 0xd8814e60 <Address 0xd8814e60 out of bounds>, len =
64}, {
s = 0x7ffad8814eb8 "\320\316\200", len = -662614328}, {s
= 0x0, len = 49}, {s = 0x4d8509b1c <Address 0x4d8509b1c out of
bounds>, len = 96}, {
s = 0x4d8552e4b <Address 0x4d8552e4b out of bounds>, len
= 32}, {s = 0x7ffad8814eb8 "\320\316\200", len = -662614328}, {s =
0x80c380 "", len = 12}, {
s = 0x200000040 <Address 0x200000040 out of bounds>, len
= 64}, {s = 0x2d850a8c3 <Address 0x2d850a8c3 out of bounds>, len =
32}}, u_params_no = 50968}
next_hop = {user = {s = 0x7ffad8814e60 "", len = 12}, passwd =
{s = 0x6 <Address 0x6 out of bounds>, len = 8439576}, host = {s = 0x6
<Address 0x6 out of bounds>,
len = -665805824}, port = {s = 0x80 <Address 0x80 out of
bounds>, len = 8439576}, params = {s = 0x716d80 "pnq", len =
-1591113044}, headers = {
s = 0x6 <Address 0x6 out of bounds>, len = 8439552},
port_no = 28032, proto = 113, type = ERROR_URI_T, transport = {
s = 0x7ffad854a910 "\205\300y\314H\203\304\030\270\f", len
= -662614432}, ttl = {s = 0x80c708 "\003", len = -1591112864},
user_param = {s = 0x80c700 "\006",
len = 7433600}, maddr = {s = 0x7fffa1298aac "\005", len =
6}, method = {s = 0x7fffa1298b60 "", len = 32}, lr = {
s = 0x7ffad8533066
"L\213L$(\351\030\355\377\377Hc\355L\211\357\276\060", len =
-662614328}, r2 = {s = 0x7fffa1298b60 "", len = 4}, gr = {
s = 0x200718178 <Address 0x200718178 out of bounds>, len =
64}, transport_val = {s = 0x2 <Address 0x2 out of bounds>, len =
-1591112624}, ttl_val = {
s = 0x5a1298b50 <Address 0x5a1298b50 out of bounds>, len =
-1591113050}, user_param_val = {s = 0x7ffa00000000 <Address
0x7ffa00000000 out of bounds>,
len = 824806032}, maddr_val = {s = 0x7fffa1298aa6 "", len
= -662630368}, method_val = {s = 0x7fffa1298c2f "", len = 6977456},
lr_val = {
s = 0x7fffa1298a50 "\200\213)\241\377\177", len = 16},
r2_val = {s = 0x7fffa1298c40 "`4\357\277\372\177", len = -1591112832},
gr_val = {
s = 0x7ffad8814e60 "", len = -1591112800}, u_name = {{s =
0x9 <Address 0x9 out of bounds>, len = 1}, {s = 0x9 <Address 0x9 out
of bounds>,
len = -1591112592}, {s = 0x7ffad8509b1c
"\203=\351\352\060", len = -684303776}, {
s = 0x7ffad8552325
"D\213\245L\377\377\377\061\300E\205\344\017\204o\374\377\377H\213\275p\377\377\377\350\035\250\365\377\061\300\351\\\374\377\377H\213M\230\213U\314D\213\061A\215v\001;q\004\211\061\017\204\250",
len = 0}, {s = 0x500000000 <Address 0x500000000 out of bounds>, len =
6}, {s = 0x7ffad85dbfeb "T ",
len = 8440300}, {s = 0x7ffad88113e0 "
\r\201\330\372\177", len = 8440300}, {s = 0x7 <Address 0x7 out of
bounds>, len = 8187}, {
s = 0x7ffad8531e79 "HcD$@D\213\\$\bH\215D\005", len =
-684303776}, {s = 0x7fff00000000 <Address 0x7fff00000000 out of
bounds>, len = -662614432}}, u_val = {
{s = 0x0, len = 3}, {s = 0x7fffa1298c40
"`4\357\277\372\177", len = -684837112}, {s = 0x47790a
"H\211\305H\205\300\017\204", <incomplete sequence \352>,
len = -1591112352}, {s = 0x0, len = -88}, {s = 0x2
<Address 0x2 out of bounds>, len = 63}, {s = 0x50080e9e0 <Address
0x50080e9e0 out of bounds>, len = 0}, {
s = 0x0, len = -1074842528}, {s = 0x19 <Address 0x19 out
of bounds>, len = -662630368}, {s = 0x7fffa1298d8f "", len = 6977456},
{s = 0x7ffad72e36f0 "\004",
len = -1591112640}}, u_params_no = 9616}
u = <optimized out>
port = <optimized out>
cmatch = <optimized out>
aitem = <optimized out>
adefault = <optimized out>
spec = <optimized out>
model = <optimized out>
val = {rs = {s = 0x3f <Address 0x3f out of bounds>, len =
-1591112384}, ri = 8439680, flags = 0}
pve = <optimized out>
name_s = {
s = 0x61c620 "HMGET 10102.sip.anydomain.com ha1 frtimer
frinvtimer stimeout \n clip clir e164 cfbk cfby cfna cfu rtpp
vrfid siteid dpcc dpintpfx dpextpfx dpnblen \n srv fork ua
state", len = 183}
start = {tv_sec = 1398273497, tv_usec = 724450}
route_params_bak = <optimized out>
route_params_number_bak = <optimized out>
aux_counter = <optimized out>
__FUNCTION__ = "do_action"
#3 0x00000000004228e2 in run_action_list (a=<optimized out>,
msg=msg at entry=0x7ffad7362590) at action.c:171
ret = <optimized out>
t = 0x7ffad72e3ae0
Thanks for your help, really needed since v.1.10 and cache_raw_query.
Why not create a dedicated cachedb_redis with all the functionalities
(HGETALL, and so on ?)
Samuel MULLER
Telecom & Media Consultant
co-owner
L33 NETWORKS
+33 663 128 505
sml at l33.fr
www.l33.fr
More information about the Users
mailing list