Re: mISDN_send: error -12 strikes again
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.linux.isdn.i4l.user |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Mar 18, 2012 at 07:29:08AM +0100, jolly wrote: > Ralf Schlatterbeck wrote: > > Yesterday we had the message "mISDN_send: error -12" filling > > /var/log/kern.log. Restarting asterisk "fixed" it. > > > > > hi ralf, > > i guess it is because chan_lcr runs into deadlock inside asterisk. since > the process of chan_lcr holds a lock and never returns after calling > some asterisk function, bchannel read will not be processed, so the > kernel drops messages to prevent overfill. this is why you receive the > message above. Yes, I've debugged this once and am following that bug for some time now... the kernel message simply indicates that we have a buffer overflow in kernel space, nobody is fetching the data. > i suggest do debug which process calls the chan_lcr global lock and > unlock function. then, if asterisk hangs, use gdb to do backtrace all > threads of asterisk. you can see against which lock each thread runs. > since locking mechanism of asterisk is quite complex and unknown to me, > you might be on your own with that. I've looked through the locking code and have some questions: - There is an LCR thread in chan_lcr - no other threads are explicitly created, I guess asterisk will call the lcr-provided routines from different threads, is this right? - I don't understand why in lcr_hangup the lock is only obtained if the thread is different from the lcr thread. so when instrumenting the code, I have to deal with the case that we have several threads calling the various routines of chan_lcr? Ralf -- Ralf Schlatterbeck email: [email protected]