error "RTIOsapiHeap_reallocateMemoryInternal' when calling register_type

4 posts / 0 new
Last post
Offline
Last seen: 2 weeks 4 days ago
Joined: 01/13/2016
Posts: 58
error "RTIOsapiHeap_reallocateMemoryInternal' when calling register_type

Hi,

I have created less than 100 topics, some are larger and some are smaller,and error occurred for some topics when calling RTIOsapiHeap_reallocateMemoryInternal in function FooTypeSupport::register_type

What are the possible reasons?

it's funny that the program works fine on windows. it just comes error on ubuntu.

Howard's picture
Offline
Last seen: 3 days 13 hours ago
Joined: 11/29/2012
Posts: 571

Can you post the entire error message?  What version of RTI Connext DDS are you using?  If you create an application that just registers the types for which the problem occurs when you are registering the types for the 100 topics, does the problem still occur?

Offline
Last seen: 2 weeks 4 days ago
Joined: 01/13/2016
Posts: 58

the version is 6.1.1 on ubuntu 18.04 and the error message looks like this

in raise () from /lib/x86_64_linux-gnu/libc.so.6
in abort () from /lib/x86_64_linux-gnu/libc.so.6
in ?? () from /lib/x86_64_linux-gnu/libc.so.6
in ?? () from /lib/x86_64_linux-gnu/libc.so.6
in ?? () from /lib/x86_64_linux-gnu/libc.so.6
in calloc () from
in RTIOsapiHeap_reallocateMemoryInternal() from /opt/code/ddsbus/idlfunc.so
in MdlATA28_CParamInputPlugin_new() at ....
in MdlATA28_CParamInputTypeSupport::register_type(participant=0x1141f90, typename=0x1141fe0"CParamInput")

I create topic, datawriter and datareader for every topic,the error always occurs unless the number of topics is reduced

Howard's picture
Offline
Last seen: 3 days 13 hours ago
Joined: 11/29/2012
Posts: 571

Well, first, I don't think the problem is inherent in DDS.  I would suggest compiling with debug flags turned on as well as linking with the debug version of the Connext libraries.

Which Connext platform are you using?  x64Linux4gcc7.3.0?

You can certainly set a breakpoint in your code before the error occurs and look at the parameters passed in.  The realloc() memory call...what is the size of the memory block being requested?  Check the calling function, MdlATA28_CParamInputPlugin_new(), what is the code?  What is it passing in?

How much virtual memory is being used by your application when the problem occurs?

Do you have any datatypes that are very big?

What happens if you don't create datawriters/datareaders for any topics and just register the types and create topics?

My guess is that you are running out of virtual memory somehow.  When you create a DataWriter/DataReader, by default, DDS will create a queue for each that stores an initial number of data samples...each data sample is the max size of the data type.  So for variable sized data that are big, this could allocate ALOT of memory.

You can have Connext allocate memory only as needed, instead of preallocating the max size.  Please look at these DataReader/DataWriter properties that you can set in the Property QosPolicy.

dds.data_reader.history.memory_manager.fast_pool.pool_buffer_max_size

dds.data_writer.history.memory_manager.fast_pool.pool_buffer_max_size

https://community.rti.com/static/documentation/connext-dds/6.1.1/doc/manuals/connext_dds_professional/properties_reference/property_tag.html#queue-memory-management