<div dir="ltr"><div class="gmail_default" style="font-size:small">Hello,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I have a system using ace+tao (2.1.5. + 6.1.5) and I have a problem with CORBA::ORB_init that leaks memory. valgrind stacktrace:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace">==1174== 808 bytes in 1 blocks are possibly lost in loss record 192 of 214</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== at 0x4A07982: operator new[](unsigned long) (vg_replace_malloc.c:389)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726EF681: ACE_Array_Map<ACE_String_Base<char>, ACE_String_Base<char>, std::equal_to<ACE_String_Base<char> > >::ACE_Array_Map(unsigned long) (Array_Map.inl:13)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726F1CFA: TAO_ORB_Parameters::TAO_ORB_Parameters() (params.cpp:68)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726EE78A: TAO_ORB_Core::TAO_ORB_Core(char const*, ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt>) (ORB_Core.cpp:268)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726E45CF: CORBA::ORB_init(int&, char**, char const*) (ORB.cpp:1290)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x4B8E98: </font><span style="font-family:monospace,monospace">InterfaceThread</span><font face="monospace, monospace">::init() (</font><span style="font-family:monospace,monospace">InterfaceThread</span><font face="monospace, monospace">.cpp:598)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x4B81D9: </font><span style="font-family:monospace,monospace">InterfaceThread</span><font face="monospace, monospace">::run() (</font><span style="font-family:monospace,monospace">InterfaceThread</span><font face="monospace, monospace">.cpp:523)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x579384D: Thread::exec() (Thread.cpp:51)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x5793781: Thread::execThread_(void*) (Thread.cpp:37)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x37382077F0: start_thread (in /lib64/<a href="http://libpthread-2.12.so">libpthread-2.12.so</a>)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3737EE570C: clone (in /lib64/<a href="http://libc-2.12.so">libc-2.12.so</a>)</font></div><div class="gmail_default"><span style="font-family:monospace,monospace">==1174==</span><font face="monospace, monospace"><br></font></div></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace">==1174== 20,488 bytes in 1 blocks are possibly lost in loss record 211 of 214</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== at 0x4A07982: operator new[](unsigned long) (vg_replace_malloc.c:389)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726EF681: ACE_Array_Map<ACE_String_Base<char>, ACE_String_Base<char>, std::equal_to<ACE_String_Base<char> > >::ACE_Array_Map(unsigned long) (Array_Map.inl:13)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726EE7A3: TAO_ORB_Core::TAO_ORB_Core(char const*, ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt>) (ORB_Core.cpp:268)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726E45CF: CORBA::ORB_init(int&, char**, char const*) (ORB.cpp:1290)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x4B8E98: InterfaceThread::init() (InterfaceThread.cpp:598)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x4B81D9: InterfaceThread::run() (InterfaceThread.cpp:523)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x579384D: Thread::exec() (Thread.cpp:51)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x5793781: Thread::execThread_(void*) (Thread.cpp:37)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x37382077F0: start_thread (in /lib64/<a href="http://libpthread-2.12.so" target="_blank">libpthread-2.12.so</a>)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3737EE570C: clone (in /lib64/<a href="http://libc-2.12.so" target="_blank">libc-2.12.so</a>)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== </font></div><div class="gmail_default"><font face="monospace, monospace">==1174== 32,776 bytes in 1 blocks are possibly lost in loss record 213 of 214</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== at 0x4A06E7C: operator new[](unsigned long, std::nothrow_t const&) (vg_replace_malloc.c:420)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C72328141: ACE_Notification_Queue::allocate_more_buffers() (Notification_Queue.cpp:83)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C7232884F: ACE_Notification_Queue::open() (Notification_Queue.cpp:38)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C723509EB: ACE_Select_Reactor_Notify::open(ACE_Reactor_Impl*, ACE_Abstract_Timer_Queue<ACE_Event_Handler*>*, int) (Select_Reactor_Base.cpp:619)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C7236E667: ACE_Select_Reactor_T<ACE_Reactor_Token_T<ACE_Token> >::open(unsigned long, bool, ACE_Sig_Handler*, ACE_Abstract_Timer_Queue<ACE_Event_Handler*>*, int, ACE_Reactor_Notify*) [clone .clone.3] (Select_Reactor_T.cpp:424)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C7236EAB0: ACE_Select_Reactor_T (Select_Reactor_T.cpp:549)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C7236EAB0: ACE_TP_Reactor::ACE_TP_Reactor(unsigned long, bool, ACE_Sig_Handler*, ACE_Abstract_Timer_Queue<ACE_Event_Handler*>*, bool, int) (TP_Reactor.cpp:114)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726A2A57: TAO_Default_Resource_Factory::allocate_reactor_impl() const (default_resource.cpp:768)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726A2903: TAO_Default_Resource_Factory::get_reactor() (default_resource.cpp:786)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726CF7EE: TAO_Leader_Follower::reactor() (Leader_Follower.cpp:152)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726EC533: TAO_ORB_Core::init(int&, char**) (ORB_Core.cpp:1249)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x3C726E47C9: CORBA::ORB_init(int&, char**, char const*) (ORB.cpp:1355)</font></div><div class="gmail_default"><font face="monospace, monospace">==1174== by 0x4B8E98: InterfaceThread::init() (InterfaceThread.cpp:598)</font></div><div><br></div><div><br></div><div>orb is of type CORBA::ORB_var;</div><div><br></div></div><div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">InterfaceThread.cpp:598 orb = CORBA::ORB_init(argc, argv);</font></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">then in InterafceThread destructor I release it:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace"> if (CORBA::is_nil(<a href="http://orb.in">orb.in</a>()) == false) {</font></div><div class="gmail_default"><font face="monospace, monospace"> orb->shutdown(1);<br></font></div><div class="gmail_default"><font face="monospace, monospace"> orb->destroy();</font></div><div class="gmail_default"><font face="monospace, monospace"> CORBA::release(orb);</font></div><div class="gmail_default"><font face="monospace, monospace"> orb = CORBA::ORB::_nil();</font></div><div class="gmail_default"><font face="monospace, monospace"> }</font></div></div><br></div><div><div class="gmail_default" style="font-size:small">I do not know what is the problem here. Can anyone help me here? I have tried to dig in forums but I encounter 14 year old threads :)</div><br></div><div><br></div>-- <br><div><div dir="ltr">
<div><br></div><div>kind regards, pozdrawiam, <br></div><div>Patryk Małek</div><div><br></div><div><br></div></div></div>
</div>