[OpenSIPS-Users] 2.2 crash with async, db_virtual and unixodbc

Răzvan Crainea razvan at opensips.org
Wed Sep 7 10:06:59 CEST 2016


Hi, Jeff!

Unfortunately async operations are only supported by the MySQL backend, 
therefore it won't work with unixodbc or other backends. Now it crashes 
because of a mishandling in the db_virtual module. We are working on a 
fix for the crash, but even after the fix, you will still be unable to 
run async queries with unixodbc.
If you really want to do it async, then you should use MySQL backend. 
Also, don't forget to open a feature request on the issues page[1] to 
support async queries for unixodbc.

[1] https://github.com/OpenSIPS/opensips/issues

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 09/07/2016 04:16 AM, Jeff Pyle wrote:
>
> 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
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160907/c374c518/attachment.htm>


More information about the Users mailing list