When building a custom recording plugin (tutorial link). After the recording service has been killed with Ctrl+C, this error is thrown at the very end:
corrupted size vs. prev_size in fastbins Aborted (core dumped)
The program executes fine and destructors are called, so no functionality is lost. This happens both with the example code and my own implementation.
Does anyone know what causes this?
I can reproduce the error with:
source ~/rti_connext_dds-6.1.2/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash ~/rti_connext_dds-6.1.2/resource/app/bin/x64Linux4gcc7.3.0/rtirecordingservice record -cfgFile /path/to/config.xml -cfgName ConfigName -maxObjectsPerThread 32768 -domainIdBase 1
Thanks!
Hi,
Unfortunately, that doesn't look like it's a Connext-generated error message. If you do a search for "corrupted size vs. prev_size in fastbins", you'll find that it's reported in all sorts of non Connext apps.
It's likely related to allocating/deallocating memory...possibly, deallocating the same memory multiple times.
When you mention example code, are you referring to this:
https://github.com/rticommunity/rticonnextdds-examples/tree/master/examples/recording_service/pluggable_storage/cpp
The link you provided doesn't actually have example code associated with it...
Hi Howard,
Thanks for the response. This is the example code I am using (the FileStorageWriter .cxx and .hpp).
Hi, I'm guessing that the problem is that the version of the compiler that you are using to build the plugins is not entirely compatible with the version of the compiler used to build the rtirecordingservice executable.
The "rtirecordingservice" executable distributed with RTI Connext 6.1.2 is build with the Connext platform "x64Linux2.6gcc4.4.5". And likely you are using a far newer version of gcc (and glibc).
And while it may be sort of compatible, i.e., it is loading and executing, there are probably differences in memory allocation linked in with the executable versus the plugins that's causing the memory issue on exit.
So, what you have to do is build your own version of "rtirecordingservice" with the same Connext platform with which you are building your plugin.
See here for some documentation:
https://community.rti.com/static/documentation/connext-dds/current/doc/api/recording_service/api_cpp/group__RTI__RecordingServiceLibModule.html