pjsua callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the help guys. I'm checking my application code, because I
am getting a hard deadlock. It happens once a week or so, so its not
very easy to test. I know that my main thread is alive, and that the
application stops receiving events. I've set two timer, one using
pjsua to pool the timer heap and another that I create a thread to do
this. When the application locks, the timer that pjsua is responsible
gets locked and the one that a separate thread generates the event
still works. I'm going to put some log messages along the code to try
to locate this the next time it happens.

thanks again,

Thiago

> On 2/13/08, Norman Franke <norman at myasd.com> wrote:
> >
> > And, as I found out the hard way, you need to be very careful
> when calling
> > PJ functions that will lock things you may not know about. This
> gets trick
> > with callbacks, since they have already locked things, so locking
> an
> > app-lock poses issues (e.g. your DB lock, though you probably
> shouldn't be
> > calling DB functions from a callback.) A main thread function
> would want to
> > lock the app lock, but when it calls various PJ functions, it can
> deadlock
> > with your callback. I sort of get around this by trying to not
> call any PK
> > functions if I have an app lock.
> 
> Ouch sorry to hear that, hopefully the article helps understanding
> how
> locking works a bit.
> 
> FYI I've just added a section about (soft)deadlock in the article,
> to
> make it more complete: http://trac.pjsip.org/repos/wiki/PJSUA_Locks
> 
> cheers,
>  -benny
> 
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> 



      Abra sua conta no Yahoo! Mail, o ?nico sem limite de espa?o para armazenamento!
http://br.mail.yahoo.com/



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux