<p>Hi,</p>

<p>after receiving a register the kamailio process ends up in a deadlock when calling the function:</p>

<pre><code>res = ulget_urecord_by_ruid(domain, ulget_aorhash(c->aor), &(c->ruid),
        &record, &_c);
(usrloc_cbc:264)
</code></pre>

<p>System setup:<br>
Kamailio version 426 together with postgres<br>
pua_reginfo module enabled (modparam publish_reginfo needs to be set to "1")<br>
To reproduce it is enough to send a single registration</p>

<p>According the change notes the function to get the record was changed from "ulget_urecord" to "ulget_urecord_by_ruid" in release 426<br>
http://wwwkamailioorg/pub/kamailio/426/ChangeLog</p>

<blockquote>
<p>commit <a href="https://github.com/kamailio/kamailio/commit/547f1489cb51a3c72dba72adaa1f6df5429f425e" class="commit-link"><tt>547f148</tt></a><br>
Author: Victor Seva <a href="mailto:linuxmaniac@torreviejawirelessorg">linuxmaniac@torreviejawirelessorg</a><br>
Date:   Wed Jul 15 16:00:03 2015 +0200</p>

<pre><code>pua_reginfo: use ruid to fix comparation of contact

(ptr == c) is always false Using ruid instead

(cherry picked from commit 7d31d78e3ac861cddfcb70c9940242ec7f3f0dbc)
</code></pre>

<p>commit <a href="https://github.com/kamailio/kamailio/commit/eb97d380a2fca3b9ce30596aad9493bc11cd5d8d" class="commit-link"><tt>eb97d38</tt></a><br>
Author: Victor Seva <a href="mailto:linuxmaniac@torreviejawirelessorg">linuxmaniac@torreviejawirelessorg</a><br>
Date:   Thu May 28 18:26:08 2015 +0200</p>

<pre><code>pua_reginfo: use ulget_urecord_by_ruid instead of ulget_urecord

(cherry picked from commit 63bd356cc3c7aa64d64361283f630f88b8db88af)
</code></pre>
</blockquote>

<p>A similair change was done in 43x and reverted short time later:<br>
http://wwwkamailioorg/pub/kamailio/434/ChangeLog</p>

<blockquote>
<p>commit <a href="https://github.com/kamailio/kamailio/commit/cb644d50f76c80f0f24b34e5adf8723d89aab636" class="commit-link"><tt>cb644d5</tt></a><br>
Author: Victor Seva <a href="mailto:linuxmaniac@torreviejawirelessorg">linuxmaniac@torreviejawirelessorg</a><br>
Date:   Thu Aug 6 15:22:34 2015 +0200</p>

<pre><code>Revert "pua_reginfo: use ulget_urecord_by_ruid instead of ulget_urecord"

This reverts commit 9a6d8d2bffe13b442ed5e880fb0dd2c6572c29e2
</code></pre>
</blockquote>

<p>Just by the change notes I cannot find out, why the commit was reverted in 432<br>
As a workaround, we changed the used function back to "ulget_urecord" and have now running tests to verify the functionality At least the deadlock is fixed with this change</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/499">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZQy4KDD9xIjqkTcJdQsS6hMsj96fks5phGsEgaJpZM4HUJhe.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/499"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>