Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[tao-bugs] Memory leak when using sequences of sequences

0 views
Skip to first unread message

Kerry....@de.trumpf.com

unread,
Feb 16, 2006, 11:47:54 AM2/16/06
to
Hello everyone,

I know my TAO version is not the newest, yet I have the feeling nothing has been done to remove an old bug. When searching this list for "sequence of sequences" I see multiple people have reported problems with memory leaks, yet somehow I have not found anything indicating that the problems have been fixed.

TAO VERSION: 1.4.4
ACE VERSION: 5.4.4

HOST MACHINE and OPERATING SYSTEM:
Windows XP SP2

TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
MSVC++ 7.1

CONTENTS OF $ACE_ROOT/ace/config.h [if you use a link to a platform-
specific file, simply state which one]:
Windows standard

CONTENTS OF $ACE_ROOT/include/makeinclude/platform_macros.GNU (unless
this isn't used in this case, e.g., with Microsoft Visual C++):

CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):

AREA/CLASS/EXAMPLE AFFECTED:
Example IDL:

struct Element
{
unsigned long id1;
long id2;
string string;
};
typedef sequence< Element > Columns;
typedef sequence< Columns > Rows;
unsigned long readTable( in unsigned long id,
out Rows content );

DOES THE PROBLEM AFFECT:
COMPILATION?
LINKING?
EXECUTION?
yes
OTHER (please specify)?

SYNOPSIS:
Each call to a function returning a sequence of sequences leads to an increase in process memory consumption.

DESCRIPTION:
The server process leaks memory from each call to a function returning a sequence of sequences. When stopping the server, the memory is correctly freed (i.e., not leak is reported by Purify), yet during server execution it just keeps adding up. This is the same problem as one reported some years ago: news:<006001c1c9fe$ccbb55f0$f001...@senecanetworks.com>.

The memory is being allocated by each function call by the following call stack:

Routine Name Module Name Source File Source Line
operator new ACEd.dll newop.cpp 12
operator new[] ACEd.dll newaop.cpp 7
ACE_Local_Memory_Pool::acquire ACEd.dll local_memory_pool.cpp 58
ACE_Malloc_T<ACE_Local_Memory_Pool,ACE_Thread_Mutex,ACE_Control_Block>::shared_malloc TAOd.dll malloc_t.cpp 498
ACE_Malloc_T<ACE_Local_Memory_Pool,ACE_Thread_Mutex,ACE_Control_Block>::malloc TAOd.dll malloc_t.cpp 552
ACE_Allocator_Adapter<ACE_Malloc<ACE_Local_Memory_Pool,ACE_Thread_Mutex> >::malloc TAOd.dll malloc_t.inl 126
ACE_Data_Block::ACE_Data_Block ACEd.dll message_block.cpp 346
ACE_Message_Block::init_i ACEd.dll message_block.cpp 686
ACE_Message_Block::ACE_Message_Block ACEd.dll message_block.cpp 429
ACE_OutputCDR::grow_and_adjust ACEd.dll cdr_stream.cpp 155
ACE_OutputCDR::adjust ACEd.dll cdr_stream.inl 434
ACE_OutputCDR::write_array ACEd.dll cdr_stream.cpp 562
ACE_OutputCDR::write_char_array ACEd.dll cdr_stream.inl 279
ACE_OutputCDR::write_string ACEd.dll cdr_stream.cpp 250
ACE_OutputCDR::write_string ACEd.dll cdr_stream.inl 254
operator<< ACEd.dll cdr_stream.inl 1095
operator<< TAOd.dll cdr.i 197

REPEAT BY:
Repeatedly calling the function.

SAMPLE FIX/WORKAROUND:
None available.


Thank you for your help!


Kerry W. Lothrop

Douglas C. Schmidt

unread,
Feb 16, 2006, 12:21:27 PM2/16/06
to
Hi Kerry,

Thanks for using the PRF! We're about to do a complete
overhaul of the TAO sequence implementation, which will be integrated
with the CVS head after 1.5.1 is released. There's a version of this
that's available as CVS branch if you'd like to test your program with
it to make sure it fixes the problem. Johnny, can you please point
Kerry in the right direction to try this?

thanks,

Doug


--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Institute for Software Integrated Systems WEB: www.dre.vanderbilt.edu/~schmidt
Vanderbilt University, Nashville TN, 37203 NET: d.sc...@vanderbilt.edu

Johnny Willemsen

unread,
Feb 16, 2006, 3:01:15 PM2/16/06
to
Hi,

The sequence update is in cvs, see http://cvs.doc.wustl.edu how to reach
cvs. Instead of checking out the cvs head you have to checkout the sequence
update branch, so the cvs checkout instructions are:

Cvs -z 9 -q checkout -r sequenceupdate -P ACE_wrappers
Cvs -z 9 -q checkout -r sequenceupdate -P ACE_MPC

Then you have to regenerate the makefiles, see ACE-INSTALL.html how to do
that and then you can use this branch.

Regards,

Please upgrade to ACE+TAO x.4.6, which you can download from

http://deuce.doc.wustl.edu/Download.html

under the heading "latest beta kit". The DOC groups at Washington
University, UC Irvine, and Vanderbilt University only provide "best
effort" support for non-sponsors for the latest beta kit, as described
in

http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/ACE-bug-process.html

Thus, if you need more "predictable" help, I recommend that you
check out

http://www.cs.wustl.edu/~schmidt/commercial-support.html

for a list of companies that will provide you with ACE+TAO commercial
support.

0 new messages