<p>I managed to catch the issue again on another test. Same backtrace:</p>

<pre><code>Program terminated with signal 11, Segmentation fault.
#0  0xb64c24c0 in get_hash1_raw () at ../../hashes.h:109
109             hash_update_str(s, s+len, p, v, h);
#0  0xb64c24c0 in get_hash1_raw () at ../../hashes.h:109
#1  0xb64cdb96 in db_postgres_replace () from /usr/local/lib/kamailio/modules/db_postgres.so
#2  0xad1a219c in convert_temporary_dialog_puadb () from /usr/local/lib/kamailio/modules/pua.so
#3  0xad1c67bc in subs_cback_func () from /usr/local/lib/kamailio/modules/pua.so
#4  0xada43fa4 in run_trans_callbacks_internal () from /usr/local/lib/kamailio/modules/tm.so
#5  0xada440b5 in run_trans_callbacks () from /usr/local/lib/kamailio/modules/tm.so
#6  0xada9cec5 in local_reply () from /usr/local/lib/kamailio/modules/tm.so
#7  0xada9f205 in reply_received () from /usr/local/lib/kamailio/modules/tm.so
#8  0x080d1455 in do_forward_reply ()
#9  0x080d2ba5 in forward_reply ()
#10 0x0814ca62 in receive_msg ()
#11 0x08248d27 in udp_rcv_loop ()
#12 0x080eb1ee in main_loop ()
#13 0x080f19dc in main ()
</code></pre>

<p>Nearly the same scenario (with some re-transmissions for bad conditions simulation). And now sometimes (not always) I catch also this in logs:</p>

<pre><code>Oct 23 14:34:47 banshee1 /usr/local/sbin/kamailio[14253]: ERROR: db_postgres [km_dbase.c:290]: db_postgres_submit_query(): 0xb6686c68 PQsendQuery Error:  Query: LOCK TABLE pua IN EXCLUSIVE MODE
Oct 23 14:34:47 banshee1 /usr/local/sbin/kamailio[14253]: ERROR: <core> [db_query.c:181]: db_do_raw_query(): error while submitting query
Oct 23 14:34:47 banshee1 /usr/local/sbin/kamailio[14253]: ERROR: db_postgres [km_dbase.c:771]: db_postgres_start_transaction(): executing raw_query
Oct 23 14:34:47 banshee1 /usr/local/sbin/kamailio[14253]: ERROR: pua [send_subscribe.c:305]: subs_cback_func(): in start_transaction
Oct 23 14:34:49 banshee1 /usr/local/sbin/kamailio[14283]: CRITICAL: <core> [pass_fd.c:275]: receive_fd(): EOF on 7
Oct 23 14:34:49 banshee1 /usr/local/sbin/kamailio[14240]: ALERT: <core> [main.c:738]: handle_sigs(): child process 14250 exited by a signal 11
Oct 23 14:34:49 banshee1 /usr/local/sbin/kamailio[14240]: ALERT: <core> [main.c:741]: handle_sigs(): core was generated
</code></pre>

<p>No problems with MySQL again, only when using PostgreSQL instead and only with pua/pua_reginfo</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/377#issuecomment-150560415">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZYTvK1wO9CvM5l6xOU5ByYTzM-anks5o-iIygaJpZM4GTvID.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/377#issuecomment-150560415"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>