[OpenSIPS-Users] 2.2 crash with async, db_virtual and unixodbc
    Jeff Pyle 
    JPyle at fusionconnect.com
       
    Wed Sep  7 03:16:37 CEST 2016
    
    
  
Hello,
I'm working from the 2.2 nightly build repo on Debian Jessie, 64-bit, specifically, 2.2.1~20160830~7261cf0-1.
I have a simple test script that runs a stored procedure on a Microsoft SQL 2014 server and xlogs the returned AVPs.  This works fine.  When I break it up into an async() function and a return route block, I get a crash every time.
Script:
route {
                xlog("L_INFO", "Sending query...\n");
                async(avp_db_query("exec dbo.doStuff '1','2','3','4'",
                                "$avp(db1);$avp(db2);$avp(db3)"), post_db_dip);
}
route [post_db_dip] {
                xlog("L_INFO", "Back from query.\n");
                while (is_avp_set("$avp(db1)") && is_avp_set("$avp(db2)") && is_avp_set("$avp(db3)")) {
                                xlog("L_INFO", "db1=$avp(db1), db2=$avp(db2), db3=$avp(db3)\n");
                                avp_delete("$avp(db1)");
                                avp_delete("$avp(db2)");
                                avp_delete("$avp(db3)");
                }
                xlog("L_INFO", "End of processing.\n");
                sl_send_reply("600", "Road Closed");
                exit;
}
The debug=6:
...
/usr/sbin/opensips[19887]: DBG:avpops:ops_async_dbquery: query [exec dbo.doStuff '1','2','3','4']
/usr/sbin/opensips[19887]: DBG:db_virtual:db_virtual_async_raw_query: f call handle size = 1
/usr/sbin/opensips[19887]: DBG:db_virtual:try_reconnect: try reconnect
/usr/sbin/opensips[19887]: DBG:db_virtual:db_virtual_async_raw_query: flags1 = 3
/usr/sbin/opensips[19883]: DBG:core:handle_sigs: status = 11
/usr/sbin/opensips[19883]: INFO:core:handle_sigs: child process 19887 exited by a signal 11
/usr/sbin/opensips[19883]: INFO:core:handle_sigs: core was not generated
/usr/sbin/opensips[19883]: INFO:core:handle_sigs: terminating due to SIGCHLD
/usr/sbin/opensips[19890]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[19889]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[19888]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[19886]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[19885]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[19884]: INFO:core:sig_usr: signal 15 received
/usr/sbin/opensips[19883]: INFO:core:cleanup: cleanup
...and so forth.
The process that crashes, 19887 in this particular case, is a listener process.  I never see the "Back from xlog" xlog appear.  OpenSIPS immediately respawns but I suspect that's systemd.
Am I doing something wrong, or is this a bug?
- Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160907/1c0dbad3/attachment.htm>
    
    
More information about the Users
mailing list