Re: [Quickfix-developers] memory leak in quickfix 1.12.x
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2006-12-21 20:16:08
|
Yeah, I would check the latest, and failing that what is in svn. I =20 recall this being reported and believe it has been fixed, though I =20 can't recall exactly when. --oren On Dec 21, 2006, at 5:14 PM, Abel Monroy wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/=20 > html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hello, > > I'd like to ask you about an issue, to see if someone has seen it too. > I check an executable using 1.12.2 with valgrind and I found some =20 > memory > leaks in quickfix. This is the valgrind output: > > * When a session connects and send a log on message: > =3D=3D7480=3D=3D > =3D=3D7480=3D=3D Thread 3: > =3D=3D7480=3D=3D Conditional jump or move depends on uninitialised = value(s) > =3D=3D7480=3D=3D at 0x4174C6C: FIX::Session::nextLogon(FIX::Message = const&) > (Session.cpp:204) > =3D=3D7480=3D=3D by 0x418D7A1: FIX::Session::next(FIX::Message = const&, =20 > bool) > (Session.cpp:1270) > =3D=3D7480=3D=3D by 0x418C8D3: FIX::Session::next(std::string = const&, bool) > (Session.cpp:1228) > =3D=3D7480=3D=3D by 0x41CA1F1: =20 > FIX::ThreadedSocketConnection::processStream() > (ThreadedSocketConnection.cpp:156) > =3D=3D7480=3D=3D by 0x41C9BB1: = FIX::ThreadedSocketConnection::read() > (ThreadedSocketConnection.cpp:105) > =3D=3D7480=3D=3D by 0x41C4C94: > FIX::ThreadedSocketAcceptor::socketConnectionThread(void*) > (ThreadedSocketAcceptor.cpp:252) > =3D=3D7480=3D=3D by 0x4368DE7: start_thread (in /lib/tls/=20 > libpthread-0.60.so) > =3D=3D7480=3D=3D by 0x4897939: clone (in /lib/tls/libc-2.3.2.so) > > * When a session disconnects: > =3D=3D7480=3D=3D > =3D=3D7480=3D=3D Conditional jump or move depends on uninitialised = value(s) > =3D=3D7480=3D=3D at 0x41C9EB7: = FIX::ThreadedSocketConnection::read() > (ThreadedSocketConnection.cpp:110) > =3D=3D7480=3D=3D by 0x41C4C94: > FIX::ThreadedSocketAcceptor::socketConnectionThread(void*) > (ThreadedSocketAcceptor.cpp:252) > =3D=3D7480=3D=3D by 0x4368DE7: start_thread (in /lib/tls/=20 > libpthread-0.60.so) > =3D=3D7480=3D=3D by 0x4897939: clone (in /lib/tls/libc-2.3.2.so) > > * And we get this one too when application is starting: > =3D=3D7480=3D=3D Thread 4: > =3D=3D7480=3D=3D Syscall param socketcall.getsockopt(optlen) points to > uninitialised byte(s) > =3D=3D7480=3D=3D at 0x4898452: getsockopt (in = /lib/tls/libc-2.3.2.so) > =3D=3D7480=3D=3D by 0x41C41C3: > FIX::ThreadedSocketAcceptor::socketAcceptorThread(void*) > (ThreadedSocketAcceptor.cpp:203) > =3D=3D7480=3D=3D by 0x4368DE7: start_thread (in /lib/tls/=20 > libpthread-0.60.so) > =3D=3D7480=3D=3D by 0x4897939: clone (in /lib/tls/libc-2.3.2.so) > =3D=3D7480=3D=3D Address 0x7692870 is on thread 4's stack > > Our application is using quickfix 1.12.2 > libquickfix.so.8 =3D> > /usr/local/quickfix-1.12.2/lib/libquickfix.so.8 (0x00111000) > > The same executable using 1.10 doesn't have this memory leaks. =20 > Maybe we > should use last version, 1.12.4 to see if this is fixed? > > Last question is about using ACE library and quickfix > (http://www.cs.wustl.edu/~schmidt/ACE.html) > In order to compile an application using the ACE library and quickfix > 1.12.2, we had to > change some defines (just some change of names, eg. QUICKFIX_ALLOCATOR > instead ALLOCATOR in FieldMap.h), maybe it could > be added to the next version, in order to be able to compile with ACE > library without modify any files? > Someone else is using ACE and quickfix and has made this changes as =20= > well? > > Thanks, > Abel > > By the way, Merry Christmas :) > > > Oren Miller wrote: >> I would not recommend 1.12.3 over 1.12.4. We just haven't yet =20 >> added a >> tag for 1.12.4. What exists in the repository is newer than both >> those versions. The warning isn't that troubling, what I'm wondering >> is if their is still a crash with the latest from svn. Is there? >> If so can you put together a sample application and config that we >> could use to replicate it? I put together a basic acceptor that uses >> the MySQLStore and was not able to duplicate the crash with the svn >> version. >> >> --oren > Oren, about the crash using 1.12.4, it happen as well using 1.12.2, we > are going to try out using last svn version. We see that it doesn't > happen always. Sometimes the application goes well, and some others we > have this crash. >> >> On Dec 13, 2006, at 5:08 AM, Abel Monroy wrote: >> >>> Hi all, >>> >>> I just check in svn, and there this code is just the same. The last >>> revision is 1641, Fri Jul 28 12:41:00 2006. >>> >>> >>> 92 char* getValue( int row, int column ) >>> 93 { >>> 94 if( m_rows.empty() ) >>> 95 { >>> 96 MYSQL_ROW row =3D 0; >>> 97 while( row =3D mysql_fetch_row( m_result ) ) >>> 98 m_rows.push_back(row); >>> 99 } >>> 100 return m_rows[row][column]; >>> 101 } >>> >>> We just change line 97 by: >>> >>> while (( row =3D mysql_fetch_row( m_result ) ) !=3D 0) >>> >>> Our compiler is g++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-52), >>> but we suppose that this warning would >>> raise with other versions. >>> >>> By the way, I saw in svn that the last version tagged is >>> release_1_12_3. We are just going to upgrade >>> our quickfix version in our production environment. I wonder if it >>> would be better to upgrade to 1.12.3, >>> or there are some critical bug that it's fixed in 1.12.4. >>> >>> Regards, >>> Abel Monroy >>> >>> >>> Oren Miller wrote: >>>> I believe this has been resolved in svn. Could you try checking =20= >>>> out >>>> the latest and trying it out? >>>> >>>> --oren >>>> >>>> On Dec 12, 2006, at 5:11 AM, Abel Monroy wrote: >>>> >>>>> QuickFIX Documentation: >>>>> http://www.quickfixengine.org/quickfix/doc/html/index.html >>>>> QuickFIX Support: http://www.quickfixengine.org/services.html >>>>> >>>>> Hi everyone, >>>>> >>>>> we're upgrading our quickfix applications to last version, =20 >>>>> 1.12.4, and >>>>> we found some problems, so maybe someone could give us a hand. >>>>> Compiling the version, we've seen this warning: >>>>> >>>>> C++/MySQLConnection.h:98: warning: suggest parentheses around >>>>> assignment >>>>> used, as truth value >>>>> >>>>> which is this line: >>>>> while ( row =3D mysql_fetch_row( m_result ) ) >>>>> >>>>> We put the parentheses in order to avoid the warning, but now, we >>>>> compile the application and it crashs with a core. >>>>> >>>>> #0 0x00c7fcdf in raise () from /lib/tls/libc.so.6 >>>>> #1 0x00c814e5 in abort () from /lib/tls/libc.so.6 >>>>> #2 0x08061b6b in Unexpected () at src/vtfix.cpp:25 >>>>> #3 0x00711567 in std::terminate () from /usr/lib/libstdc++.so.5 >>>>> #4 0x007113f5 in __cxa_call_unexpected () from >>>>> /usr/lib/libstdc++.so.5 >>>>> #5 0x00e7e928 in Session (this=3D0x96ec7e0, application=3D@0x0, >>>>> messageStoreFactory=3D@0x0, sessionID=3D@0x96f6198, >>>>> dataDictionary=3D@0x118a2f0, >>>>> sessionTime=3D@0x118a290, pLogFactory=3D0x0) at Mutex.h:76 >>>>> #6 0x00ea8067 in FIX::SessionFactory::create (this=3D0x118a560, >>>>> sessionID=3D@0x96b90a0, settings=3D@0x96e1474) at Field.h:308 >>>>> #7 0x00eb9e23 in FIX::Acceptor::initialize (this=3D0x96cc3b0) at >>>>> stl_tree.h:199 >>>>> #8 0x00eb98a0 in FIX::Acceptor::Acceptor$base () at >>>>> stl_function.h:197 >>>>> #9 0x00ecf0fe in >>>>> FIX::ThreadedSocketAcceptor::ThreadedSocketAcceptor () >>>>> at new:89 >>>>> >>>>> It happens when we are making the new to a ThreadadSocketAcceptor >>>>> object. >>>>> >>>>> _store_factory =3D new FIX::MySQLStoreFactory( *_settings ); >>>>> _log_factory =3D new FIX::MySQLLogFactory( *_settings ); >>>>> >>>>> try { >>>>> _acceptor =3D new FIX::ThreadedSocketAcceptor (*_application, >>>>> *_store_factory, >>>>> *_settings, *_log_factory); >>>>> } >>>>> >>>>> quickfix is compile with ./configure --with-mysql=3D/usr in order = to >>>>> have >>>>> mysql support. It seems that we're missing something, but we =20 >>>>> are stuck >>>>> with this problem, so we'd appreciate your comments. >>>>> >>>>> Regards, >>>>> Abel Monroy Ferrero >>>>> >>>>> >>>>> >>>>> >>>>> ****************************** AVISO LEGAL >>>>> ****************************** >>>>> La informaci=F3n contenida en este mensaje es para uso exclusivo = de >>>>> su destinatario. No debe copiarse, transmitirse a terceros ni >>>>> guardarse por estos =FAltimos, salvo autorizaci=F3n del remitente. >>>>> Puede contener informaci=F3n confidencial o legalmente protegida =20= >>>>> cuyo >>>>> r=E9gimen legal de utilizaci=F3n no se ve afectado por el hecho de = que >>>>> haya sido enviada por correo electr=F3nico. >>>>> Su env=EDo por error a una persona distinta de su destinatario = real >>>>> no implica que se haya modificado tal destinatario ni supone >>>>> renuncia a su eventual car=E1cter confidencial o al r=E9gimen = legal =20 >>>>> que >>>>> rija su utilizaci=F3n. >>>>> Cualquier opini=F3n expresada en este mensaje vincular=E1 >>>>> exclusivamente a la persona que lo haya remitido, excepto =20 >>>>> cuando el >>>>> mensaje establezca lo contrario y el remitente est=E9 autorizado =20= >>>>> para >>>>> establecer que dichas opiniones vincular=E1n a esta entidad. >>>>> En el supuesto de que este correo se recibiera por error, rogamos >>>>> procedan a borrarlo, sin reenviarlo a terceros ni conservarlo en >>>>> cualquier soporte y nos informen inmediatamente llamando al >>>>> tel=E9fono 34 91 7095401 o a la direcci=F3n de correo electr=F3nico >>>>> remitente. Gracias. >>>>> ****************************** DISCLAIMER >>>>> ****************************** >>>>> The information contained in this message is for the exclusive use >>>>> of the named person. It can not be copied, transmitted to third >>>>> parties or stored by the latter, except if authorised by the =20 >>>>> sender. >>>>> It may contain confidential or legally privileged information =20 >>>>> whose >>>>> legal regime is not affected by the fact that this information has >>>>> been sent by e-mail. >>>>> Its erroneous transmission to a person other than the real named >>>>> person neither implies any modification of this named person nor a >>>>> renunciation of the eventual confidentiality or legal regime >>>>> affecting the use of concerned message. >>>>> Any views expressed in this message are binding exclusively upon >>>>> the individual sender, except where the message states otherwise >>>>> and the sender is authorised to bind this entity. >>>>> If you receive this message in error, please delete it without >>>>> transmitting it to any third party or keeping it in any form and >>>>> notify us immediately either by phone (34 91 7095401) or using the >>>>> e- mail address of the sender. Thank You. >>>>> >>>>> ------------------------------------------------------------------=20= >>>>> ------- >>>>> >>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>>>> share your >>>>> opinions on IT & business topics through brief surveys - and =20 >>>>> earn cash >>>>> http://www.techsay.com/default.php?=20 >>>>> page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV >>>>> >>>>> _______________________________________________ >>>>> Quickfix-developers mailing list >>>>> Qui...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quickfix-developers >>>>> >>>> >>>> >>> >>> >>> >>> ****************************** AVISO LEGAL >>> ****************************** >>> La informaci=F3n contenida en este mensaje es para uso exclusivo de = su >>> destinatario. No debe copiarse, transmitirse a terceros ni guardarse >>> por estos =FAltimos, salvo autorizaci=F3n del remitente. >>> Puede contener informaci=F3n confidencial o legalmente protegida = cuyo >>> r=E9gimen legal de utilizaci=F3n no se ve afectado por el hecho de = que >>> haya sido enviada por correo electr=F3nico. >>> Su env=EDo por error a una persona distinta de su destinatario real = no >>> implica que se haya modificado tal destinatario ni supone renuncia a >>> su eventual car=E1cter confidencial o al r=E9gimen legal que rija su >>> utilizaci=F3n. >>> Cualquier opini=F3n expresada en este mensaje vincular=E1 = exclusivamente >>> a la persona que lo haya remitido, excepto cuando el mensaje >>> establezca lo contrario y el remitente est=E9 autorizado para >>> establecer que dichas opiniones vincular=E1n a esta entidad. >>> En el supuesto de que este correo se recibiera por error, rogamos >>> procedan a borrarlo, sin reenviarlo a terceros ni conservarlo en >>> cualquier soporte y nos informen inmediatamente llamando al tel=E9fono= >>> 34 91 7095401 o a la direcci=F3n de correo electr=F3nico remitente. =20= >>> Gracias. >>> ****************************** DISCLAIMER =20 >>> ****************************** >>> The information contained in this message is for the exclusive =20 >>> use of >>> the named person. It can not be copied, transmitted to third parties >>> or stored by the latter, except if authorised by the sender. >>> It may contain confidential or legally privileged information whose >>> legal regime is not affected by the fact that this information has >>> been sent by e-mail. Its erroneous transmission to a person other >>> than the real named person neither implies any modification of this >>> named person nor a renunciation of the eventual confidentiality or >>> legal regime affecting the use of concerned message. >>> Any views expressed in this message are binding exclusively upon the >>> individual sender, except where the message states otherwise and the >>> sender is authorised to bind this entity. If you receive this =20 >>> message >>> in error, please delete it without transmitting it to any third =20 >>> party >>> or keeping it in any form and notify us immediately either by phone >>> (34 91 7095401) or using the e- mail address of the sender. Thank =20= >>> You. >>> >> >> > > > > ****************************** AVISO LEGAL =20 > ****************************** > La informaci=F3n contenida en este mensaje es para uso exclusivo de =20= > su destinatario. No debe copiarse, transmitirse a terceros ni =20 > guardarse por estos =FAltimos, salvo autorizaci=F3n del remitente. > Puede contener informaci=F3n confidencial o legalmente protegida cuyo =20= > r=E9gimen legal de utilizaci=F3n no se ve afectado por el hecho de que = =20 > haya sido enviada por correo electr=F3nico. > Su env=EDo por error a una persona distinta de su destinatario real =20= > no implica que se haya modificado tal destinatario ni supone =20 > renuncia a su eventual car=E1cter confidencial o al r=E9gimen legal = que =20 > rija su utilizaci=F3n. > Cualquier opini=F3n expresada en este mensaje vincular=E1 =20 > exclusivamente a la persona que lo haya remitido, excepto cuando el =20= > mensaje establezca lo contrario y el remitente est=E9 autorizado para =20= > establecer que dichas opiniones vincular=E1n a esta entidad. > En el supuesto de que este correo se recibiera por error, rogamos =20 > procedan a borrarlo, sin reenviarlo a terceros ni conservarlo en =20 > cualquier soporte y nos informen inmediatamente llamando al =20 > tel=E9fono 34 91 7095401 o a la direcci=F3n de correo electr=F3nico =20= > remitente. Gracias. > ****************************** DISCLAIMER =20 > ****************************** > The information contained in this message is for the exclusive use =20 > of the named person. It can not be copied, transmitted to third =20 > parties or stored by the latter, except if authorised by the sender. > It may contain confidential or legally privileged information whose =20= > legal regime is not affected by the fact that this information has =20 > been sent by e-mail. > Its erroneous transmission to a person other than the real named =20 > person neither implies any modification of this named person nor a =20 > renunciation of the eventual confidentiality or legal regime =20 > affecting the use of concerned message. > Any views expressed in this message are binding exclusively upon =20 > the individual sender, except where the message states otherwise =20 > and the sender is authorised to bind this entity. > If you receive this message in error, please delete it without =20 > transmitting it to any third party or keeping it in any form and =20 > notify us immediately either by phone (34 91 7095401) or using the =20 > e- mail address of the sender. Thank You. > > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |