RE: Bearerbox is not shutting down on command.
"Oded Arbel" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
-----Original Message----- From: Nisan Bloch [mailto:[email protected]] Sent: Monday, August 19, 2002 9:11 PM To: Oded Arbel; Kannel-devel (E-mail) Subject: RE: Bearerbox is not shutting down on command. Hi 05:47 PM 8/19/02 +0300, Oded Arbel wrote: If I understand whats going on here, then something like this happens : the bearerbox waits for sms/wap boxes to connect to it - firing a handler thread for each box connecting. all handler threads of the same type share a single message queue (incoming_sms in case of an smsbox). now, since the bearerbox creates handler threads with abandon and does not collect their ids or anything, there is never a notion of "all handler threads have terminated". There is a dummy list "flow_threads", that has producers added to it at the start of a thread and producers removed from it at the end. Bearerbox, waits on these for shutdown (bearerbox.c:501) My guess is that it is one of the smsc modules that are not shutting down properly. Do you have debug logs of the shutdown process, which threads exit? Yes - I have the debug logs, and all the SMSC modules are shutting down properly. I think it may be a race condition, where the bearerbox is getting a command to shutdown while the incoming sms list still has a message. bearerbox then shuts down the smsbox connections w/o allowing the smsbox to pick the message up. then all the SMSC connections disconnect, leaving the incoming_sms list with no producers, no consumers and no way to shutdown as it still has a message in it. The flow threads is not the solution, as one of the flow threads is the smsbox runner which waits on the incoming_sms list. -- Oded Arbel m-Wise mobile solutions [email protected] +972-9-9581711 (116) +972-67-340014 ::.. Aerodynamics are for people that cannot build engines. -- Enzo Ferrai