[omniORB] memory leak in C++ servant

Lars Immisch lars@ibp.de
Wed, 13 Jun 2001 14:13:29 +0200


--NeXT-Mail-1834107751-3
Content-Type: text/enriched; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Dear all,


I am having trouble with a memory leak in a C++ process. I can't see
exactly why this is happening, but the leaking memory is internally
allocated by omniORB and is not passed to my servants.


It's also possible that I am doing something wrong, of course.


I have reproduced the leak in a very small project, with a server in C++
and a client in python. A makefile is attached (it's a bit dodgy, but
short).


There is also a server in python, which does not seem to leak.


I'd appreciate any feedback on the example.


One thing caught my attention - when I turn on sufficient logging, I get:


omniORB: Deactivating: root<<16777216> (has local refs).=0D

omniORB: strand Rope_iterator: delete unused Rope.=0D

omniORB: strand Rope::incrRefCount: old value =3D 0=0D

omniORB: strand Rope::incrRefCount: old value =3D 1=0D

omniORB: Object is still busy -- etherealise later.=0D

omniORB: POA(RootPOA) etherealising detached object.=0D

 id: IDL:FTest/Server:1.0=0D

omniORB: RefCountServantBase has zero ref count -- deleted.


This looks fine apart from the first line: "has local refs". I don't
understand where these local references come from.

<nofill>
Thanks,

Lars
</nofill>=

--NeXT-Mail-1834107751-3
Content-Type: application/zip; name=memleak.tar.gz; x-unix-mode=0664
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=memleak.tar.gz

H4sICDZUJzsAA21lbWxlYWsudGFyAO0aa3PTSJKvVhX/YdbAYrO2Yps8rhRIbQhkSW1IKMLe1RZH
qWRpZA9IGp8eTlxb3G+/7nnoZTkJtzxurzRVEHnU09PTr+lutRswGqXmYnXn643ReDTa3R7dGcHY
290Rf8fb2+IvjMn23t6d0d7j8Xh3Mt6bjAF+vDua3CGjr0hTPrIkdWJC7gROnFwPR68H+GuOez9s
ZUm8NWXRFo2WZLFK5zwyDBYueJySZJUMSMpCahj3yImcS+eUHJ2/eXZIQu5lATX8mIeEhxGDSaIW
CoDaoiTNpgnxeSxR8OTMCVk0I07kkRdXTrgIqEKZ6P1zID1x/JY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