Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: fix deadlock (#911)

2017-01-05 Thread Daniel-Constantin Mierla
Merged #911. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/911#event-912795700___ sr-dev mailing list sr-dev@lists.sip-router.org

Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: fix deadlock (#911)

2017-01-05 Thread Julien Chavanton
jchavanton commented on this pull request. > @@ -72,6 +70,7 @@ static int add_contact(str aor, ucontact_info_t* ci) // Search by ruid, if possible res = dmq_ul.get_urecord_by_ruid(_d, dmq_ul.get_aorhash(), >ruid, , ); if (res == 0) { +

Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: fix deadlock (#911)

2017-01-05 Thread Julien Chavanton
@jchavanton pushed 1 commit. 309873e dmq_usrloc: get_urecord_by_ruid returns -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: fix deadlock (#911)

2017-01-04 Thread Daniel-Constantin Mierla
miconda commented on this pull request. > @@ -72,6 +70,7 @@ static int add_contact(str aor, ucontact_info_t* ci) // Search by ruid, if possible res = dmq_ul.get_urecord_by_ruid(_d, dmq_ul.get_aorhash(), >ruid, , ); if (res == 0) { +

Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: fix deadlock (#911)

2017-01-04 Thread Julien Chavanton
The same process is requesting the lock a second time before unlocking. `futex_get()` is never able to acquire the lock and does not return, I tested this in a very minimalist program using `pthread_mutex_lock()` and it does get stuck. -- You are receiving this because you are subscribed to

Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: fix deadlock (#911)

2017-01-04 Thread Daniel-Constantin Mierla
No time to look in the code, but if it does two times lock and only one time unlock, then it is indeed a deadlock. If any other devel using dmq_usrloc does the review, then it can be committed. If not, I will check when I get a bit of time. -- You are receiving this because you are subscribed

Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: fix deadlock (#911)

2017-01-04 Thread Julien Chavanton
While running the CI tests Kamctl / MI fifo was hanging, after further investigation it seems it was trying to acquire a lock while the DMK module was stuck using it. Processes ``` Process:: ID=0 PID=6 Type=main process - attendant Process:: ID=1 PID=168 Type=udp receiver child=0

Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: fix deadlock (#911)

2017-01-04 Thread Julien Chavanton
jchavanton commented on this pull request. > @@ -72,6 +70,7 @@ static int add_contact(str aor, ucontact_info_t* ci) // Search by ruid, if possible res = dmq_ul.get_urecord_by_ruid(_d, dmq_ul.get_aorhash(), >ruid, , ); `get_urecord_by_ruid` was also acquiring

[sr-dev] [kamailio/kamailio] dmq_usrloc: fix deadlock (#911)

2017-01-04 Thread Julien Chavanton
caused by acquiring the same lock twice using get_urecord_by_ruid and lock_udomain You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/911 -- Commit Summary -- * dmq_usrloc: fix deadlock -- File Changes -- M