<p>Well, it appears that over the course of the past several weeks i have managed to confuse myself on the issues at hand.  Upon re-reading the ticket there are two issues that I had uncovered.   The first issue is where a database engine goes offline at some point during normal call processing causing a kamailio crash.  This issue has been addressed as per the updated Informix CSDK library which i recently confirmed.  The second issue is where a database is offline at kamailio startup and crashes kamailio based on the steps below:</p>
<ul>
<li>leave a database offline (shut down)</li>
<li>start up kamailio</li>
<li>kamailio starts even though the database is offline which is good</li>
<li>my test query begins to execute against the offline database and kamailio reacts gracefully to not<br>
being able to submit the queries to the offline database. also good.</li>
<li>now, if another entirely unrelated query is executed (a query against another database server for example) the program crashes.</li>
</ul>
<p>The gdb output is exactly the same as previously pasted even with the updated Informix CSDK libraries.  I was hoping the Informix CSDK update would solve this issue also, but it didn't.</p>
<p>Here are the results to your inquiry about gdb output.</p>
<p>(gdb) frame 1<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="31891578" data-permission-text="Issue title is private" data-url="https://github.com/kamailio/kamailio/issues/1" data-hovercard-type="issue" data-hovercard-url="/kamailio/kamailio/issues/1/hovercard" href="https://github.com/kamailio/kamailio/issues/1">#1</a>  0x00002aec870c59fb in sql_reconnect (sc=0x2aeb63048b98) at sql_api.c:187<br>
187             sc->dbh = sc->dbf.init(&sc->db_url);<br>
(gdb) p sc<br>
$4 = (sql_con_t *) 0x2aeb63048b98<br>
(gdb) p *sc<br>
$5 = {name = {s = 0x2aeb63048ab0 "voip=>unixodbc://xxxxxxx:yyyyyyy@localhost/voip", len = 4}, conid = 2025152179, db_url = {<br>
s = 0x2aeb63048ab6 "unixodbc://xxxxxxx:yyyyyyy@localhost/voip", len = 43}, dbh = 0x0, dbf = {cap = 0, use_table = 0, init = 0, init2 = 0, close = 0, query = 0,<br>
fetch_result = 0, raw_query = 0, free_result = 0, insert = 0, delete = 0, update = 0, replace = 0, last_inserted_id = 0, insert_update = 0, insert_delayed = 0,<br>
insert_async = 0, affected_rows = 0, start_transaction = 0, end_transaction = 0, abort_transaction = 0, query_lock = 0, raw_query_async = 0}, next = 0x0}</p>
<p>Thank you for looking into this.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1821#issuecomment-471073134">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZWx8eyXV_TWyCgr5GbtGHNHxr2aKks5vUs4cgaJpZM4aPgQx">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZaHL9I9lB8kfPWf5xtf_ptHK9vHdks5vUs4cgaJpZM4aPgQx.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@srinikart in #1821: Well, it appears that over the course of the past several weeks i have managed to confuse myself on the issues at hand.  Upon re-reading the ticket there are two issues that I had uncovered.   The first issue is where a database engine goes offline at some point during normal call processing causing a kamailio crash.  This issue has been addressed as per the updated Informix CSDK library which i recently confirmed.  The second issue is where a database is offline at kamailio startup and crashes kamailio based on the steps below:\r\n\r\n- leave a database offline (shut down)\r\n- start up kamailio\r\n- kamailio starts even though the database is offline which is good\r\n- my test query begins to execute against the offline database and kamailio reacts gracefully to not\r\n     being able to submit the queries to the offline database. also good.\r\n- now, if another entirely unrelated query is executed (a query against another database server for example) the program crashes.\r\n\r\nThe gdb output is exactly the same as previously pasted even with the updated Informix CSDK libraries.  I was hoping the Informix CSDK update would solve this issue also, but it didn't. \r\n\r\nHere are the results to your inquiry about gdb output.  \r\n\r\n(gdb) frame 1\r\n#1  0x00002aec870c59fb in sql_reconnect (sc=0x2aeb63048b98) at sql_api.c:187\r\n187             sc-\u003edbh = sc-\u003edbf.init(\u0026sc-\u003edb_url);\r\n(gdb) p sc\r\n$4 = (sql_con_t *) 0x2aeb63048b98\r\n(gdb) p *sc\r\n$5 = {name = {s = 0x2aeb63048ab0 \"voip=\u003eunixodbc://xxxxxxx:yyyyyyy@localhost/voip\", len = 4}, conid = 2025152179, db_url = {\r\n    s = 0x2aeb63048ab6 \"unixodbc://xxxxxxx:yyyyyyy@localhost/voip\", len = 43}, dbh = 0x0, dbf = {cap = 0, use_table = 0, init = 0, init2 = 0, close = 0, query = 0,\r\n    fetch_result = 0, raw_query = 0, free_result = 0, insert = 0, delete = 0, update = 0, replace = 0, last_inserted_id = 0, insert_update = 0, insert_delayed = 0,\r\n    insert_async = 0, affected_rows = 0, start_transaction = 0, end_transaction = 0, abort_transaction = 0, query_lock = 0, raw_query_async = 0}, next = 0x0}\r\n\r\nThank you for looking into this."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1821#issuecomment-471073134"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1821#issuecomment-471073134",
"url": "https://github.com/kamailio/kamailio/issues/1821#issuecomment-471073134",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>