<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Henning,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank you for the response.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I will open an issue and test out the latest releases.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks again for the feedback.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Karthik</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 20, 2019 at 9:31 AM Henning Westerholt <<a href="mailto:hw@kamailio.org">hw@kamailio.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Freitag, 18. Januar 2019, 18:28:09 CET schrieb Karthik Srinivasan:<br>
> I am testing how kamailio reacts to various database conditions. One such<br>
> condition is if the database engine is simply shut down (that is, database<br>
> server process no longer running, tcp listening socket closed, etc...)<br>
> <br>
> I am utilizing the db_unixodbc module to connect to an Informix database<br>
> engine.<br>
> <br>
> I am currently running on Kamailio version 5.0.<br>
> <br>
> I have a test query that executes against the database engine every 10<br>
> seconds.<br>
> <br>
> Here is what i have noticed if i shut down the database engine at some<br>
> point after i run Kamailio.<br>
> <br>
> the first test query that attempts to run against the db engine fails; it<br>
> tries to reconnect and fails.<br>
> <br>
> The second test query (10 seconds after the 1st) results in a SIG_CHILD and<br>
> shuts down the entire Kamailio process.<br>
> <br>
> Has anyone experienced this? Is there a solution to this? Ideally the<br>
> second query should also fail and return gracefully; and ideally queries<br>
> continue to fail until the database engine is back up.<br>
<br>
Hello Karthik,<br>
<br>
Kamailio should not crash because of this error. The db_unixodbc module is not <br>
that widely used (compared to db_mysql), but nevertheless it shouldn't crash.<br>
<br>
Can you create an issue in our tracker on github for this:<br>
<a href="https://github.com/kamailio/kamailio/issues" rel="noreferrer" target="_blank">https://github.com/kamailio/kamailio/issues</a><br>
<br>
It would be great if you can also try with the latest stable version of 5.1.x <br>
or 5.2.x, there have been some changes in the db_unixodbc module since the <br>
release of 5.0.<br>
<br>
Best regards,<br>
<br>
Henning<br>
<br>
> See logs below:<br>
> <br>
> Jan 17 20:07:25 [29297]: INFO: (s) SQL query: FIRST TEST QUERY<br>
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:135]:<br>
> db_unixodbc_submit_query(): rv=-1. Query= FIRST TEST QUERY<br>
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:<br>
> db_unixodbc_extract_error():<br>
> unixodbc:SQLExecDirect=08S01:1:-11020:[Informix][Informix ODBC<br>
> Driver]Communication link failure.<br>
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:59]: reconnect():<br>
> Attempting DB reconnect<br>
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:74]: reconnect():<br>
> failed to connect<br>
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:<br>
> db_unixodbc_extract_error():<br>
> unixodbc:SQLDriverConnect=08002:1:0:[unixODBC][Driver Manager]Connection<br>
> name in use<br>
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:<br>
> db_unixodbc_extract_error():<br>
> unixodbc:SQLDriverConnect=HY010:2:-11067:[Informix][Informix ODBC<br>
> Driver]Function sequence error.<br>
> Jan 17 20:07:25 [29297]: ERROR: <core> [db_query.c:181]: db_do_raw_query():<br>
> error while submitting query<br>
> Jan 17 20:07:25 [29297]: ERROR: sqlops [sql_api.c:265]: sql_do_query():<br>
> cannot do the query FIRST TEST QUERY<br>
> Jan 17 20:07:25 [29297]: INFO: (s) [123] SQL ret: fail (-1)<br>
> Jan 17 20:07:25 [29297]: INFO: (s) [123] SQL res: no rows<br>
> Jan 17 20:07:35 [29297]: INFO: (s) [123] SQL query: 10 seconds later the<br>
> SECOND TEST QUERY (it's the same query as the first one)<br>
> Jan 17 20:07:35 [29301]: CRITICAL: <core> [core/pass_fd.c:277]:<br>
> receive_fd(): EOF on 28<br>
> Jan 17 20:07:35 [29283]: ALERT: <core> [main.c:744]: handle_sigs(): child<br>
> process 29297 exited by a signal 11<br>
> Jan 17 20:07:35 [29283]: ALERT: <core> [main.c:747]: handle_sigs(): core<br>
> was not generated<br>
> Jan 17 20:07:35 [29283]: INFO: <core> [main.c:759]: handle_sigs():<br>
> terminating due to SIGCHLD<br>
> Jan 17 20:07:35 [29301]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29295]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29291]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29288]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29300]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29284]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29286]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29293]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29289]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29287]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29292]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29296]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29298]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29299]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29285]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29294]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29290]: INFO: <core> [main.c:814]: sig_usr(): signal 15<br>
> received<br>
> Jan 17 20:07:35 [29283]: INFO: <core> [core/sctp_core.c:53]:<br>
> sctp_core_destroy(): SCTP API not initialized<br>
<br>
<br>
-- <br>
Henning Westerholt - <a href="https://skalatan.de/blog/" rel="noreferrer" target="_blank">https://skalatan.de/blog/</a><br>
Kamailio services - <a href="https://skalatan.de/services" rel="noreferrer" target="_blank">https://skalatan.de/services</a><br>
Kamailio security assessment - <a href="https://skalatan.de/de/assessment" rel="noreferrer" target="_blank">https://skalatan.de/de/assessment</a><br>
</blockquote></div>