Dynamic subscribe on topic with unbound sequence with msvc 32 bit

2 posts / 0 new
Last post
Offline
Last seen: 1 year 3 weeks ago
Joined: 08/25/2015
Posts: 32
Dynamic subscribe on topic with unbound sequence with msvc 32 bit

Hi,

on Windows (MSVC 2015, 32Bit) we can't dynamically subscribe to a topic with an unbounded sequence. It looks like there is a OOM exception. I can see a similiar problem on Linux when I try to run my application with valgrind. Using another  memory profiler I came to the conclusion that for every unbounded topic 8GB of virtual ram are allocated (better: 8GB * datareader_qos.resource_limits.initial_samples). This works fine for 64 Bit systems because the memory is only allocated but not used. Since valgrind tracks the memory, it has to initialize the 8GB which maybe works for one or two topics but not for more... :)

On Windows 32Bit the problem is that a process can only allocate a little less then 4GB ...

To reproduce the issue, I modifed the Dynamic Data: Publish and Subscribe Using Dynamic Data example ( https://community.rti.com/examples/dynamic-data-publish-and-subscribe-using-dynamic-data ) - simply add a 'sequence<long> mySequence;', compile it with MSVC 2015, 32Bit and start the subscriber:

Output: PRESTypePluginDefaultEndpointData_createMD5StreamWithInfo:!create sample

then crash

 

Thx,

Christian

sara's picture
Offline
Last seen: 2 weeks 2 days ago
Joined: 01/16/2013
Posts: 127

Hi Christian,

When generating an example with RTI CodeGen with -unboundedSupport, some QoS are set to avoid this use case. Mainly limiting the fast_buffer_pool. Could you try the following QoS settings in your application even if you are using Dynamic Data?

<datawriter_qos> 
    <property>
        <value>
            <element>
                <name>
                dds.data_writer.history.memory_manager.fast_pool.pool_buffer_max_size
                </name>
                <value>4096</value>
            </element>
        </value>
    </property>
</datawriter_qos>

<datareader_qos>
    <property>
        <value>
            <element>
                <name>
                dds.data_reader.history.memory_manager.fast_pool.pool_buffer_max_size
                </name>
                <value>4096</value>
            </element>
        </value>
    </property>
</datareader_qos>

Thanks,
Sara