[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] A fix for a handle leak
We are seeing some strange intermittent behavior: When there has been any
interruption in network connectivity between an xmlBlaster server and a
client, (or other xmlBlaster server) we can not reconnect to the server.
Sometimes when we try to stop the windows service (wrapper) that is running
the xmlBlaster server, it will not die and we must kill the process from the
task manager. Would this bug fix possibly cause any of what we are seeing?
We are running xmlBlaster 1.2
----- Original Message -----
From: "Marcel Ruff" <mr at marcelruff.info>
To: <xmlblaster at server.xmlBlaster.org>
Sent: Friday, May 12, 2006 12:35 PM
Subject: Re: [xmlblaster] A fix for a handle leak
> Thanks for this,
> it is added and commited,
> Cazier, James wrote:
> > I do not know where to post this but I have found a leak in the
> > corbaconnection.cpp file and wanted to post it and the fix.
> > I am using XMLBlaster 1.2 and the file is
> > client\protocol\corba\CorbaConnection.cpp
> > In the initAuthenticationService() function on line 178 a socket is
> > created.
> > int s = socket(AF_INET, SOCK_STREAM, 0);
> > Then it is connected (or attempted) on line 180.
> > connect(s, (struct sockaddr *)&xmlBlasterAddr,
> > sizeof(xmlBlasterAddr)
> > After either a failure or success the socket is shutdown on line 209.
> > shutdown(s, 2);
> > The problem is that the socket is not closed. The leak occurs then if I
> > lose my network connection to the XMLBLaster server or if the server is
> > shutdown (or crashes) I get continual boot strap errors and every time 2
> > handles are leaked when the connection is attempted to be restored.
> > I fixed this by adding right after the shutdown(s, 2);
> > ::closesocket(s);
> > This seems to have no side effect to the negative and I no longer am
> > having uncontrolled handle growth.
> > James Cazier
> > Software Engineer
> > Barco N.V.
> > Noordlaan 5
> > 8520 Kuurne
> > Belgium
> > james.cazier at barco.com <mailto:james.cazier at barco.com>
> > - - - - - - - DISCLAIMER- - - - - - - -
> > Unless indicated otherwise, the information contained in this message
> > is privileged and confidential, and is intended only for the use of
> > the addressee(s) named above and others who have been specifically
> > authorized to receive it. If you are not the intended recipient, you
> > are hereby notified that any dissemination, distribution or copying of
> > this message and/or attachments is strictly prohibited. The company
> > accepts no liability for any damage caused by any virus transmitted by
> > this email. Furthermore, the company does not warrant a proper and
> > complete transmission of this information, nor does it accept
> > liability for any delays. If you have received this message in error,
> > please contact the sender and delete the message. Thank you.