[sr-dev] deadlock in dmq_usrloc/usrloc_sync.c

Julien Chavanton jchavanton at gmail.com
Tue Dec 27 17:23:46 CET 2016


Sorry first patch was missing a lock that was required

On Tue, Dec 27, 2016 at 11:19 AM, Julien Chavanton <jchavanton at gmail.com>
wrote:

> Hi Folks,
>
> We faced a deadlock caused by acquiring the same lock twice in
> src/modules/dmq_usrloc/usrloc_sync.c
>
> dmq_ul.lock_udomain(_d, &aor);
> >> lock_get(_d->table[sl].lock);
> get_urecord_by_ruid
> >> lock_ulslot(_d, sl);
> >>>> lock_get(_d->table[i].lock);
>
> The attached fix will not lock until get_urecord_by_ruid as returned.
>
>
> Regards
> Julien
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20161227/495cca42/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_locking.patch
Type: text/x-patch
Size: 1069 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20161227/495cca42/attachment.bin>


More information about the sr-dev mailing list