[sr-dev] sql_query in htable:mod-init

Mino Haluz mino.haluz at gmail.com
Tue Feb 12 09:36:30 CET 2013


Hi,

I'm getting segfault while doing sql_query in mod-init, something I'm
making wrong?

event_route[htable:mod-init] {
sql_query("ca","SELECT * FROM carrier_name", "ra");
if ($dbr(ra=>rows)>0) {
xlog("L_INFO","TEST");
}
}

cr kernel: [66373.805099] kamailio[8382]: segfault at 0 ip (null) sp
bfec3c2c error 4 in kamailio[8048000+1eb000]
cr kamailio: ERROR: <core> [daemonize.c:307]: Main process exited before
writing to pipe

(gdb) ba
#0  0x00000000 in ?? ()
#1  0xa711ae5d in sql_query (msg=0xa75e0bc0, dbl=0xa76009c8 "@\t`\247\002",
query=0xa7677948 "", res=0xa7607128 "?|") at sqlops.c:210
#2  0x0805bc13 in do_action (h=0xbfec4178, a=0xa766ddc0, msg=0xa75e0bc0) at
action.c:1163
#3  0x08062c1d in run_actions (h=0xbfec4178, a=0xa766ddc0, msg=0xa75e0bc0)
at action.c:1644
#4  0x08063284 in run_top_route (a=0xa766ddc0, msg=0xa75e0bc0,
c=0xbfec4178) at action.c:1729
#5  0xa70bd06f in child_init (rank=-127) at htable.c:207
#6  0x0811ed87 in init_mod_child (m=0xa75ff248, rank=-127) at
sr_module.c:893
#7  0x0811ed00 in init_mod_child (m=0xa75ff550, rank=-127) at
sr_module.c:890
#8  0x0811ed00 in init_mod_child (m=0xa75ffa78, rank=-127) at
sr_module.c:890
#9  0x0811ed00 in init_mod_child (m=0xa75ffc18, rank=-127) at
sr_module.c:890
#10 0x0811ed00 in init_mod_child (m=0xa7600b08, rank=-127) at
sr_module.c:890
#11 0x080a7081 in main_loop () at main.c:1587
#12 0x080a94ef in main (argc=5, argv=0xbfec45e4) at main.c:2546

Mino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20130212/7f65666f/attachment.htm>


More information about the sr-dev mailing list