Re: Possible issue in http.c or conn.c
"Nikos Balkanas" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <E3B8E07627FB477A82F1924BA68963FD@drwho> |
Hi, Please download and use latest kannel 1.5.0. Issue may have been fixed. BR, Nikos ----- Original Message ----- From: "Jacob Eiler" <[email protected]> To: <[email protected]> Sent: Friday, May 13, 2011 1:24 PM Subject: Possible issue in http.c or conn.c > Hi > > I am experiencing a strange issue using an HTTP-based SMSC with Kannel > 1.4.3. > > Due to some network issue we had a temporary problem opening connections > to the smsc. When sending an mt sms the gateway tries to open a > connection/socket to the smsc, but the operation times out after 5 > seconds. So far all is normal. Then rather than simply give up, the > gateway tries to write the request data to the socket. Obviously this > fails and while cleaning up bearerbox panics in a call to > conn_unregister with a NULL connection. > > I have tried to trace the calls, and as far as I can see this is what > happens: > > http.c#handle_transaction the transaction state is set to "connecting". > For some reason the conn_get_connect_result does not return an error, ad > consequently send_request is called. > > http.c#send_request tries to write the request data to the connect, but > fails as the connection is dead. In the error handling send_request > calls conn_unregister and sets the transaction connection to NULL before > returning an error. > > Back in handle_transaction the failed call to send_request causes > handle_transaction to do some error handling and cleanup - again calling > conn_unregister - this time with a NULL-connection causing the panic. > > The cause of the problem must be the erronenous result from > conn_get_connect_result (which may be due to the fact that the gateway > is running under CygWin). > > But even so, should both send_request and handle_transaction try to > clean up the connection? > > BR > Jacob > >