Multiple segmentation fault errors

On Feb 14, 2012, at 09:55 , focke [dot] 85 [..] ... wrote:

> Hi all
>
> I've been having several segmentation fault errors. Some of them appear just
> some times (I re-run the program and they are not there any more). Most of
> these errors are appearing when reading the properties configuration files
> (.cpf), from the C++ component code as well as from the XML file (read by the
> deployer). What can be causing this?
>
> The versions I'm using are:
>
> - Xenomai 2.6.0 (linux kernel 2.6.38.8)
>
> - RTNET 0.9.12
>
> - ROS Diamondback
>
> - Orocos: orocos_toolchain_ros (ros-diamondback) + patch for Xenomai 2.6.0
> (http://bugs.orocos.org/show_bug.cgi?id=913)
>
>
> Regards,
>
>
> Santiago

Where does gdb think the error is?

Multiple segmentation fault errors

Hi Santiago,

On Tue, Feb 14, 2012 at 3:55 PM, <focke [dot] 85 [..] ...> wrote:
> Hi all
>
> I've been having several segmentation fault errors. Some of them appear just
> some times (I re-run the program and they are not there any more). Most of
> these errors are appearing when reading the properties configuration files
> (.cpf), from the C++ component code as well as from the XML file (read by the
> deployer). What can be causing this?
>
> The versions I'm using are:
>
> - Xenomai 2.6.0 (linux kernel 2.6.38.8)
>
> - RTNET 0.9.12
>
> - ROS Diamondback
>
> - Orocos: orocos_toolchain_ros (ros-diamondback) + patch for Xenomai 2.6.0
> (http://bugs.orocos.org/show_bug.cgi?id=913)

*The* typical cause for random segfaults under Xenomai is the stack
size being too small. It could very well be that in
orocos_toolchain_ros, the standard stack size for Orocos threads under
Xenomai is way to small. Raising it to 256000 bytes might solve your
problem. For example, the latest code in
rtt/os/xenomai/fosi_internal.cpp: rtos_task_create() contains the
lines:

        if (stack_size == 0) {
          log(Debug) << "Raizing default stack size to 128kb for
Xenomai threads in Orocos." <<endlog();
          stack_size = 128000;
        }

Which is for every thread created in addition to the main() thread.
However, I couldn't figure out how the stack size of the main() thread
is set in Xenomai... which might be the thread reading your
properties.

Peter

Multiple segmentation fault errors

On 02/23/2012 10:18 AM, Peter Soetens wrote:
> Oh. But that actually looks like a decent build system that could be
> interfaced easily by others (e.g. autoproj). Do you know of the
> timeplan on its deployment ?
>
>
> It is being used in Fuerte for testing on a set of selected packages,
> but the API is said to be still unstable. Migration to catkin will only
> happen after Fuerte. I think they want to release it as an independent
> tool as well (debian package or similar).
Ah :(

Unfortunate, I was hoping that I could spare the pain of interfacing the
current rosmake system in autoproj. Hopefully it will be widespread
around september, after my baby leave :-P

Sylvain

Multiple segmentation fault errors

Hi Peter, thanks for the reply

2012/2/15 Peter Soetens <peter [..] ...>

> Hi Santiago,
>
> On Tue, Feb 14, 2012 at 3:55 PM, <focke [dot] 85 [..] ...> wrote:
> > Hi all
> >
> > I've been having several segmentation fault errors. Some of them appear
> just
> > some times (I re-run the program and they are not there any more). Most
> of
> > these errors are appearing when reading the properties configuration
> files
> > (.cpf), from the C++ component code as well as from the XML file (read
> by the
> > deployer). What can be causing this?
> >
> > The versions I'm using are:
> >
> > - Xenomai 2.6.0 (linux kernel 2.6.38.8)
> >
> > - RTNET 0.9.12
> >
> > - ROS Diamondback
> >
> > - Orocos: orocos_toolchain_ros (ros-diamondback) + patch for Xenomai
> 2.6.0
> > (http://bugs.orocos.org/show_bug.cgi?id=913)
>
> *The* typical cause for random segfaults under Xenomai is the stack
> size being too small. It could very well be that in
> orocos_toolchain_ros, the standard stack size for Orocos threads under
> Xenomai is way to small. Raising it to 256000 bytes might solve your
> problem. For example, the latest code in
> rtt/os/xenomai/fosi_internal.cpp: rtos_task_create() contains the
> lines:
>
>

>        if (stack_size == 0) {
>          log(Debug) << "Raizing default stack size to 128kb for
> Xenomai threads in Orocos." <<endlog();
>          stack_size = 128000;
>        }
> 

>
>
I'm using the orocos_toolchain_ros (ROS: diamondback), therefore I don't
have those code lines in rtt/os/xenomai/fosi_internal.cpp:
rtos_task_create(). Nevertheless I added them (just before rv =
rt_task_spawn(..)), and recompiled the toolchain, but the segmentation
fault error remains. Is there any other option or cause?

Also, I'm not completely sure, but I think I also had some segmentation
fault errors while reading/writing configuration files (using the
marshaling service inside my components - C++) when I wasn't using Xenomai.
Again, with some components worked and with other ones I had the error.

> Which is for every thread created in addition to the main() thread.
> However, I couldn't figure out how the stack size of the main() thread
> is set in Xenomai... which might be the thread reading your
> properties.
>
> Peter
>

Regards,

Multiple segmentation fault errors

On Thu, Feb 16, 2012 at 4:13 PM, Santiago Focke <focke [dot] 85 [..] ...> wrote:
> Hi Peter, thanks for the reply
>
>
...
>
> I'm using the orocos_toolchain_ros (ROS: diamondback), therefore I don't
> have those code lines in rtt/os/xenomai/fosi_internal.cpp:
> rtos_task_create(). Nevertheless I added them (just before rv =
> rt_task_spawn(..)), and recompiled the toolchain, but the segmentation fault
> error remains. Is there any other option or cause?
>
> Also, I'm not completely sure, but I think I also had some segmentation
> fault errors while reading/writing configuration files (using the marshaling
> service inside my components - C++) when I wasn't using Xenomai. Again, with
> some components worked and with other ones I had the error.

Well, segfaults are just unacceptable in Orocos code, so we take high
priority in testing all possible use cases and fix any. If you find a
segfault in 'gnulinux' code, run it through with valgrind ( valgrind
deployer-gnulinux -s ... ) and post the results on the list. The last
years, most segfaults were in user code though.

You can't test Xenomai code with valgrind, and only sometimes with
gdb. So what we try to do is to reproduce in gnulinux and then fix it.

Running your gnulinux application with valgrind from time to time is a
good idea as well, just to catch errors early on (before they cause a
crash).

Peter

Multiple segmentation fault errors

Hi Peter

2012/2/16 Peter Soetens <peter [..] ...>

> On Thu, Feb 16, 2012 at 4:13 PM, Santiago Focke <focke [dot] 85 [..] ...>
> wrote:
> > Hi Peter, thanks for the reply
> >
> >
> ...
> >
> > I'm using the orocos_toolchain_ros (ROS: diamondback), therefore I don't
> > have those code lines in rtt/os/xenomai/fosi_internal.cpp:
> > rtos_task_create(). Nevertheless I added them (just before rv =
> > rt_task_spawn(..)), and recompiled the toolchain, but the segmentation
> fault
> > error remains. Is there any other option or cause?
> >
> > Also, I'm not completely sure, but I think I also had some segmentation
> > fault errors while reading/writing configuration files (using the
> marshaling
> > service inside my components - C++) when I wasn't using Xenomai. Again,
> with
> > some components worked and with other ones I had the error.
>
> Well, segfaults are just unacceptable in Orocos code, so we take high
> priority in testing all possible use cases and fix any. If you find a
> segfault in 'gnulinux' code, run it through with valgrind ( valgrind
> deployer-gnulinux -s ... ) and post the results on the list. The last
> years, most segfaults were in user code though.
>

I passed my code to a gnulinux environment, using ros-electric, and now I
cannot even import my component without a segfault (this was not happening
before). I run the deployer with valgrind and receive a lot of errrors.
Most of them were 'Invalid read of size 4' and 'Conditional jump or move
depends on uninitialised value(s)'. I guess these must be treated as
warnings and wouldn't cause problem in the programs. I will omit these
errors in the post. Just before crashing, I got the following error:

Plugin of PowerCube_CAN_EtherCat_server loaded in process.
==28080== Invalid read of size 4
==28080==    at 0x41510CA:
RTT::types::TypeInfoRepository::getTypeById(std::type_info const*) const
(TypeInfoRepository.cpp:105)
==28080==    by 0x40D2BC0:
RTT::internal::DataSourceTypeInfo<bool>::getTypeInfo()
(TypeInfoRepository.hpp:128)
==28080==    by 0x40D2C96: RTT::internal::DataSource<bool>::getTypeInfo()
const (DataSource.inl:49)
==28080==    by 0x4133FA4: RTT::base::DataSourceBase::getMemberNames()
const (DataSource.cpp:135)
==28080==    by 0x4233202:
OCL::TaskBrowser::doPrint(boost::intrusive_ptr<RTT::base::DataSourceBase>,
bool) (TaskBrowser.cpp:1543)
==28080==    by 0x4232D72:
OCL::TaskBrowser::printResult(RTT::base::DataSourceBase*, bool)
(TaskBrowser.cpp:1500)
==28080==    by 0x423C4B6: OCL::TaskBrowser::evalCommand(std::string&)
(TaskBrowser.cpp:1460)
==28080==    by 0x42452D8: OCL::TaskBrowser::loop() (TaskBrowser.cpp:858)
==28080==    by 0x8053509: main (deployer.cpp:168)
==28080==  Address 0x9ada738 is 0 bytes inside a block of size 32 free'd
==28080==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==28080==    by 0xA274CB4: RTT::types::SequenceTypeInfo<std::vector<double,
std::allocator<double> >, false>::~SequenceTypeInfo()
(SequenceTypeInfo.hpp:18)
==28080==    by 0x41520AC:
RTT::types::TypeInfoRepository::aliasType(std::string const&,
RTT::types::TypeInfo*) (TypeInfoRepository.cpp:144)
==28080==    by 0xA2746F6:
RTT::types::PrimitiveTypeInfo<std::vector<double, std::allocator<double> >,
false>::installTypeInfoObject() (PrimitiveTypeInfo.hpp:72)
==28080==    by 0x41527BB:
RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
(TypeInfoRepository.cpp:125)
==28080==    by 0xE97AED3:
orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
(Plugin.cpp:44)
==28080==    by 0x41555AB:
RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
(TypekitRepository.cpp:66)
==28080==    by 0xE97AE2D: loadRTTPlugin (Plugin.cpp:58)
==28080==    by 0x415F5DC:
RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
std::string, bool) (PluginLoader.cpp:675)
==28080==    by 0x4162F04:
RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
std::string const&, std::string const&) (PluginLoader.cpp:404)
==28080==    by 0x4164A93:
RTT::plugin::PluginLoader::loadTypekits(std::string const&)
(PluginLoader.cpp:298)
==28080==    by 0x4391C61: OCL::ComponentLoader::import(std::string const&)
(ComponentLoader.cpp:180)
==28080==
pure virtual method called
terminate called without an active exception
==28080== Thread 5:
==28080== Invalid free() / delete / delete[] / realloc()
==28080==    at 0x402705E: free (vg_replace_malloc.c:427)
==28080==    by 0x4C83653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==28080==    by 0x4C83119: __libc_freeres (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==28080==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
==28080==    by 0x4C25B85: poll (in /lib/tls/i686/cmov/libc-2.11.1.so)
==28080==    by 0xA554FEF: ros::poll_sockets(pollfd*, unsigned long, int)
(io.cpp:220)
==28080==    by 0xA4976BB: ros::PollSet::update(int) (poll_set.cpp:182)
==28080==    by 0xA4DC862: ros::PollManager::threadFunc()
(poll_manager.cpp:95)
==28080==    by 0xA4DDD56:
boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void,
ros::PollManager>, boost::_bi::list1<boost::_bi::value<ros::PollManager*> >
> >::run() (mem_fn_template.hpp:49)
==28080==    by 0x4D0C7C4: thread_proxy (in
/usr/lib/libboost_thread.so.1.40.0)
==28080==    by 0x456796D: start_thread (in /lib/tls/i686/cmov/
libpthread-2.11.1.so)
==28080==    by 0x4C33A4D: clone (in /lib/tls/i686/cmov/libc-2.11.1.so)
==28080==  Address 0x4b20cc8 is not stack'd, malloc'd or (recently) free'd
==28080==
==28080==
==28080== HEAP SUMMARY:
==28080==     in use at exit: 953,717 bytes in 6,061 blocks
==28080==   total heap usage: 161,218 allocs, 155,158 frees, 22,555,762
bytes allocated
==28080==
==28080== LEAK SUMMARY:
==28080==    definitely lost: 364 bytes in 8 blocks
==28080==    indirectly lost: 17,561 bytes in 559 blocks
==28080==      possibly lost: 120,166 bytes in 994 blocks
==28080==    still reachable: 815,626 bytes in 4,500 blocks
==28080==         suppressed: 0 bytes in 0 blocks
==28080== Rerun with --leak-check=full to see details of leaked memory
==28080==
==28080== For counts of detected and suppressed errors, rerun with: -v
==28080== Use --track-origins=yes to see where uninitialised values come
from
==28080== ERROR SUMMARY: 108 errors from 30 contexts (suppressed: 693 from
84)
Killed

The component I'm trying to import component depends on 'soem_core',
'soem_master' and 'soem_esd_drivers' (following the same idea of the
soem-beckhoff_drivers). To use it with ros-electric I changed the
'rtt_ros_integration' and 'rtt_ros_integration_std_msgs' packages to
'rtt_rosnode'. If I import my 'soem_esd_drivers' it does it without
problems. I don't know These orocos_ros-version change is affecting in
someway with these new segfault error.

manifest.xml

<package>
    <description brief="Orocos PowerCube_CAN_EtherCat_server Component
package">
        This package contains the components of the
PowerCube_CAN_EtherCat_server package
    </description>
    <!--NOTE: set the license and author before you publish this code-->
    <license></license>
    <author>Unknown Author</author>
      <depend package="rtt"/>
      <depend package="rtt_rosnode"/>
      <!--depend package="rtt_ros_integration"/-->
    <!--depend package="rtt_ros_integration_std_msgs"/-->
        <depend package="soem_core"/>
      <depend package="soem_master"/>
      <depend package="soem_esd_drivers"/>
</package>

in CMakeLists.txt of 'soem_esd_drivers'


ros_generate_rtt_typekit(soem_esd_drivers)
orocos_plugin(soem_can-ethercat src/soem_esd_drivers.cpp
src/soem_can-ethercat.cpp)
target_link_libraries(soem_can-ethercat rt)

I also tried to import a clean component (just changing the manifest of a
just created orocos-component to add the soem packages) and the problem
continues.

>
> You can't test Xenomai code with valgrind, and only sometimes with
> gdb. So what we try to do is to reproduce in gnulinux and then fix it.
>
> Running your gnulinux application with valgrind from time to time is a
> good idea as well, just to catch errors early on (before they cause a
> crash).
>
> Peter
>

Regards,

Multiple segmentation fault errors

Hi Santiago,

On Mon, Feb 20, 2012 at 4:56 PM, Santiago Focke <focke [dot] 85 [..] ...> wrote:
> Hi Peter
>
> 2012/2/16 Peter Soetens <peter [..] ...>
>>
>> On Thu, Feb 16, 2012 at 4:13 PM, Santiago Focke <focke [dot] 85 [..] ...>
>> wrote:
>> > Hi Peter, thanks for the reply
>> >
>> >
>> ...
>> >
>> > I'm using the orocos_toolchain_ros (ROS: diamondback), therefore I don't
>> > have those code lines in rtt/os/xenomai/fosi_internal.cpp:
>> > rtos_task_create(). Nevertheless I added them (just before rv =
>> > rt_task_spawn(..)), and recompiled the toolchain, but the segmentation
>> > fault
>> > error remains. Is there any other option or cause?
>> >
>> > Also, I'm not completely sure, but I think I also had some segmentation
>> > fault errors while reading/writing configuration files (using the
>> > marshaling
>> > service inside my components - C++) when I wasn't using Xenomai. Again,
>> > with
>> > some components worked and with other ones I had the error.
>>
>> Well, segfaults are just unacceptable in Orocos code, so we take high
>> priority in testing all possible use cases and fix any. If you find a
>> segfault in 'gnulinux' code, run it through with valgrind ( valgrind
>> deployer-gnulinux -s ... ) and post the results on the list. The last
>> years, most segfaults were in user code though.
>
>
> I passed my code to a gnulinux environment, using ros-electric, and now I
> cannot even import my component without a segfault (this was not happening
> before). I run the deployer with valgrind and receive a lot of errrors. Most
> of them were 'Invalid read of size 4' and 'Conditional jump or move depends
> on uninitialised value(s)'. I guess these must be treated as warnings and
> wouldn't cause problem in the programs.

Not at all. All these errors are grave errors and may cause crashes
and undefined behavior by definition. You must fix all of these, even
in case you don't have a segfault.

> I will omit these errors in the post. Just before crashing, I got the following error:
>
>

> Plugin of PowerCube_CAN_EtherCat_server loaded in process.
> ==28080== Invalid read of size 4
> ==28080==    at 0x41510CA:
> RTT::types::TypeInfoRepository::getTypeById(std::type_info const*) const
> (TypeInfoRepository.cpp:105)
> ==28080==    by 0x40D2BC0:
> RTT::internal::DataSourceTypeInfo<bool>::getTypeInfo()
> (TypeInfoRepository.hpp:128)
> ==28080==    by 0x40D2C96: RTT::internal::DataSource<bool>::getTypeInfo()
> const (DataSource.inl:49)
> ==28080==    by 0x4133FA4: RTT::base::DataSourceBase::getMemberNames() const
> (DataSource.cpp:135)
> ==28080==    by 0x4233202:
> OCL::TaskBrowser::doPrint(boost::intrusive_ptr<RTT::base::DataSourceBase>,
> bool) (TaskBrowser.cpp:1543)
> ==28080==    by 0x4232D72:
> OCL::TaskBrowser::printResult(RTT::base::DataSourceBase*, bool)
> (TaskBrowser.cpp:1500)
> ==28080==    by 0x423C4B6: OCL::TaskBrowser::evalCommand(std::string&)
> (TaskBrowser.cpp:1460)
> ==28080==    by 0x42452D8: OCL::TaskBrowser::loop() (TaskBrowser.cpp:858)
> ==28080==    by 0x8053509: main (deployer.cpp:168)
> ==28080==  Address 0x9ada738 is 0 bytes inside a block of size 32 free'd
> ==28080==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==28080==    by 0xA274CB4: RTT::types::SequenceTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~SequenceTypeInfo()
> (SequenceTypeInfo.hpp:18)
> ==28080==    by 0x41520AC:
> RTT::types::TypeInfoRepository::aliasType(std::string const&,
> RTT::types::TypeInfo*) (TypeInfoRepository.cpp:144)
> ==28080==    by 0xA2746F6: RTT::types::PrimitiveTypeInfo<std::vector<double,
> std::allocator<double> >, false>::installTypeInfoObject()
> (PrimitiveTypeInfo.hpp:72)
> ==28080==    by 0x41527BB:
> RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
> (TypeInfoRepository.cpp:125)
> ==28080==    by 0xE97AED3:
> orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
> (Plugin.cpp:44)
> ==28080==    by 0x41555AB:
> RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
> (TypekitRepository.cpp:66)
> ==28080==    by 0xE97AE2D: loadRTTPlugin (Plugin.cpp:58)
> ==28080==    by 0x415F5DC:
> RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
> std::string, bool) (PluginLoader.cpp:675)
> ==28080==    by 0x4162F04:
> RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
> std::string const&, std::string const&) (PluginLoader.cpp:404)
> ==28080==    by 0x4164A93:
> RTT::plugin::PluginLoader::loadTypekits(std::string const&)
> (PluginLoader.cpp:298)
> ==28080==    by 0x4391C61: OCL::ComponentLoader::import(std::string const&)
> (ComponentLoader.cpp:180)
> ==28080==
> pure virtual method called
> terminate called without an active exception
> ==28080== Thread 5:
> ==28080== Invalid free() / delete / delete[] / realloc()
> ==28080==    at 0x402705E: free (vg_replace_malloc.c:427)
> ==28080==    by 0x4C83653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==28080==    by 0x4C83119: __libc_freeres (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==28080==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
> ==28080==    by 0x4C25B85: poll (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==28080==    by 0xA554FEF: ros::poll_sockets(pollfd*, unsigned long, int)
> (io.cpp:220)
> ==28080==    by 0xA4976BB: ros::PollSet::update(int) (poll_set.cpp:182)
> ==28080==    by 0xA4DC862: ros::PollManager::threadFunc()
> (poll_manager.cpp:95)
> ==28080==    by 0xA4DDD56:
> boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void,
> ros::PollManager>, boost::_bi::list1<boost::_bi::value<ros::PollManager*> >
>> >::run() (mem_fn_template.hpp:49)
> ==28080==    by 0x4D0C7C4: thread_proxy (in
> /usr/lib/libboost_thread.so.1.40.0)
> ==28080==    by 0x456796D: start_thread (in
> /lib/tls/i686/cmov/libpthread-2.11.1.so)
> ==28080==    by 0x4C33A4D: clone (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==28080==  Address 0x4b20cc8 is not stack'd, malloc'd or (recently) free'd
> ==28080==
> ==28080==
> ==28080== HEAP SUMMARY:
> ==28080==     in use at exit: 953,717 bytes in 6,061 blocks
> ==28080==   total heap usage: 161,218 allocs, 155,158 frees, 22,555,762
> bytes allocated
> ==28080==
> ==28080== LEAK SUMMARY:
> ==28080==    definitely lost: 364 bytes in 8 blocks
> ==28080==    indirectly lost: 17,561 bytes in 559 blocks
> ==28080==      possibly lost: 120,166 bytes in 994 blocks
> ==28080==    still reachable: 815,626 bytes in 4,500 blocks
> ==28080==         suppressed: 0 bytes in 0 blocks
> ==28080== Rerun with --leak-check=full to see details of leaked memory
> ==28080==
> ==28080== For counts of detected and suppressed errors, rerun with: -v
> ==28080== Use --track-origins=yes to see where uninitialised values come
> from
> ==28080== ERROR SUMMARY: 108 errors from 30 contexts (suppressed: 693 from
> 84)
> Killed
>
> 

>
> The component I'm trying to import component depends on 'soem_core',
> 'soem_master' and 'soem_esd_drivers' (following the same idea of the
> soem-beckhoff_drivers). To use it with ros-electric I changed the
> 'rtt_ros_integration' and 'rtt_ros_integration_std_msgs' packages to
> 'rtt_rosnode'. If I import my 'soem_esd_drivers' it does it without
> problems. I don't know These orocos_ros-version change is affecting in
> someway with these new segfault error.

Ok. I think we found the error. The most likely reason for this case
not working is that the 'typegen' generated typekits don't handle well
different OROCOS_TARGET targets in the same source tree.

What you can do best is to erase all generated files, lib and build
directories in your typekit packages and then rebuild. Most likely, a
next import will no longer cause a crash.

The valgrind error also points out that one typekit is replacing
another. This shouldn't be a problem, but it possibly happened because
there's still 'old' code in your typegen libraries.

Some serious bugfixing is necessary on this front anyway, but I'm
lacking the time to do this right.

Peter

Multiple segmentation fault errors

Hi Peter

2012/2/21 Peter Soetens <peter [..] ...>

> Hi Santiago,
>
> On Mon, Feb 20, 2012 at 4:56 PM, Santiago Focke <focke [dot] 85 [..] ...>
> wrote:
> > Hi Peter
> >
> > 2012/2/16 Peter Soetens <peter [..] ...>
> >>
> >> On Thu, Feb 16, 2012 at 4:13 PM, Santiago Focke <focke [dot] 85 [..] ...>
> >> wrote:
> >> > Hi Peter, thanks for the reply
> >> >
> >> >
> >> ...
> >> >
> >> > I'm using the orocos_toolchain_ros (ROS: diamondback), therefore I
> don't
> >> > have those code lines in rtt/os/xenomai/fosi_internal.cpp:
> >> > rtos_task_create(). Nevertheless I added them (just before rv =
> >> > rt_task_spawn(..)), and recompiled the toolchain, but the segmentation
> >> > fault
> >> > error remains. Is there any other option or cause?
> >> >
> >> > Also, I'm not completely sure, but I think I also had some
> segmentation
> >> > fault errors while reading/writing configuration files (using the
> >> > marshaling
> >> > service inside my components - C++) when I wasn't using Xenomai.
> Again,
> >> > with
> >> > some components worked and with other ones I had the error.
> >>
> >> Well, segfaults are just unacceptable in Orocos code, so we take high
> >> priority in testing all possible use cases and fix any. If you find a
> >> segfault in 'gnulinux' code, run it through with valgrind ( valgrind
> >> deployer-gnulinux -s ... ) and post the results on the list. The last
> >> years, most segfaults were in user code though.
> >
> >
> > I passed my code to a gnulinux environment, using ros-electric, and now I
> > cannot even import my component without a segfault (this was not
> happening
> > before). I run the deployer with valgrind and receive a lot of errrors.
> Most
> > of them were 'Invalid read of size 4' and 'Conditional jump or move
> depends
> > on uninitialised value(s)'. I guess these must be treated as warnings and
> > wouldn't cause problem in the programs.
>
> Not at all. All these errors are grave errors and may cause crashes
> and undefined behavior by definition. You must fix all of these, even
> in case you don't have a segfault.
>

The thing is that I receive the 'Invalid read of size 4' errors just by
running 'valgrind ./deployer-gnulinux' (in the diamondback stack, as well
as in the electric stack), without importing any of my compoents. after I
quit, i receive algo an 'Invalid free() / delete / delete[] / realloc()'
error.

/opt/ros/diamondback/stacks/orocos_toolchain_ros/ocl/bin# valgrind
./deployer-gnulinux
==4315== Memcheck, a memory error detector
==4315== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==4315== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==4315== Command: ./deployer-gnulinux
==4315==
==4315== Invalid read of size 4
==4315==    at 0x4C4F83B: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==4315==    by 0x4D4F4F5: rospack::ROSPack::run(std::string const&)
(rospack.cpp:1203)
==4315==    by 0x4A97ACC: ros::package::command(std::string const&)
(package.cpp:55)
==4315==    by 0x4A97D11: ros::package::getPath(std::string const&)
(package.cpp:91)
==4315==    by 0x4410BA4: OCL::ComponentLoader::import(std::string const&,
std::string const&) (ComponentLoader.cpp:273)
==4315==    by 0x436FFBA: OCL::DeploymentComponent::import(std::string
const&) (DeploymentComponent.cpp:1464)
==4315==    by 0x438443B:
OCL::DeploymentComponent::DeploymentComponent(std::string, std::string)
(DeploymentComponent.cpp:201)
==4315==    by 0x8053495: main (deployer.cpp:141)
==4315==  Address 0x4e7ae68 is 16 bytes inside a block of size 17 alloc'd
==4315==    at 0x4027C13: operator new(unsigned int)
(vg_replace_malloc.c:282)
==4315==    by 0x4B37D05: std::string::_Rep::_S_create(unsigned int,
unsigned int, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.13)
==4315==    by 0x4B38E30: ??? (in /usr/lib/libstdc++.so.6.0.13)
==4315==    by 0x4B390A1: std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string(std::string const&, unsigned int,
unsigned int) (in /usr/lib/libstdc++.so.6.0.13)
==4315==    by 0x4D42527: rospack::string_split(std::string const&,
std::vector<std::string, std::allocator<std::string> >&, std::string
const&) (basic_string.h:2006)
==4315==    by 0x4D4F473: rospack::ROSPack::run(std::string const&)
(rospack.cpp:1194)
==4315==    by 0x4A97ACC: ros::package::command(std::string const&)
(package.cpp:55)
==4315==    by 0x4A97D11: ros::package::getPath(std::string const&)
(package.cpp:91)
==4315==    by 0x4410BA4: OCL::ComponentLoader::import(std::string const&,
std::string const&) (ComponentLoader.cpp:273)
==4315==    by 0x436FFBA: OCL::DeploymentComponent::import(std::string
const&) (DeploymentComponent.cpp:1464)
==4315==    by 0x438443B:
OCL::DeploymentComponent::DeploymentComponent(std::string, std::string)
(DeploymentComponent.cpp:201)
==4315==    by 0x8053495: main (deployer.cpp:141)
==4315==
   Switched to : Deployer
 
  This console reader allows you to browse and manipulate TaskContexts.
  You can type in an operation, expression, create or change variables.
  (type 'help' for instructions and 'ls' for context info)
 
    TAB completion and HISTORY is available ('bash' like)
 
    Use 'Ctrl-D' or type 'quit' to exit this program.
 
==4315== Conditional jump or move depends on uninitialised value(s)
==4315==    at 0x4C4F82F: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==4315==    by 0x4C0AFE4: setenv (in /lib/tls/i686/cmov/libc-2.11.1.so)
==4315==    by 0x402A8A5: setenv (mc_replace_strmem.c:1574)
==4315==    by 0x44F8FAA: sh_set_lines_and_columns (in
/lib/libreadline.so.6.1)
==4315==    by 0x44F0C0C: _rl_get_screen_size (in /lib/libreadline.so.6.1)
==4315==    by 0x44F11FA: _rl_init_terminal_io (in /lib/libreadline.so.6.1)
==4315==    by 0x44D95D8: rl_initialize (in /lib/libreadline.so.6.1)
==4315==    by 0x44DA5AD: readline (in /lib/libreadline.so.6.1)
==4315==    by 0x4296A0D: OCL::TaskBrowser::rl_gets() (TaskBrowser.cpp:220)
==4315==    by 0x42ABD07: OCL::TaskBrowser::loop() (TaskBrowser.cpp:801)
==4315==    by 0x8053549: main (deployer.cpp:162)
==4315==
==4315== Invalid read of size 4
 
.
.
.
 
Deployer [S]> quit
 
TLSF bytes allocated=20480 overhead=3248 max-used=3248 currently-used=3248
still-allocated=0
==4315== Invalid free() / delete / delete[] / realloc()
==4315==    at 0x402705E: free (vg_replace_malloc.c:427)
==4315==    by 0x4CF9653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==4315==    by 0x4CF9119: __libc_freeres (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==4315==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
==4315==    by 0x4C74033: _Exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==4315==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==4315==    by 0x4BF2BDD: (below main) (in /lib/tls/i686/cmov/libc-2.11.1.so
)
==4315==  Address 0x4b96ce0 is not stack'd, malloc'd or (recently) free'd

>
> > I will omit these errors in the post. Just before crashing, I got the
> following error:
> >
> >

> > Plugin of PowerCube_CAN_EtherCat_server loaded in process.
> > ==28080== Invalid read of size 4
> > ==28080==    at 0x41510CA:
> > RTT::types::TypeInfoRepository::getTypeById(std::type_info const*) const
> > (TypeInfoRepository.cpp:105)
> > ==28080==    by 0x40D2BC0:
> > RTT::internal::DataSourceTypeInfo<bool>::getTypeInfo()
> > (TypeInfoRepository.hpp:128)
> > ==28080==    by 0x40D2C96: RTT::internal::DataSource<bool>::getTypeInfo()
> > const (DataSource.inl:49)
> > ==28080==    by 0x4133FA4: RTT::base::DataSourceBase::getMemberNames()
> const
> > (DataSource.cpp:135)
> > ==28080==    by 0x4233202:
> >
> OCL::TaskBrowser::doPrint(boost::intrusive_ptr<RTT::base::DataSourceBase>,
> > bool) (TaskBrowser.cpp:1543)
> > ==28080==    by 0x4232D72:
> > OCL::TaskBrowser::printResult(RTT::base::DataSourceBase*, bool)
> > (TaskBrowser.cpp:1500)
> > ==28080==    by 0x423C4B6: OCL::TaskBrowser::evalCommand(std::string&)
> > (TaskBrowser.cpp:1460)
> > ==28080==    by 0x42452D8: OCL::TaskBrowser::loop() (TaskBrowser.cpp:858)
> > ==28080==    by 0x8053509: main (deployer.cpp:168)
> > ==28080==  Address 0x9ada738 is 0 bytes inside a block of size 32 free'd
> > ==28080==    at 0x4026D75: operator delete(void*)
> (vg_replace_malloc.c:457)
> > ==28080==    by 0xA274CB4:
> RTT::types::SequenceTypeInfo<std::vector<double,
> > std::allocator<double> >, false>::~SequenceTypeInfo()
> > (SequenceTypeInfo.hpp:18)
> > ==28080==    by 0x41520AC:
> > RTT::types::TypeInfoRepository::aliasType(std::string const&,
> > RTT::types::TypeInfo*) (TypeInfoRepository.cpp:144)
> > ==28080==    by 0xA2746F6:
> RTT::types::PrimitiveTypeInfo<std::vector<double,
> > std::allocator<double> >, false>::installTypeInfoObject()
> > (PrimitiveTypeInfo.hpp:72)
> > ==28080==    by 0x41527BB:
> > RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
> > (TypeInfoRepository.cpp:125)
> > ==28080==    by 0xE97AED3:
> > orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
> > (Plugin.cpp:44)
> > ==28080==    by 0x41555AB:
> > RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
> > (TypekitRepository.cpp:66)
> > ==28080==    by 0xE97AE2D: loadRTTPlugin (Plugin.cpp:58)
> > ==28080==    by 0x415F5DC:
> > RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
> > std::string, bool) (PluginLoader.cpp:675)
> > ==28080==    by 0x4162F04:
> > RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
> > std::string const&, std::string const&) (PluginLoader.cpp:404)
> > ==28080==    by 0x4164A93:
> > RTT::plugin::PluginLoader::loadTypekits(std::string const&)
> > (PluginLoader.cpp:298)
> > ==28080==    by 0x4391C61: OCL::ComponentLoader::import(std::string
> const&)
> > (ComponentLoader.cpp:180)
> > ==28080==
> > pure virtual method called
> > terminate called without an active exception
> > ==28080== Thread 5:
> > ==28080== Invalid free() / delete / delete[] / realloc()
> > ==28080==    at 0x402705E: free (vg_replace_malloc.c:427)
> > ==28080==    by 0x4C83653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> > ==28080==    by 0x4C83119: __libc_freeres (in
> > /lib/tls/i686/cmov/libc-2.11.1.so)
> > ==28080==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
> > ==28080==    by 0x4C25B85: poll (in /lib/tls/i686/cmov/libc-2.11.1.so)
> > ==28080==    by 0xA554FEF: ros::poll_sockets(pollfd*, unsigned long, int)
> > (io.cpp:220)
> > ==28080==    by 0xA4976BB: ros::PollSet::update(int) (poll_set.cpp:182)
> > ==28080==    by 0xA4DC862: ros::PollManager::threadFunc()
> > (poll_manager.cpp:95)
> > ==28080==    by 0xA4DDD56:
> > boost::detail::thread_data<boost::_bi::bind_t<void,
> boost::_mfi::mf0<void,
> > ros::PollManager>,
> boost::_bi::list1<boost::_bi::value<ros::PollManager*> >
> >> >::run() (mem_fn_template.hpp:49)
> > ==28080==    by 0x4D0C7C4: thread_proxy (in
> > /usr/lib/libboost_thread.so.1.40.0)
> > ==28080==    by 0x456796D: start_thread (in
> > /lib/tls/i686/cmov/libpthread-2.11.1.so)
> > ==28080==    by 0x4C33A4D: clone (in /lib/tls/i686/cmov/libc-2.11.1.so)
> > ==28080==  Address 0x4b20cc8 is not stack'd, malloc'd or (recently)
> free'd
> > ==28080==
> > ==28080==
> > ==28080== HEAP SUMMARY:
> > ==28080==     in use at exit: 953,717 bytes in 6,061 blocks
> > ==28080==   total heap usage: 161,218 allocs, 155,158 frees, 22,555,762
> > bytes allocated
> > ==28080==
> > ==28080== LEAK SUMMARY:
> > ==28080==    definitely lost: 364 bytes in 8 blocks
> > ==28080==    indirectly lost: 17,561 bytes in 559 blocks
> > ==28080==      possibly lost: 120,166 bytes in 994 blocks
> > ==28080==    still reachable: 815,626 bytes in 4,500 blocks
> > ==28080==         suppressed: 0 bytes in 0 blocks
> > ==28080== Rerun with --leak-check=full to see details of leaked memory
> > ==28080==
> > ==28080== For counts of detected and suppressed errors, rerun with: -v
> > ==28080== Use --track-origins=yes to see where uninitialised values come
> > from
> > ==28080== ERROR SUMMARY: 108 errors from 30 contexts (suppressed: 693
> from
> > 84)
> > Killed
> >
> > 

> >
> > The component I'm trying to import component depends on 'soem_core',
> > 'soem_master' and 'soem_esd_drivers' (following the same idea of the
> > soem-beckhoff_drivers). To use it with ros-electric I changed the
> > 'rtt_ros_integration' and 'rtt_ros_integration_std_msgs' packages to
> > 'rtt_rosnode'. If I import my 'soem_esd_drivers' it does it without
> > problems. I don't know These orocos_ros-version change is affecting in
> > someway with these new segfault error.
>
> Ok. I think we found the error. The most likely reason for this case
> not working is that the 'typegen' generated typekits don't handle well
> different OROCOS_TARGET targets in the same source tree.
>
> What you can do best is to erase all generated files, lib and build
> directories in your typekit packages and then rebuild. Most likely, a
> next import will no longer cause a crash.
>
> The valgrind error also points out that one typekit is replacing
> another. This shouldn't be a problem, but it possibly happened because
> there's still 'old' code in your typegen libraries.
>
> Some serious bugfixing is necessary on this front anyway, but I'm
> lacking the time to do this right.
>
> Peter
>

I tried to find the solution by creating a new component (orocreate-pkg)
and just adding a dependency to 'rtt_rosnode' in the manifest, but, even
though it was a new component, when I imported it in the deployer, I kept
receiving segfault. I decided then to re-migrate to ros-diamondback
(changing again the dependencies to rtt_ros_integration) and that segfault
disappeared, but the ones during the property-file reading are still there.

The valgrind output when I try to load the properties from the file is:

18.307 [ Info   ][PropertyLoader:configure] Configuring TaskContext
'FTSensorServer' with
'/home/focke/Desktop/FTSensor_CAN_EC_Server_propertyFile.cpf'.
==16364== Invalid read of size 4
==16364==    at 0x419212A:
RTT::internal::ValueDataSource<std::string>::set(std::string const&)
(basic_string.h:273)
==16364==    by 0x4121C69:
RTT::Property<std::string>::copy(RTT::base::PropertyBase const*)
(Property.hpp:338)
==16364==    by 0x411166C: RTT::copyProperties(RTT::PropertyBag&,
RTT::PropertyBag const&) (PropertyBag.cpp:552)
==16364==    by 0x4636444:
RTT::marsh::PropertyLoader::configure(std::string const&,
RTT::TaskContext*, bool) const (PropertyLoader.cpp:162)
==16364==    by 0x437ADA2:
OCL::DeploymentComponent::configureComponentsGroup(int)
(DeploymentComponent.cpp:1187)
==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
const&) (DeploymentComponent.cpp:495)
==16364==    by 0x805351F: main (deployer.cpp:150)
==16364==  Address 0xbe88c7d4 is just below the stack ptr.  To suppress,
use: --workaround-gcc296-bugs=yes
==16364==
==16364== Invalid read of size 4
==16364==    at 0x4121F60: RTT::Property<int>::copy(RTT::base::PropertyBase
const*) (Property.hpp:338)
==16364==    by 0x411166C: RTT::copyProperties(RTT::PropertyBag&,
RTT::PropertyBag const&) (PropertyBag.cpp:552)
==16364==    by 0x4636444:
RTT::marsh::PropertyLoader::configure(std::string const&,
RTT::TaskContext*, bool) const (PropertyLoader.cpp:162)
==16364==    by 0x437ADA2:
OCL::DeploymentComponent::configureComponentsGroup(int)
(DeploymentComponent.cpp:1187)
==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
const&) (DeploymentComponent.cpp:495)
==16364==    by 0x805351F: main (deployer.cpp:150)
==16364==  Address 0xbe88c7c0 is just below the stack ptr.  To suppress,
use: --workaround-gcc296-bugs=yes
==16364==
==16364== Invalid read of size 4
==16364==    at 0x4B39667: std::string::assign(std::string const&) (in
/usr/lib/libstdc++.so.6.0.13)
==16364==    by 0x43944F6:
RTT::internal::ReferenceDataSource<std::string>::set(std::string const&)
(basic_string.h:506)
==16364==    by 0x4121D61:
RTT::Property<std::string>::refresh(RTT::base::PropertyBase const*)
(Property.hpp:364)
==16364==    by 0x4113184:
RTT::updateOrRefreshProperty(RTT::base::PropertyBase*,
RTT::base::PropertyBase*, bool) (PropertyBag.cpp:454)
==16364==    by 0x4113FBB: RTT::refreshProperties(RTT::PropertyBag const&,
RTT::PropertyBag const&, bool) (PropertyBag.cpp:517)
==16364==    by 0x46364B0:
RTT::marsh::PropertyLoader::configure(std::string const&,
RTT::TaskContext*, bool) const (PropertyLoader.cpp:163)
==16364==    by 0x437ADA2:
OCL::DeploymentComponent::configureComponentsGroup(int)
(DeploymentComponent.cpp:1187)
==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
const&) (DeploymentComponent.cpp:495)
==16364==    by 0x805351F: main (deployer.cpp:150)
==16364==  Address 0xbe88c7d4 is just below the stack ptr.  To suppress,
use: --workaround-gcc296-bugs=yes
==16364==
==16364== Invalid read of size 4
==16364==    at 0x4B39705: std::string::assign(std::string const&) (in
/usr/lib/libstdc++.so.6.0.13)
==16364==    by 0x43944F6:
RTT::internal::ReferenceDataSource<std::string>::set(std::string const&)
(basic_string.h:506)
==16364==    by 0x4121D61:
RTT::Property<std::string>::refresh(RTT::base::PropertyBase const*)
(Property.hpp:364)
==16364==    by 0x4113184:
RTT::updateOrRefreshProperty(RTT::base::PropertyBase*,
RTT::base::PropertyBase*, bool) (PropertyBag.cpp:454)
==16364==    by 0x4113FBB: RTT::refreshProperties(RTT::PropertyBag const&,
RTT::PropertyBag const&, bool) (PropertyBag.cpp:517)
==16364==    by 0x46364B0:
RTT::marsh::PropertyLoader::configure(std::string const&,
RTT::TaskContext*, bool) const (PropertyLoader.cpp:163)
==16364==    by 0x437ADA2:
OCL::DeploymentComponent::configureComponentsGroup(int)
(DeploymentComponent.cpp:1187)
==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
const&) (DeploymentComponent.cpp:495)
==16364==    by 0x805351F: main (deployer.cpp:150)
==16364==  Address 0xbe88c7d4 is just below the stack ptr.  To suppress,
use: --workaround-gcc296-bugs=yes
==16364==
==16364==
==16364== Process terminating with default action of signal 11 (SIGSEGV)
==16364==  Bad permissions for mapped region at address 0x4221FF0
==16364==    at 0x4B396D5: std::string::assign(std::string const&) (in
/usr/lib/libstdc++.so.6.0.13)
==16364==    by 0x43944F6:
RTT::internal::ReferenceDataSource<std::string>::set(std::string const&)
(basic_string.h:506)
==16364==    by 0x4121D61:
RTT::Property<std::string>::refresh(RTT::base::PropertyBase const*)
(Property.hpp:364)
==16364==    by 0x4113184:
RTT::updateOrRefreshProperty(RTT::base::PropertyBase*,
RTT::base::PropertyBase*, bool) (PropertyBag.cpp:454)
==16364==    by 0x4113FBB: RTT::refreshProperties(RTT::PropertyBag const&,
RTT::PropertyBag const&, bool) (PropertyBag.cpp:517)
==16364==    by 0x46364B0:
RTT::marsh::PropertyLoader::configure(std::string const&,
RTT::TaskContext*, bool) const (PropertyLoader.cpp:163)
==16364==    by 0x437ADA2:
OCL::DeploymentComponent::configureComponentsGroup(int)
(DeploymentComponent.cpp:1187)
==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
const&) (DeploymentComponent.cpp:495)
==16364==    by 0x805351F: main (deployer.cpp:150)
==16364== Thread 7:
==16364== Invalid free() / delete / delete[] / realloc()
==16364==    at 0x402705E: free (vg_replace_malloc.c:427)
==16364==    by 0x4CF9653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16364==    by 0x4CF9119: __libc_freeres (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16364==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
==16364==    by 0x45B0341: pthread_cond_timedwait@@GLIBC_2.3.2 (in
/lib/tls/i686/cmov/libpthread-2.11.1.so)
==16364==    by 0x20EE540F: ???
==16364==  Address 0x4b96ce0 is not stack'd, malloc'd or (recently) free'd
==16364==
==16364==
==16364== HEAP SUMMARY:
==16364==     in use at exit: 542,954 bytes in 8,483 blocks
==16364==   total heap usage: 221,821 allocs, 213,339 frees, 11,141,609
bytes allocated
==16364==
==16364== LEAK SUMMARY:
==16364==    definitely lost: 1,076 bytes in 25 blocks
==16364==    indirectly lost: 35,221 bytes in 1,119 blocks
==16364==      possibly lost: 178,890 bytes in 1,550 blocks
==16364==    still reachable: 327,767 bytes in 5,789 blocks
==16364==         suppressed: 0 bytes in 0 blocks
==16364== Rerun with --leak-check=full to see details of leaked memory
==16364==
==16364== For counts of detected and suppressed errors, rerun with: -v
==16364== Use --track-origins=yes to see where uninitialised values come
from
==16364== ERROR SUMMARY: 145 errors from 24 contexts (suppressed: 772 from
76)
Killed

Also, when i take the property loading of the faulty component, I get
segfault when quiting the deployer:

==16339== Invalid free() / delete / delete[] / realloc()
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x41ADC57: RTT::types::TypeBuilder::~TypeBuilder()
(TypeBuilder.cpp:47)
==16339==    by 0x41B52CD: RTT::types::TypeInfo::~TypeInfo()
(TypeInfo.cpp:76)
==16339==    by 0x41AE175:
RTT::types::TypeInfoRepository::~TypeInfoRepository()
(TypeInfoRepository.cpp:94)
==16339==    by 0x41B0F98:
boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
(checked_delete.hpp:34)
==16339==    by 0x4115C8F:
boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
(sp_counted_base_gcc_x86.hpp:145)
==16339==    by 0x4C0B587: __cxa_finalize (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==    by 0x410D233: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x41CD20F: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==  Address 0x7e398d8 is 0 bytes inside a block of size 4 free'd
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x5BB8184: RTT::types::SequenceBuilder<std::vector<double,
std::allocator<double> > >::~SequenceBuilder() (SequenceConstructor.hpp:61)
==16339==    by 0x41B544D: RTT::types::TypeInfo::~TypeInfo()
(TypeInfo.cpp:76)
==16339==    by 0x95D984B: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::~TemplateTypeInfo()
(TemplateTypeInfo.hpp:143)
==16339==    by 0x95D9890: RTT::types::SequenceTypeInfo<std::vector<double,
std::allocator<double> >, false>::~SequenceTypeInfo()
(SequenceTypeInfo.hpp:126)
==16339==    by 0x41AEFCC:
RTT::types::TypeInfoRepository::aliasType(std::string const&,
RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::installTypeInfoObject()
(TemplateTypeInfo.hpp:156)
==16339==    by 0x41AF52B:
RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
(TypeInfoRepository.cpp:114)
==16339==    by 0xF727A63:
orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
(Plugin.cpp:44)
==16339==    by 0x41B231B:
RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
(TypekitRepository.cpp:66)
==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
==16339==    by 0x41BC49C:
RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
std::string, bool) (PluginLoader.cpp:671)
==16339==
==16339== Invalid read of size 4
==16339==    at 0x41B52D1: RTT::types::TypeInfo::~TypeInfo()
(TypeInfo.cpp:75)
==16339==    by 0x41AE175:
RTT::types::TypeInfoRepository::~TypeInfoRepository()
(TypeInfoRepository.cpp:94)
==16339==    by 0x41B0F98:
boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
(checked_delete.hpp:34)
==16339==    by 0x4115C8F:
boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
(sp_counted_base_gcc_x86.hpp:145)
==16339==    by 0x4C0B587: __cxa_finalize (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==    by 0x410D233: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x41CD20F: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4BF2BDD: (below main) (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==  Address 0x7e39890 is 8 bytes inside a block of size 32 free'd
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x95D9898: RTT::types::SequenceTypeInfo<std::vector<double,
std::allocator<double> >, false>::~SequenceTypeInfo()
(SequenceTypeInfo.hpp:126)
==16339==    by 0x41AEFCC:
RTT::types::TypeInfoRepository::aliasType(std::string const&,
RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::installTypeInfoObject()
(TemplateTypeInfo.hpp:156)
==16339==    by 0x41AF52B:
RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
(TypeInfoRepository.cpp:114)
==16339==    by 0xF727A63:
orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
(Plugin.cpp:44)
==16339==    by 0x41B231B:
RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
(TypekitRepository.cpp:66)
==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
==16339==    by 0x41BC49C:
RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
std::string, bool) (PluginLoader.cpp:671)
==16339==    by 0x41BFDC4:
RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
std::string const&, std::string const&) (PluginLoader.cpp:400)
==16339==    by 0x41C1953:
RTT::plugin::PluginLoader::loadTypekits(std::string const&)
(PluginLoader.cpp:294)
==16339==    by 0x4410541: OCL::ComponentLoader::import(std::string const&)
(ComponentLoader.cpp:180)
==16339==
==16339== Invalid read of size 4
==16339==    at 0x41B52D6: RTT::types::TypeInfo::~TypeInfo()
(stl_vector.h:132)
==16339==    by 0x41AE175:
RTT::types::TypeInfoRepository::~TypeInfoRepository()
(TypeInfoRepository.cpp:94)
==16339==    by 0x41B0F98:
boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
(checked_delete.hpp:34)
==16339==    by 0x4115C8F:
boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
(sp_counted_base_gcc_x86.hpp:145)
==16339==    by 0x4C0B587: __cxa_finalize (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==    by 0x410D233: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x41CD20F: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4BF2BDD: (below main) (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==  Address 0x7e39898 is 16 bytes inside a block of size 32 free'd
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x95D9898: RTT::types::SequenceTypeInfo<std::vector<double,
std::allocator<double> >, false>::~SequenceTypeInfo()
(SequenceTypeInfo.hpp:126)
==16339==    by 0x41AEFCC:
RTT::types::TypeInfoRepository::aliasType(std::string const&,
RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::installTypeInfoObject()
(TemplateTypeInfo.hpp:156)
==16339==    by 0x41AF52B:
RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
(TypeInfoRepository.cpp:114)
==16339==    by 0xF727A63:
orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
(Plugin.cpp:44)
==16339==    by 0x41B231B:
RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
(TypekitRepository.cpp:66)
==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
==16339==    by 0x41BC49C:
RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
std::string, bool) (PluginLoader.cpp:671)
==16339==    by 0x41BFDC4:
RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
std::string const&, std::string const&) (PluginLoader.cpp:400)
==16339==    by 0x41C1953:
RTT::plugin::PluginLoader::loadTypekits(std::string const&)
(PluginLoader.cpp:294)
==16339==    by 0x4410541: OCL::ComponentLoader::import(std::string const&)
(ComponentLoader.cpp:180)
==16339==
==16339== Invalid free() / delete / delete[] / realloc()
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x41B52E4: RTT::types::TypeInfo::~TypeInfo()
(new_allocator.h:95)
==16339==    by 0x41AE175:
RTT::types::TypeInfoRepository::~TypeInfoRepository()
(TypeInfoRepository.cpp:94)
==16339==    by 0x41B0F98:
boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
(checked_delete.hpp:34)
==16339==    by 0x4115C8F:
boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
(sp_counted_base_gcc_x86.hpp:145)
==16339==    by 0x4C0B587: __cxa_finalize (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==    by 0x410D233: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x41CD20F: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4BF2BDD: (below main) (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==  Address 0x7e3a1d8 is 0 bytes inside a block of size 12 free'd
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x41B5464: RTT::types::TypeInfo::~TypeInfo()
(new_allocator.h:95)
==16339==    by 0x95D984B: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::~TemplateTypeInfo()
(TemplateTypeInfo.hpp:143)
==16339==    by 0x95D9890: RTT::types::SequenceTypeInfo<std::vector<double,
std::allocator<double> >, false>::~SequenceTypeInfo()
(SequenceTypeInfo.hpp:126)
==16339==    by 0x41AEFCC:
RTT::types::TypeInfoRepository::aliasType(std::string const&,
RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::installTypeInfoObject()
(TemplateTypeInfo.hpp:156)
==16339==    by 0x41AF52B:
RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
(TypeInfoRepository.cpp:114)
==16339==    by 0xF727A63:
orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
(Plugin.cpp:44)
==16339==    by 0x41B231B:
RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
(TypekitRepository.cpp:66)
==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
==16339==    by 0x41BC49C:
RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
std::string, bool) (PluginLoader.cpp:671)
==16339==    by 0x41BFDC4:
RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
std::string const&, std::string const&) (PluginLoader.cpp:400)
==16339==
==16339== Invalid read of size 4
==16339==    at 0x41B52E5: RTT::types::TypeInfo::~TypeInfo()
(stl_vector.h:132)
==16339==    by 0x41AE175:
RTT::types::TypeInfoRepository::~TypeInfoRepository()
(TypeInfoRepository.cpp:94)
==16339==    by 0x41B0F98:
boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
(checked_delete.hpp:34)
==16339==    by 0x4115C8F:
boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
(sp_counted_base_gcc_x86.hpp:145)
==16339==    by 0x4C0B587: __cxa_finalize (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==    by 0x410D233: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x41CD20F: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4BF2BDD: (below main) (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==  Address 0x7e3988c is 4 bytes inside a block of size 32 free'd
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x95D9898: RTT::types::SequenceTypeInfo<std::vector<double,
std::allocator<double> >, false>::~SequenceTypeInfo()
(SequenceTypeInfo.hpp:126)
==16339==    by 0x41AEFCC:
RTT::types::TypeInfoRepository::aliasType(std::string const&,
RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::installTypeInfoObject()
(TemplateTypeInfo.hpp:156)
==16339==    by 0x41AF52B:
RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
(TypeInfoRepository.cpp:114)
==16339==    by 0xF727A63:
orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
(Plugin.cpp:44)
==16339==    by 0x41B231B:
RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
(TypekitRepository.cpp:66)
==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
==16339==    by 0x41BC49C:
RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
std::string, bool) (PluginLoader.cpp:671)
==16339==    by 0x41BFDC4:
RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
std::string const&, std::string const&) (PluginLoader.cpp:400)
==16339==    by 0x41C1953:
RTT::plugin::PluginLoader::loadTypekits(std::string const&)
(PluginLoader.cpp:294)
==16339==    by 0x4410541: OCL::ComponentLoader::import(std::string const&)
(ComponentLoader.cpp:180)
==16339==
==16339== Invalid free() / delete / delete[] / realloc()
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x41B52F3: RTT::types::TypeInfo::~TypeInfo()
(new_allocator.h:95)
==16339==    by 0x41AE175:
RTT::types::TypeInfoRepository::~TypeInfoRepository()
(TypeInfoRepository.cpp:94)
==16339==    by 0x41B0F98:
boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
(checked_delete.hpp:34)
==16339==    by 0x4115C8F:
boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
(sp_counted_base_gcc_x86.hpp:145)
==16339==    by 0x4C0B587: __cxa_finalize (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==    by 0x410D233: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x41CD20F: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4BF2BDD: (below main) (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==  Address 0x7e39b10 is 0 bytes inside a block of size 16 free'd
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x41B5473: RTT::types::TypeInfo::~TypeInfo()
(new_allocator.h:95)
==16339==    by 0x95D984B: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::~TemplateTypeInfo()
(TemplateTypeInfo.hpp:143)
==16339==    by 0x95D9890: RTT::types::SequenceTypeInfo<std::vector<double,
std::allocator<double> >, false>::~SequenceTypeInfo()
(SequenceTypeInfo.hpp:126)
==16339==    by 0x41AEFCC:
RTT::types::TypeInfoRepository::aliasType(std::string const&,
RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::installTypeInfoObject()
(TemplateTypeInfo.hpp:156)
==16339==    by 0x41AF52B:
RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
(TypeInfoRepository.cpp:114)
==16339==    by 0xF727A63:
orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
(Plugin.cpp:44)
==16339==    by 0x41B231B:
RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
(TypekitRepository.cpp:66)
==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
==16339==    by 0x41BC49C:
RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
std::string, bool) (PluginLoader.cpp:671)
==16339==    by 0x41BFDC4:
RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
std::string const&, std::string const&) (PluginLoader.cpp:400)
==16339==
==16339== Invalid free() / delete / delete[] / realloc()
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x41B52FB: RTT::types::TypeInfo::~TypeInfo()
(TypeInfo.cpp:77)
==16339==    by 0x41AE175:
RTT::types::TypeInfoRepository::~TypeInfoRepository()
(TypeInfoRepository.cpp:94)
==16339==    by 0x41B0F98:
boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
(checked_delete.hpp:34)
==16339==    by 0x4115C8F:
boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
(sp_counted_base_gcc_x86.hpp:145)
==16339==    by 0x4C0B587: __cxa_finalize (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==    by 0x410D233: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x41CD20F: ??? (in
/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4BF2BDD: (below main) (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==  Address 0x7e39888 is 0 bytes inside a block of size 32 free'd
==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
==16339==    by 0x95D9898: RTT::types::SequenceTypeInfo<std::vector<double,
std::allocator<double> >, false>::~SequenceTypeInfo()
(SequenceTypeInfo.hpp:126)
==16339==    by 0x41AEFCC:
RTT::types::TypeInfoRepository::aliasType(std::string const&,
RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
std::allocator<double> >, false>::installTypeInfoObject()
(TemplateTypeInfo.hpp:156)
==16339==    by 0x41AF52B:
RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
(TypeInfoRepository.cpp:114)
==16339==    by 0xF727A63:
orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
(Plugin.cpp:44)
==16339==    by 0x41B231B:
RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
(TypekitRepository.cpp:66)
==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
==16339==    by 0x41BC49C:
RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
std::string, bool) (PluginLoader.cpp:671)
==16339==    by 0x41BFDC4:
RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
std::string const&, std::string const&) (PluginLoader.cpp:400)
==16339==    by 0x41C1953:
RTT::plugin::PluginLoader::loadTypekits(std::string const&)
(PluginLoader.cpp:294)
==16339==    by 0x4410541: OCL::ComponentLoader::import(std::string const&)
(ComponentLoader.cpp:180)
==16339==
==16339== Invalid free() / delete / delete[] / realloc()
==16339==    at 0x402705E: free (vg_replace_malloc.c:427)
==16339==    by 0x4CF9653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4CF9119: __libc_freeres (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
==16339==    by 0x4C74033: _Exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
==16339==    by 0x4BF2BDD: (below main) (in /lib/tls/i686/cmov/
libc-2.11.1.so)
==16339==  Address 0x4b96ce0 is not stack'd, malloc'd or (recently) free'd
==16339==
==16339==
==16339== HEAP SUMMARY:
==16339==     in use at exit: 167,799 bytes in 1,303 blocks
==16339==   total heap usage: 259,616 allocs, 258,320 frees, 11,456,773
bytes allocated
==16339==
==16339== LEAK SUMMARY:
==16339==    definitely lost: 2,158 bytes in 12 blocks
==16339==    indirectly lost: 17,762 bytes in 566 blocks
==16339==      possibly lost: 577 bytes in 17 blocks
==16339==    still reachable: 147,302 bytes in 708 blocks
==16339==         suppressed: 0 bytes in 0 blocks
==16339== Rerun with --leak-check=full to see details of leaked memory
==16339==
==16339== For counts of detected and suppressed errors, rerun with: -v
==16339== Use --track-origins=yes to see where uninitialised values come
from
==16339== ERROR SUMMARY: 434 errors from 97 contexts (suppressed: 653 from
77)

Anyway I'll check later again with ros-electric by deleting the libraries
you say to see if that eliminates the first segfault error.

Thanks again.

Regards,

Multiple segmentation fault errors

Hi Santiago,

This amount of errors can only be caused by loading
incompatible-version libraries. They change existing functions and
corrupt the data. I think we should add a version check to each loaded
library such that these things can be detected early on.

Be sure to erase all your lib/ directories, also in soem, (in addition
to cleaning up typegen packages) and to try again...

Peter

On Tue, Feb 21, 2012 at 4:48 PM, Santiago Focke <focke [dot] 85 [..] ...> wrote:
> Hi Peter
>
> 2012/2/21 Peter Soetens <peter [..] ...>
>>
>> Hi Santiago,
>>
>> On Mon, Feb 20, 2012 at 4:56 PM, Santiago Focke <focke [dot] 85 [..] ...>
>> wrote:
>> > Hi Peter
>> >
>> > 2012/2/16 Peter Soetens <peter [..] ...>
>> >>
>> >> On Thu, Feb 16, 2012 at 4:13 PM, Santiago Focke <focke [dot] 85 [..] ...>
>> >> wrote:
>> >> > Hi Peter, thanks for the reply
>> >> >
>> >> >
>> >> ...
>> >> >
>> >> > I'm using the orocos_toolchain_ros (ROS: diamondback), therefore I
>> >> > don't
>> >> > have those code lines in rtt/os/xenomai/fosi_internal.cpp:
>> >> > rtos_task_create(). Nevertheless I added them (just before rv =
>> >> > rt_task_spawn(..)), and recompiled the toolchain, but the
>> >> > segmentation
>> >> > fault
>> >> > error remains. Is there any other option or cause?
>> >> >
>> >> > Also, I'm not completely sure, but I think I also had some
>> >> > segmentation
>> >> > fault errors while reading/writing configuration files (using the
>> >> > marshaling
>> >> > service inside my components - C++) when I wasn't using Xenomai.
>> >> > Again,
>> >> > with
>> >> > some components worked and with other ones I had the error.
>> >>
>> >> Well, segfaults are just unacceptable in Orocos code, so we take high
>> >> priority in testing all possible use cases and fix any. If you find a
>> >> segfault in 'gnulinux' code, run it through with valgrind ( valgrind
>> >> deployer-gnulinux -s ... ) and post the results on the list. The last
>> >> years, most segfaults were in user code though.
>> >
>> >
>> > I passed my code to a gnulinux environment, using ros-electric, and now
>> > I
>> > cannot even import my component without a segfault (this was not
>> > happening
>> > before). I run the deployer with valgrind and receive a lot of errrors.
>> > Most
>> > of them were 'Invalid read of size 4' and 'Conditional jump or move
>> > depends
>> > on uninitialised value(s)'. I guess these must be treated as warnings
>> > and
>> > wouldn't cause problem in the programs.
>>
>> Not at all. All these errors are grave errors and may cause crashes
>> and undefined behavior by definition. You must fix all of these, even
>> in case you don't have a segfault.
>
>
> The thing is that I receive the 'Invalid read of size 4' errors just by
> running 'valgrind ./deployer-gnulinux' (in the diamondback stack, as well as
> in the electric stack), without importing any of my compoents. after I quit,
> i receive algo an 'Invalid free() / delete / delete[] / realloc()' error.
>
>

> /opt/ros/diamondback/stacks/orocos_toolchain_ros/ocl/bin# valgrind
> ./deployer-gnulinux
> ==4315== Memcheck, a memory error detector
> ==4315== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
> ==4315== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
> ==4315== Command: ./deployer-gnulinux
> ==4315==
> ==4315== Invalid read of size 4
> ==4315==    at 0x4C4F83B: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==4315==    by 0x4D4F4F5: rospack::ROSPack::run(std::string const&)
> (rospack.cpp:1203)
> ==4315==    by 0x4A97ACC: ros::package::command(std::string const&)
> (package.cpp:55)
> ==4315==    by 0x4A97D11: ros::package::getPath(std::string const&)
> (package.cpp:91)
> ==4315==    by 0x4410BA4: OCL::ComponentLoader::import(std::string const&,
> std::string const&) (ComponentLoader.cpp:273)
> ==4315==    by 0x436FFBA: OCL::DeploymentComponent::import(std::string
> const&) (DeploymentComponent.cpp:1464)
> ==4315==    by 0x438443B:
> OCL::DeploymentComponent::DeploymentComponent(std::string, std::string)
> (DeploymentComponent.cpp:201)
> ==4315==    by 0x8053495: main (deployer.cpp:141)
> ==4315==  Address 0x4e7ae68 is 16 bytes inside a block of size 17 alloc'd
> ==4315==    at 0x4027C13: operator new(unsigned int)
> (vg_replace_malloc.c:282)
> ==4315==    by 0x4B37D05: std::string::_Rep::_S_create(unsigned int,
> unsigned int, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.13)
> ==4315==    by 0x4B38E30: ??? (in /usr/lib/libstdc++.so.6.0.13)
> ==4315==    by 0x4B390A1: std::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::basic_string(std::string const&, unsigned int,
> unsigned int) (in /usr/lib/libstdc++.so.6.0.13)
> ==4315==    by 0x4D42527: rospack::string_split(std::string const&,
> std::vector<std::string, std::allocator<std::string> >&, std::string const&)
> (basic_string.h:2006)
> ==4315==    by 0x4D4F473: rospack::ROSPack::run(std::string const&)
> (rospack.cpp:1194)
> ==4315==    by 0x4A97ACC: ros::package::command(std::string const&)
> (package.cpp:55)
> ==4315==    by 0x4A97D11: ros::package::getPath(std::string const&)
> (package.cpp:91)
> ==4315==    by 0x4410BA4: OCL::ComponentLoader::import(std::string const&,
> std::string const&) (ComponentLoader.cpp:273)
> ==4315==    by 0x436FFBA: OCL::DeploymentComponent::import(std::string
> const&) (DeploymentComponent.cpp:1464)
> ==4315==    by 0x438443B:
> OCL::DeploymentComponent::DeploymentComponent(std::string, std::string)
> (DeploymentComponent.cpp:201)
> ==4315==    by 0x8053495: main (deployer.cpp:141)
> ==4315==
>    Switched to : Deployer
>
>   This console reader allows you to browse and manipulate TaskContexts.
>   You can type in an operation, expression, create or change variables.
>   (type 'help' for instructions and 'ls' for context info)
>
>     TAB completion and HISTORY is available ('bash' like)
>
>     Use 'Ctrl-D' or type 'quit' to exit this program.
>
> ==4315== Conditional jump or move depends on uninitialised value(s)
> ==4315==    at 0x4C4F82F: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==4315==    by 0x4C0AFE4: setenv (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==4315==    by 0x402A8A5: setenv (mc_replace_strmem.c:1574)
> ==4315==    by 0x44F8FAA: sh_set_lines_and_columns (in
> /lib/libreadline.so.6.1)
> ==4315==    by 0x44F0C0C: _rl_get_screen_size (in /lib/libreadline.so.6.1)
> ==4315==    by 0x44F11FA: _rl_init_terminal_io (in /lib/libreadline.so.6.1)
> ==4315==    by 0x44D95D8: rl_initialize (in /lib/libreadline.so.6.1)
> ==4315==    by 0x44DA5AD: readline (in /lib/libreadline.so.6.1)
> ==4315==    by 0x4296A0D: OCL::TaskBrowser::rl_gets() (TaskBrowser.cpp:220)
> ==4315==    by 0x42ABD07: OCL::TaskBrowser::loop() (TaskBrowser.cpp:801)
> ==4315==    by 0x8053549: main (deployer.cpp:162)
> ==4315==
> ==4315== Invalid read of size 4
>
> .
> .
> .
>
> Deployer [S]> quit
>
> TLSF bytes allocated=20480 overhead=3248 max-used=3248 currently-used=3248
> still-allocated=0
> ==4315== Invalid free() / delete / delete[] / realloc()
> ==4315==    at 0x402705E: free (vg_replace_malloc.c:427)
> ==4315==    by 0x4CF9653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==4315==    by 0x4CF9119: __libc_freeres (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==4315==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
> ==4315==    by 0x4C74033: _Exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==4315==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==4315==    by 0x4BF2BDD: (below main) (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==4315==  Address 0x4b96ce0 is not stack'd, malloc'd or (recently) free'd
> 

>
>>
>>
>> > I will omit these errors in the post. Just before crashing, I got the
>> > following error:
>> >
>> >
>> > Plugin of PowerCube_CAN_EtherCat_server loaded in process.
>> > ==28080== Invalid read of size 4
>> > ==28080==    at 0x41510CA:
>> > RTT::types::TypeInfoRepository::getTypeById(std::type_info const*) const
>> > (TypeInfoRepository.cpp:105)
>> > ==28080==    by 0x40D2BC0:
>> > RTT::internal::DataSourceTypeInfo<bool>::getTypeInfo()
>> > (TypeInfoRepository.hpp:128)
>> > ==28080==    by 0x40D2C96:
>> > RTT::internal::DataSource<bool>::getTypeInfo()
>> > const (DataSource.inl:49)
>> > ==28080==    by 0x4133FA4: RTT::base::DataSourceBase::getMemberNames()
>> > const
>> > (DataSource.cpp:135)
>> > ==28080==    by 0x4233202:
>> >
>> > OCL::TaskBrowser::doPrint(boost::intrusive_ptr<RTT::base::DataSourceBase>,
>> > bool) (TaskBrowser.cpp:1543)
>> > ==28080==    by 0x4232D72:
>> > OCL::TaskBrowser::printResult(RTT::base::DataSourceBase*, bool)
>> > (TaskBrowser.cpp:1500)
>> > ==28080==    by 0x423C4B6: OCL::TaskBrowser::evalCommand(std::string&)
>> > (TaskBrowser.cpp:1460)
>> > ==28080==    by 0x42452D8: OCL::TaskBrowser::loop()
>> > (TaskBrowser.cpp:858)
>> > ==28080==    by 0x8053509: main (deployer.cpp:168)
>> > ==28080==  Address 0x9ada738 is 0 bytes inside a block of size 32 free'd
>> > ==28080==    at 0x4026D75: operator delete(void*)
>> > (vg_replace_malloc.c:457)
>> > ==28080==    by 0xA274CB4:
>> > RTT::types::SequenceTypeInfo<std::vector<double,
>> > std::allocator<double> >, false>::~SequenceTypeInfo()
>> > (SequenceTypeInfo.hpp:18)
>> > ==28080==    by 0x41520AC:
>> > RTT::types::TypeInfoRepository::aliasType(std::string const&,
>> > RTT::types::TypeInfo*) (TypeInfoRepository.cpp:144)
>> > ==28080==    by 0xA2746F6:
>> > RTT::types::PrimitiveTypeInfo<std::vector<double,
>> > std::allocator<double> >, false>::installTypeInfoObject()
>> > (PrimitiveTypeInfo.hpp:72)
>> > ==28080==    by 0x41527BB:
>> > RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
>> > (TypeInfoRepository.cpp:125)
>> > ==28080==    by 0xE97AED3:
>> > orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
>> > (Plugin.cpp:44)
>> > ==28080==    by 0x41555AB:
>> > RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
>> > (TypekitRepository.cpp:66)
>> > ==28080==    by 0xE97AE2D: loadRTTPlugin (Plugin.cpp:58)
>> > ==28080==    by 0x415F5DC:
>> > RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
>> > std::string, bool) (PluginLoader.cpp:675)
>> > ==28080==    by 0x4162F04:
>> > RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
>> > std::string const&, std::string const&) (PluginLoader.cpp:404)
>> > ==28080==    by 0x4164A93:
>> > RTT::plugin::PluginLoader::loadTypekits(std::string const&)
>> > (PluginLoader.cpp:298)
>> > ==28080==    by 0x4391C61: OCL::ComponentLoader::import(std::string
>> > const&)
>> > (ComponentLoader.cpp:180)
>> > ==28080==
>> > pure virtual method called
>> > terminate called without an active exception
>> > ==28080== Thread 5:
>> > ==28080== Invalid free() / delete / delete[] / realloc()
>> > ==28080==    at 0x402705E: free (vg_replace_malloc.c:427)
>> > ==28080==    by 0x4C83653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
>> > ==28080==    by 0x4C83119: __libc_freeres (in
>> > /lib/tls/i686/cmov/libc-2.11.1.so)
>> > ==28080==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
>> > ==28080==    by 0x4C25B85: poll (in /lib/tls/i686/cmov/libc-2.11.1.so)
>> > ==28080==    by 0xA554FEF: ros::poll_sockets(pollfd*, unsigned long,
>> > int)
>> > (io.cpp:220)
>> > ==28080==    by 0xA4976BB: ros::PollSet::update(int) (poll_set.cpp:182)
>> > ==28080==    by 0xA4DC862: ros::PollManager::threadFunc()
>> > (poll_manager.cpp:95)
>> > ==28080==    by 0xA4DDD56:
>> > boost::detail::thread_data<boost::_bi::bind_t<void,
>> > boost::_mfi::mf0<void,
>> > ros::PollManager>,
>> > boost::_bi::list1<boost::_bi::value<ros::PollManager*> >
>> >> >::run() (mem_fn_template.hpp:49)
>> > ==28080==    by 0x4D0C7C4: thread_proxy (in
>> > /usr/lib/libboost_thread.so.1.40.0)
>> > ==28080==    by 0x456796D: start_thread (in
>> > /lib/tls/i686/cmov/libpthread-2.11.1.so)
>> > ==28080==    by 0x4C33A4D: clone (in /lib/tls/i686/cmov/libc-2.11.1.so)
>> > ==28080==  Address 0x4b20cc8 is not stack'd, malloc'd or (recently)
>> > free'd
>> > ==28080==
>> > ==28080==
>> > ==28080== HEAP SUMMARY:
>> > ==28080==     in use at exit: 953,717 bytes in 6,061 blocks
>> > ==28080==   total heap usage: 161,218 allocs, 155,158 frees, 22,555,762
>> > bytes allocated
>> > ==28080==
>> > ==28080== LEAK SUMMARY:
>> > ==28080==    definitely lost: 364 bytes in 8 blocks
>> > ==28080==    indirectly lost: 17,561 bytes in 559 blocks
>> > ==28080==      possibly lost: 120,166 bytes in 994 blocks
>> > ==28080==    still reachable: 815,626 bytes in 4,500 blocks
>> > ==28080==         suppressed: 0 bytes in 0 blocks
>> > ==28080== Rerun with --leak-check=full to see details of leaked memory
>> > ==28080==
>> > ==28080== For counts of detected and suppressed errors, rerun with: -v
>> > ==28080== Use --track-origins=yes to see where uninitialised values come
>> > from
>> > ==28080== ERROR SUMMARY: 108 errors from 30 contexts (suppressed: 693
>> > from
>> > 84)
>> > Killed
>> >
>> > 

>> >
>> > The component I'm trying to import component depends on 'soem_core',
>> > 'soem_master' and 'soem_esd_drivers' (following the same idea of the
>> > soem-beckhoff_drivers). To use it with ros-electric I changed the
>> > 'rtt_ros_integration' and 'rtt_ros_integration_std_msgs' packages to
>> > 'rtt_rosnode'. If I import my 'soem_esd_drivers' it does it without
>> > problems. I don't know These orocos_ros-version change is affecting in
>> > someway with these new segfault error.
>>
>> Ok. I think we found the error. The most likely reason for this case
>> not working is that the 'typegen' generated typekits don't handle well
>> different OROCOS_TARGET targets in the same source tree.
>>
>> What you can do best is to erase all generated files, lib and build
>> directories in your typekit packages and then rebuild. Most likely, a
>> next import will no longer cause a crash.
>>
>> The valgrind error also points out that one typekit is replacing
>> another. This shouldn't be a problem, but it possibly happened because
>> there's still 'old' code in your typegen libraries.
>>
>> Some serious bugfixing is necessary on this front anyway, but I'm
>> lacking the time to do this right.
>>
>> Peter
>
>
> I tried to find the solution by creating a new component (orocreate-pkg) and
> just adding a dependency to 'rtt_rosnode' in the manifest, but, even though
> it was a new component, when I imported it in the deployer, I kept receiving
> segfault. I decided then to re-migrate to ros-diamondback (changing again
> the dependencies to rtt_ros_integration) and that segfault disappeared, but
> the ones during the property-file reading are still there.
>
> The valgrind output when I try to load the properties from the file is:
>
>
> 18.307 [ Info   ][PropertyLoader:configure] Configuring TaskContext
> 'FTSensorServer' with
> '/home/focke/Desktop/FTSensor_CAN_EC_Server_propertyFile.cpf'.
> ==16364== Invalid read of size 4
> ==16364==    at 0x419212A:
> RTT::internal::ValueDataSource<std::string>::set(std::string const&)
> (basic_string.h:273)
> ==16364==    by 0x4121C69:
> RTT::Property<std::string>::copy(RTT::base::PropertyBase const*)
> (Property.hpp:338)
> ==16364==    by 0x411166C: RTT::copyProperties(RTT::PropertyBag&,
> RTT::PropertyBag const&) (PropertyBag.cpp:552)
> ==16364==    by 0x4636444: RTT::marsh::PropertyLoader::configure(std::string
> const&, RTT::TaskContext*, bool) const (PropertyLoader.cpp:162)
> ==16364==    by 0x437ADA2:
> OCL::DeploymentComponent::configureComponentsGroup(int)
> (DeploymentComponent.cpp:1187)
> ==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
> const&) (DeploymentComponent.cpp:495)
> ==16364==    by 0x805351F: main (deployer.cpp:150)
> ==16364==  Address 0xbe88c7d4 is just below the stack ptr.  To suppress,
> use: --workaround-gcc296-bugs=yes
> ==16364==
> ==16364== Invalid read of size 4
> ==16364==    at 0x4121F60: RTT::Property<int>::copy(RTT::base::PropertyBase
> const*) (Property.hpp:338)
> ==16364==    by 0x411166C: RTT::copyProperties(RTT::PropertyBag&,
> RTT::PropertyBag const&) (PropertyBag.cpp:552)
> ==16364==    by 0x4636444: RTT::marsh::PropertyLoader::configure(std::string
> const&, RTT::TaskContext*, bool) const (PropertyLoader.cpp:162)
> ==16364==    by 0x437ADA2:
> OCL::DeploymentComponent::configureComponentsGroup(int)
> (DeploymentComponent.cpp:1187)
> ==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
> const&) (DeploymentComponent.cpp:495)
> ==16364==    by 0x805351F: main (deployer.cpp:150)
> ==16364==  Address 0xbe88c7c0 is just below the stack ptr.  To suppress,
> use: --workaround-gcc296-bugs=yes
> ==16364==
> ==16364== Invalid read of size 4
> ==16364==    at 0x4B39667: std::string::assign(std::string const&) (in
> /usr/lib/libstdc++.so.6.0.13)
> ==16364==    by 0x43944F6:
> RTT::internal::ReferenceDataSource<std::string>::set(std::string const&)
> (basic_string.h:506)
> ==16364==    by 0x4121D61:
> RTT::Property<std::string>::refresh(RTT::base::PropertyBase const*)
> (Property.hpp:364)
> ==16364==    by 0x4113184:
> RTT::updateOrRefreshProperty(RTT::base::PropertyBase*,
> RTT::base::PropertyBase*, bool) (PropertyBag.cpp:454)
> ==16364==    by 0x4113FBB: RTT::refreshProperties(RTT::PropertyBag const&,
> RTT::PropertyBag const&, bool) (PropertyBag.cpp:517)
> ==16364==    by 0x46364B0: RTT::marsh::PropertyLoader::configure(std::string
> const&, RTT::TaskContext*, bool) const (PropertyLoader.cpp:163)
> ==16364==    by 0x437ADA2:
> OCL::DeploymentComponent::configureComponentsGroup(int)
> (DeploymentComponent.cpp:1187)
> ==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
> const&) (DeploymentComponent.cpp:495)
> ==16364==    by 0x805351F: main (deployer.cpp:150)
> ==16364==  Address 0xbe88c7d4 is just below the stack ptr.  To suppress,
> use: --workaround-gcc296-bugs=yes
> ==16364==
> ==16364== Invalid read of size 4
> ==16364==    at 0x4B39705: std::string::assign(std::string const&) (in
> /usr/lib/libstdc++.so.6.0.13)
> ==16364==    by 0x43944F6:
> RTT::internal::ReferenceDataSource<std::string>::set(std::string const&)
> (basic_string.h:506)
> ==16364==    by 0x4121D61:
> RTT::Property<std::string>::refresh(RTT::base::PropertyBase const*)
> (Property.hpp:364)
> ==16364==    by 0x4113184:
> RTT::updateOrRefreshProperty(RTT::base::PropertyBase*,
> RTT::base::PropertyBase*, bool) (PropertyBag.cpp:454)
> ==16364==    by 0x4113FBB: RTT::refreshProperties(RTT::PropertyBag const&,
> RTT::PropertyBag const&, bool) (PropertyBag.cpp:517)
> ==16364==    by 0x46364B0: RTT::marsh::PropertyLoader::configure(std::string
> const&, RTT::TaskContext*, bool) const (PropertyLoader.cpp:163)
> ==16364==    by 0x437ADA2:
> OCL::DeploymentComponent::configureComponentsGroup(int)
> (DeploymentComponent.cpp:1187)
> ==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
> const&) (DeploymentComponent.cpp:495)
> ==16364==    by 0x805351F: main (deployer.cpp:150)
> ==16364==  Address 0xbe88c7d4 is just below the stack ptr.  To suppress,
> use: --workaround-gcc296-bugs=yes
> ==16364==
> ==16364==
> ==16364== Process terminating with default action of signal 11 (SIGSEGV)
> ==16364==  Bad permissions for mapped region at address 0x4221FF0
> ==16364==    at 0x4B396D5: std::string::assign(std::string const&) (in
> /usr/lib/libstdc++.so.6.0.13)
> ==16364==    by 0x43944F6:
> RTT::internal::ReferenceDataSource<std::string>::set(std::string const&)
> (basic_string.h:506)
> ==16364==    by 0x4121D61:
> RTT::Property<std::string>::refresh(RTT::base::PropertyBase const*)
> (Property.hpp:364)
> ==16364==    by 0x4113184:
> RTT::updateOrRefreshProperty(RTT::base::PropertyBase*,
> RTT::base::PropertyBase*, bool) (PropertyBag.cpp:454)
> ==16364==    by 0x4113FBB: RTT::refreshProperties(RTT::PropertyBag const&,
> RTT::PropertyBag const&, bool) (PropertyBag.cpp:517)
> ==16364==    by 0x46364B0: RTT::marsh::PropertyLoader::configure(std::string
> const&, RTT::TaskContext*, bool) const (PropertyLoader.cpp:163)
> ==16364==    by 0x437ADA2:
> OCL::DeploymentComponent::configureComponentsGroup(int)
> (DeploymentComponent.cpp:1187)
> ==16364==    by 0x438015E: OCL::DeploymentComponent::kickStart(std::string
> const&) (DeploymentComponent.cpp:495)
> ==16364==    by 0x805351F: main (deployer.cpp:150)
> ==16364== Thread 7:
> ==16364== Invalid free() / delete / delete[] / realloc()
> ==16364==    at 0x402705E: free (vg_replace_malloc.c:427)
> ==16364==    by 0x4CF9653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16364==    by 0x4CF9119: __libc_freeres (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16364==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
> ==16364==    by 0x45B0341: pthread_cond_timedwait@@GLIBC_2.3.2 (in
> /lib/tls/i686/cmov/libpthread-2.11.1.so)
> ==16364==    by 0x20EE540F: ???
> ==16364==  Address 0x4b96ce0 is not stack'd, malloc'd or (recently) free'd
> ==16364==
> ==16364==
> ==16364== HEAP SUMMARY:
> ==16364==     in use at exit: 542,954 bytes in 8,483 blocks
> ==16364==   total heap usage: 221,821 allocs, 213,339 frees, 11,141,609
> bytes allocated
> ==16364==
> ==16364== LEAK SUMMARY:
> ==16364==    definitely lost: 1,076 bytes in 25 blocks
> ==16364==    indirectly lost: 35,221 bytes in 1,119 blocks
> ==16364==      possibly lost: 178,890 bytes in 1,550 blocks
> ==16364==    still reachable: 327,767 bytes in 5,789 blocks
> ==16364==         suppressed: 0 bytes in 0 blocks
> ==16364== Rerun with --leak-check=full to see details of leaked memory
> ==16364==
> ==16364== For counts of detected and suppressed errors, rerun with: -v
> ==16364== Use --track-origins=yes to see where uninitialised values come
> from
> ==16364== ERROR SUMMARY: 145 errors from 24 contexts (suppressed: 772 from
> 76)
> Killed
>
> 

>
> Also, when i take the property loading of the faulty component, I get
> segfault when quiting the deployer:
>
>
> ==16339== Invalid free() / delete / delete[] / realloc()
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x41ADC57: RTT::types::TypeBuilder::~TypeBuilder()
> (TypeBuilder.cpp:47)
> ==16339==    by 0x41B52CD: RTT::types::TypeInfo::~TypeInfo()
> (TypeInfo.cpp:76)
> ==16339==    by 0x41AE175:
> RTT::types::TypeInfoRepository::~TypeInfoRepository()
> (TypeInfoRepository.cpp:94)
> ==16339==    by 0x41B0F98:
> boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
> (checked_delete.hpp:34)
> ==16339==    by 0x4115C8F:
> boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
> (sp_counted_base_gcc_x86.hpp:145)
> ==16339==    by 0x4C0B587: __cxa_finalize (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x410D233: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x41CD20F: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
> ==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==  Address 0x7e398d8 is 0 bytes inside a block of size 4 free'd
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x5BB8184: RTT::types::SequenceBuilder<std::vector<double,
> std::allocator<double> > >::~SequenceBuilder() (SequenceConstructor.hpp:61)
> ==16339==    by 0x41B544D: RTT::types::TypeInfo::~TypeInfo()
> (TypeInfo.cpp:76)
> ==16339==    by 0x95D984B: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~TemplateTypeInfo()
> (TemplateTypeInfo.hpp:143)
> ==16339==    by 0x95D9890: RTT::types::SequenceTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~SequenceTypeInfo()
> (SequenceTypeInfo.hpp:126)
> ==16339==    by 0x41AEFCC:
> RTT::types::TypeInfoRepository::aliasType(std::string const&,
> RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
> ==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::installTypeInfoObject()
> (TemplateTypeInfo.hpp:156)
> ==16339==    by 0x41AF52B:
> RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
> (TypeInfoRepository.cpp:114)
> ==16339==    by 0xF727A63:
> orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
> (Plugin.cpp:44)
> ==16339==    by 0x41B231B:
> RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
> (TypekitRepository.cpp:66)
> ==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
> ==16339==    by 0x41BC49C:
> RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
> std::string, bool) (PluginLoader.cpp:671)
> ==16339==
> ==16339== Invalid read of size 4
> ==16339==    at 0x41B52D1: RTT::types::TypeInfo::~TypeInfo()
> (TypeInfo.cpp:75)
> ==16339==    by 0x41AE175:
> RTT::types::TypeInfoRepository::~TypeInfoRepository()
> (TypeInfoRepository.cpp:94)
> ==16339==    by 0x41B0F98:
> boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
> (checked_delete.hpp:34)
> ==16339==    by 0x4115C8F:
> boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
> (sp_counted_base_gcc_x86.hpp:145)
> ==16339==    by 0x4C0B587: __cxa_finalize (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x410D233: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x41CD20F: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
> ==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4BF2BDD: (below main) (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==  Address 0x7e39890 is 8 bytes inside a block of size 32 free'd
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x95D9898: RTT::types::SequenceTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~SequenceTypeInfo()
> (SequenceTypeInfo.hpp:126)
> ==16339==    by 0x41AEFCC:
> RTT::types::TypeInfoRepository::aliasType(std::string const&,
> RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
> ==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::installTypeInfoObject()
> (TemplateTypeInfo.hpp:156)
> ==16339==    by 0x41AF52B:
> RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
> (TypeInfoRepository.cpp:114)
> ==16339==    by 0xF727A63:
> orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
> (Plugin.cpp:44)
> ==16339==    by 0x41B231B:
> RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
> (TypekitRepository.cpp:66)
> ==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
> ==16339==    by 0x41BC49C:
> RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
> std::string, bool) (PluginLoader.cpp:671)
> ==16339==    by 0x41BFDC4:
> RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
> std::string const&, std::string const&) (PluginLoader.cpp:400)
> ==16339==    by 0x41C1953:
> RTT::plugin::PluginLoader::loadTypekits(std::string const&)
> (PluginLoader.cpp:294)
> ==16339==    by 0x4410541: OCL::ComponentLoader::import(std::string const&)
> (ComponentLoader.cpp:180)
> ==16339==
> ==16339== Invalid read of size 4
> ==16339==    at 0x41B52D6: RTT::types::TypeInfo::~TypeInfo()
> (stl_vector.h:132)
> ==16339==    by 0x41AE175:
> RTT::types::TypeInfoRepository::~TypeInfoRepository()
> (TypeInfoRepository.cpp:94)
> ==16339==    by 0x41B0F98:
> boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
> (checked_delete.hpp:34)
> ==16339==    by 0x4115C8F:
> boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
> (sp_counted_base_gcc_x86.hpp:145)
> ==16339==    by 0x4C0B587: __cxa_finalize (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x410D233: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x41CD20F: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
> ==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4BF2BDD: (below main) (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==  Address 0x7e39898 is 16 bytes inside a block of size 32 free'd
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x95D9898: RTT::types::SequenceTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~SequenceTypeInfo()
> (SequenceTypeInfo.hpp:126)
> ==16339==    by 0x41AEFCC:
> RTT::types::TypeInfoRepository::aliasType(std::string const&,
> RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
> ==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::installTypeInfoObject()
> (TemplateTypeInfo.hpp:156)
> ==16339==    by 0x41AF52B:
> RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
> (TypeInfoRepository.cpp:114)
> ==16339==    by 0xF727A63:
> orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
> (Plugin.cpp:44)
> ==16339==    by 0x41B231B:
> RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
> (TypekitRepository.cpp:66)
> ==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
> ==16339==    by 0x41BC49C:
> RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
> std::string, bool) (PluginLoader.cpp:671)
> ==16339==    by 0x41BFDC4:
> RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
> std::string const&, std::string const&) (PluginLoader.cpp:400)
> ==16339==    by 0x41C1953:
> RTT::plugin::PluginLoader::loadTypekits(std::string const&)
> (PluginLoader.cpp:294)
> ==16339==    by 0x4410541: OCL::ComponentLoader::import(std::string const&)
> (ComponentLoader.cpp:180)
> ==16339==
> ==16339== Invalid free() / delete / delete[] / realloc()
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x41B52E4: RTT::types::TypeInfo::~TypeInfo()
> (new_allocator.h:95)
> ==16339==    by 0x41AE175:
> RTT::types::TypeInfoRepository::~TypeInfoRepository()
> (TypeInfoRepository.cpp:94)
> ==16339==    by 0x41B0F98:
> boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
> (checked_delete.hpp:34)
> ==16339==    by 0x4115C8F:
> boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
> (sp_counted_base_gcc_x86.hpp:145)
> ==16339==    by 0x4C0B587: __cxa_finalize (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x410D233: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x41CD20F: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
> ==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4BF2BDD: (below main) (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==  Address 0x7e3a1d8 is 0 bytes inside a block of size 12 free'd
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x41B5464: RTT::types::TypeInfo::~TypeInfo()
> (new_allocator.h:95)
> ==16339==    by 0x95D984B: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~TemplateTypeInfo()
> (TemplateTypeInfo.hpp:143)
> ==16339==    by 0x95D9890: RTT::types::SequenceTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~SequenceTypeInfo()
> (SequenceTypeInfo.hpp:126)
> ==16339==    by 0x41AEFCC:
> RTT::types::TypeInfoRepository::aliasType(std::string const&,
> RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
> ==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::installTypeInfoObject()
> (TemplateTypeInfo.hpp:156)
> ==16339==    by 0x41AF52B:
> RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
> (TypeInfoRepository.cpp:114)
> ==16339==    by 0xF727A63:
> orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
> (Plugin.cpp:44)
> ==16339==    by 0x41B231B:
> RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
> (TypekitRepository.cpp:66)
> ==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
> ==16339==    by 0x41BC49C:
> RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
> std::string, bool) (PluginLoader.cpp:671)
> ==16339==    by 0x41BFDC4:
> RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
> std::string const&, std::string const&) (PluginLoader.cpp:400)
> ==16339==
> ==16339== Invalid read of size 4
> ==16339==    at 0x41B52E5: RTT::types::TypeInfo::~TypeInfo()
> (stl_vector.h:132)
> ==16339==    by 0x41AE175:
> RTT::types::TypeInfoRepository::~TypeInfoRepository()
> (TypeInfoRepository.cpp:94)
> ==16339==    by 0x41B0F98:
> boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
> (checked_delete.hpp:34)
> ==16339==    by 0x4115C8F:
> boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
> (sp_counted_base_gcc_x86.hpp:145)
> ==16339==    by 0x4C0B587: __cxa_finalize (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x410D233: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x41CD20F: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
> ==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4BF2BDD: (below main) (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==  Address 0x7e3988c is 4 bytes inside a block of size 32 free'd
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x95D9898: RTT::types::SequenceTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~SequenceTypeInfo()
> (SequenceTypeInfo.hpp:126)
> ==16339==    by 0x41AEFCC:
> RTT::types::TypeInfoRepository::aliasType(std::string const&,
> RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
> ==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::installTypeInfoObject()
> (TemplateTypeInfo.hpp:156)
> ==16339==    by 0x41AF52B:
> RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
> (TypeInfoRepository.cpp:114)
> ==16339==    by 0xF727A63:
> orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
> (Plugin.cpp:44)
> ==16339==    by 0x41B231B:
> RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
> (TypekitRepository.cpp:66)
> ==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
> ==16339==    by 0x41BC49C:
> RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
> std::string, bool) (PluginLoader.cpp:671)
> ==16339==    by 0x41BFDC4:
> RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
> std::string const&, std::string const&) (PluginLoader.cpp:400)
> ==16339==    by 0x41C1953:
> RTT::plugin::PluginLoader::loadTypekits(std::string const&)
> (PluginLoader.cpp:294)
> ==16339==    by 0x4410541: OCL::ComponentLoader::import(std::string const&)
> (ComponentLoader.cpp:180)
> ==16339==
> ==16339== Invalid free() / delete / delete[] / realloc()
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x41B52F3: RTT::types::TypeInfo::~TypeInfo()
> (new_allocator.h:95)
> ==16339==    by 0x41AE175:
> RTT::types::TypeInfoRepository::~TypeInfoRepository()
> (TypeInfoRepository.cpp:94)
> ==16339==    by 0x41B0F98:
> boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
> (checked_delete.hpp:34)
> ==16339==    by 0x4115C8F:
> boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
> (sp_counted_base_gcc_x86.hpp:145)
> ==16339==    by 0x4C0B587: __cxa_finalize (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x410D233: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x41CD20F: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
> ==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4BF2BDD: (below main) (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==  Address 0x7e39b10 is 0 bytes inside a block of size 16 free'd
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x41B5473: RTT::types::TypeInfo::~TypeInfo()
> (new_allocator.h:95)
> ==16339==    by 0x95D984B: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~TemplateTypeInfo()
> (TemplateTypeInfo.hpp:143)
> ==16339==    by 0x95D9890: RTT::types::SequenceTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~SequenceTypeInfo()
> (SequenceTypeInfo.hpp:126)
> ==16339==    by 0x41AEFCC:
> RTT::types::TypeInfoRepository::aliasType(std::string const&,
> RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
> ==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::installTypeInfoObject()
> (TemplateTypeInfo.hpp:156)
> ==16339==    by 0x41AF52B:
> RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
> (TypeInfoRepository.cpp:114)
> ==16339==    by 0xF727A63:
> orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
> (Plugin.cpp:44)
> ==16339==    by 0x41B231B:
> RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
> (TypekitRepository.cpp:66)
> ==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
> ==16339==    by 0x41BC49C:
> RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
> std::string, bool) (PluginLoader.cpp:671)
> ==16339==    by 0x41BFDC4:
> RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
> std::string const&, std::string const&) (PluginLoader.cpp:400)
> ==16339==
> ==16339== Invalid free() / delete / delete[] / realloc()
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x41B52FB: RTT::types::TypeInfo::~TypeInfo()
> (TypeInfo.cpp:77)
> ==16339==    by 0x41AE175:
> RTT::types::TypeInfoRepository::~TypeInfoRepository()
> (TypeInfoRepository.cpp:94)
> ==16339==    by 0x41B0F98:
> boost::detail::sp_counted_impl_p<RTT::types::TypeInfoRepository>::dispose()
> (checked_delete.hpp:34)
> ==16339==    by 0x4115C8F:
> boost::shared_ptr<RTT::types::TypeInfoRepository>::~shared_ptr()
> (sp_counted_base_gcc_x86.hpp:145)
> ==16339==    by 0x4C0B587: __cxa_finalize (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x410D233: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x41CD20F: ??? (in
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/lib/liborocos-rtt-gnulinux.so.2.4.0)
> ==16339==    by 0x400E215: ??? (in /lib/ld-2.11.1.so)
> ==16339==    by 0x4C0B1BE: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4BF2BDD: (below main) (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==  Address 0x7e39888 is 0 bytes inside a block of size 32 free'd
> ==16339==    at 0x4026D75: operator delete(void*) (vg_replace_malloc.c:457)
> ==16339==    by 0x95D9898: RTT::types::SequenceTypeInfo<std::vector<double,
> std::allocator<double> >, false>::~SequenceTypeInfo()
> (SequenceTypeInfo.hpp:126)
> ==16339==    by 0x41AEFCC:
> RTT::types::TypeInfoRepository::aliasType(std::string const&,
> RTT::types::TypeInfo*) (TypeInfoRepository.cpp:133)
> ==16339==    by 0x95D947E: RTT::types::TemplateTypeInfo<std::vector<double,
> std::allocator<double> >, false>::installTypeInfoObject()
> (TemplateTypeInfo.hpp:156)
> ==16339==    by 0x41AF52B:
> RTT::types::TypeInfoRepository::addType(RTT::types::TypeInfo*)
> (TypeInfoRepository.cpp:114)
> ==16339==    by 0xF727A63:
> orogen_typekits::PowerCube_CAN_EtherCat_serverTypekitPlugin::loadTypes()
> (Plugin.cpp:44)
> ==16339==    by 0x41B231B:
> RTT::types::TypekitRepository::Import(RTT::types::TypekitPlugin*)
> (TypekitRepository.cpp:66)
> ==16339==    by 0xF7279BD: loadRTTPlugin (Plugin.cpp:58)
> ==16339==    by 0x41BC49C:
> RTT::plugin::PluginLoader::loadInProcess(std::string, std::string,
> std::string, bool) (PluginLoader.cpp:671)
> ==16339==    by 0x41BFDC4:
> RTT::plugin::PluginLoader::loadPluginsInternal(std::string const&,
> std::string const&, std::string const&) (PluginLoader.cpp:400)
> ==16339==    by 0x41C1953:
> RTT::plugin::PluginLoader::loadTypekits(std::string const&)
> (PluginLoader.cpp:294)
> ==16339==    by 0x4410541: OCL::ComponentLoader::import(std::string const&)
> (ComponentLoader.cpp:180)
> ==16339==
> ==16339== Invalid free() / delete / delete[] / realloc()
> ==16339==    at 0x402705E: free (vg_replace_malloc.c:427)
> ==16339==    by 0x4CF9653: ??? (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4CF9119: __libc_freeres (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x40214F3: _vgnU_freeres (vg_preloaded.c:61)
> ==16339==    by 0x4C74033: _Exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4C0B22E: exit (in /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==    by 0x4BF2BDD: (below main) (in
> /lib/tls/i686/cmov/libc-2.11.1.so)
> ==16339==  Address 0x4b96ce0 is not stack'd, malloc'd or (recently) free'd
> ==16339==
> ==16339==
> ==16339== HEAP SUMMARY:
> ==16339==     in use at exit: 167,799 bytes in 1,303 blocks
> ==16339==   total heap usage: 259,616 allocs, 258,320 frees, 11,456,773
> bytes allocated
> ==16339==
> ==16339== LEAK SUMMARY:
> ==16339==    definitely lost: 2,158 bytes in 12 blocks
> ==16339==    indirectly lost: 17,762 bytes in 566 blocks
> ==16339==      possibly lost: 577 bytes in 17 blocks
> ==16339==    still reachable: 147,302 bytes in 708 blocks
> ==16339==         suppressed: 0 bytes in 0 blocks
> ==16339== Rerun with --leak-check=full to see details of leaked memory
> ==16339==
> ==16339== For counts of detected and suppressed errors, rerun with: -v
> ==16339== Use --track-origins=yes to see where uninitialised values come
> from
> ==16339== ERROR SUMMARY: 434 errors from 97 contexts (suppressed: 653 from
> 77)
> 

>
>
> Anyway I'll check later again with ros-electric by deleting the libraries
> you say to see if that eliminates the first segfault error.
>
> Thanks again.
>
> Regards,
>
>
> --
> Ing. Santiago Focke

Multiple segmentation fault errors

On 02/21/2012 03:33 PM, Peter Soetens wrote:
> Ok. I think we found the error. The most likely reason for this case
> not working is that the 'typegen' generated typekits don't handle well
> different OROCOS_TARGET targets in the same source tree.
What's wrong / would need to be fixed ?

There has been no notification of any sort (that I can remember !) on
that front on the ML. typegen generates typekits following the
<project_name>-typekit-<target> pattern. I thought that was enough.

Grepping in the typegen-generated code shows that OROCOS_TARGET is only
being used to name the shared libraries, and nothing else ...

Multiple segmentation fault errors

On Tue, Feb 21, 2012 at 4:01 PM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
> On 02/21/2012 03:33 PM, Peter Soetens wrote:
>>
>> Ok. I think we found the error. The most likely reason for this case
>> not working is that the 'typegen' generated typekits don't handle well
>> different OROCOS_TARGET targets in the same source tree.
>
> What's wrong / would need to be fixed ?
>
> There has been no notification of any sort (that I can remember !) on that
> front on the ML. typegen generates typekits following the
> <project_name>-typekit-<target> pattern. I thought that was enough.
>
> Grepping in the typegen-generated code shows that OROCOS_TARGET is only
> being used to name the shared libraries, and nothing else ...

When we tested the OROCOS_TARGET env variable switching, we didn't test typegen.

The problem is that cmake caches found includes or libraries and that
typegen typekits end up linking with the wrong target, once compiled
with a previous target setting. The solution is to use cached
variables that contain in their name _${OROCOS_TARGET} such that cmake
re-finds all libraries and include directories again if the
OROCOS_TARGET variable changes.

We introduced this workflow, so it was our job to test typegen. The
changes should be quite minimal though in the template cmake code...

Peter

Multiple segmentation fault errors

On 02/21/2012 04:14 PM, Peter Soetens wrote:
> The problem is that cmake caches found includes or libraries and that
> typegen typekits end up linking with the wrong target, once compiled
> with a previous target setting. The solution is to use cached
> variables that contain in their name _${OROCOS_TARGET} such that cmake
> re-finds all libraries and include directories again if the
> OROCOS_TARGET variable changes.
That I don't understand. Why not require to have two different build
directories (one per target) ? It would make more sense in the end, as
you would not have to recompile a complete package each time you switch
targets (and fit the general cmake workflow better)

Multiple segmentation fault errors

On Wed, Feb 22, 2012 at 2:17 PM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
> On 02/21/2012 04:14 PM, Peter Soetens wrote:
>>
>> The problem is that cmake caches found includes or libraries and that
>> typegen typekits end up linking with the wrong target, once compiled
>> with a previous target setting. The solution is to use cached
>> variables that contain in their name _${OROCOS_TARGET} such that cmake
>> re-finds all libraries and include directories again if the
>> OROCOS_TARGET variable changes.
>
> That I don't understand. Why not require to have two different build
> directories (one per target) ? It would make more sense in the end, as you
> would not have to recompile a complete package each time you switch targets
> (and fit the general cmake workflow better)

Since we include the OROCOS_TARGET name in the cmake target name, the
.o files are kept in a separate directory and not overwritten.

Peter

Multiple segmentation fault errors

On 02/22/2012 03:43 PM, Peter Soetens wrote:
> On Wed, Feb 22, 2012 at 2:17 PM, Sylvain Joyeux<sylvain [dot] joyeux [..] ...> wrote:
>> On 02/21/2012 04:14 PM, Peter Soetens wrote:
>>>
>>> The problem is that cmake caches found includes or libraries and that
>>> typegen typekits end up linking with the wrong target, once compiled
>>> with a previous target setting. The solution is to use cached
>>> variables that contain in their name _${OROCOS_TARGET} such that cmake
>>> re-finds all libraries and include directories again if the
>>> OROCOS_TARGET variable changes.
>>
>> That I don't understand. Why not require to have two different build
>> directories (one per target) ? It would make more sense in the end, as you
>> would not have to recompile a complete package each time you switch targets
>> (and fit the general cmake workflow better)
>
> Since we include the OROCOS_TARGET name in the cmake target name, the
> .o files are kept in a separate directory and not overwritten.
Ahh ... Right.

However, that's not really explaining why you don't use separate build
directories ... It is still the "general" workflow (cmake and autotools)
when you want builds with different configurations.

Sylvain

Multiple segmentation fault errors

On Wed, Feb 22, 2012 at 3:46 PM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
> On 02/22/2012 03:43 PM, Peter Soetens wrote:
>>
>> On Wed, Feb 22, 2012 at 2:17 PM, Sylvain Joyeux<sylvain [dot] joyeux [..] ...>
>>  wrote:
>>>
>>> On 02/21/2012 04:14 PM, Peter Soetens wrote:
>>>>
>>>>
>>>> The problem is that cmake caches found includes or libraries and that
>>>> typegen typekits end up linking with the wrong target, once compiled
>>>> with a previous target setting. The solution is to use cached
>>>> variables that contain in their name _${OROCOS_TARGET} such that cmake
>>>> re-finds all libraries and include directories again if the
>>>> OROCOS_TARGET variable changes.
>>>
>>>
>>> That I don't understand. Why not require to have two different build
>>> directories (one per target) ? It would make more sense in the end, as
>>> you
>>> would not have to recompile a complete package each time you switch
>>> targets
>>> (and fit the general cmake workflow better)
>>
>>
>> Since we include the OROCOS_TARGET name in the cmake target name, the
>> .o files are kept in a separate directory and not overwritten.
>
> Ahh ... Right.
>
> However, that's not really explaining why you don't use separate build
> directories ... It is still the "general" workflow (cmake and autotools)
> when you want builds with different configurations.

Because OROCOS_TARGET is read by the cmake files, and not by any other
file or tool. So you need to get into a build directory first before
you know which target the user wants to build for. This is for builds
without autoproj.

Peter

Multiple segmentation fault errors

On 02/22/2012 03:51 PM, Peter Soetens wrote:
>> Ahh ... Right.
>>
>> However, that's not really explaining why you don't use separate build
>> directories ... It is still the "general" workflow (cmake and autotools)
>> when you want builds with different configurations.
>
> Because OROCOS_TARGET is read by the cmake files, and not by any other
> file or tool. So you need to get into a build directory first before
> you know which target the user wants to build for. This is for builds
> without autoproj.

I still don't understand.

To change OROCOS_TARGET, you have to re-run cmake anyways. Your
workflow, as far as I understand it, is:

cd build
cmake -DOROCOS_TARGET=xenomai ..
make install
<do stuff>
cd build
cmake -DOROCOS_TARGET=gnulinux ..
make install

(or set OROCOS_TARGET in the shell and re-run cmake without any options
... That's were you diverging from the "standard" build system workflow)

The standard workflow (at least for the "different configuration case",
I don't really know for the "multiple targets" case) is:

cd build-xenomai
cmake -DOROCOS_TARGET=xenomai ..
make install
<do stuff>
cd build-gnulinux
cmake -DOROCOS_TARGET=gnulinux ..
make install

The advantage of this workflow is that it does not require any magic
from within the CMake or autotools code.

I'm just trying to understand the general logic (and the current
multi-target workflow)

Multiple segmentation fault errors

On Wed, Feb 22, 2012 at 3:58 PM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
> On 02/22/2012 03:51 PM, Peter Soetens wrote:
>>>
>>> Ahh ... Right.
>>>
>>> However, that's not really explaining why you don't use separate build
>>> directories ... It is still the "general" workflow (cmake and autotools)
>>> when you want builds with different configurations.
>>
>>
>> Because OROCOS_TARGET is read by the cmake files, and not by any other
>> file or tool. So you need to get into a build directory first before
>> you know which target the user wants to build for. This is for builds
>> without autoproj.
>
>
> I still don't understand.
>
> To change OROCOS_TARGET, you have to re-run cmake anyways. Your workflow, as
> far as I understand it, is:
>
>  cd build
>  cmake -DOROCOS_TARGET=xenomai ..
>  make install
>  <do stuff>
>  cd build
>  cmake -DOROCOS_TARGET=gnulinux ..
>  make install

We never use this. It's cumbersome.

>
> (or set OROCOS_TARGET in the shell and re-run cmake without any options ...
> That's were you diverging from the "standard" build system workflow)

Yep, we export OROCOS_TARGET=footarget in our .bashrc file, depending
on the system we're working on. For debugging we can then temporarily
change it and just rerun with rosmake, which builds all dependencies.

>
> The standard workflow (at least for the "different configuration case", I
> don't really know for the "multiple targets" case) is:
>
>  cd build-xenomai
>  cmake -DOROCOS_TARGET=xenomai ..
>  make install
>  <do stuff>
>  cd build-gnulinux
>  cmake -DOROCOS_TARGET=gnulinux ..
>  make install
>
> The advantage of this workflow is that it does not require any magic from
> within the CMake or autotools code.

But we'd need to do that in every single package, which is not feasible.

>
> I'm just trying to understand the general logic (and the current
> multi-target workflow)

It's not an option for us to 'cd' into directories of dependencies. We
just run 'rosmake' in the top-project and then all dependencies
(re)build with the correct target setting.

Peter

Multiple segmentation fault errors

On 02/22/2012 04:36 PM, Peter Soetens wrote:
>> The advantage of this workflow is that it does not require any magic from
>> within the CMake or autotools code.
>
> But we'd need to do that in every single package, which is not feasible.
Agreed. When you said "not in autoproj", I did not understood that it
implied "using rosmake"

So, as far as I understand it now, this mechanism is meant to be used
with rosmake, which cannot create multiple build directories. Since
rosmake basically re-runs cmake when you change OROCOS_TARGET (how does
it detect that, by the way ? Does it forward the environment variable to
the cmake command line or is it some other magic ?)

Multiple segmentation fault errors

On Wed, Feb 22, 2012 at 6:14 PM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...> wrote:
> On 02/22/2012 04:36 PM, Peter Soetens wrote:
>>>
>>> The advantage of this workflow is that it does not require any magic from
>>> within the CMake or autotools code.
>>
>>
>> But we'd need to do that in every single package, which is not feasible.
>
> Agreed. When you said "not in autoproj", I did not understood that it
> implied "using rosmake"
>
> So, as far as I understand it now, this mechanism is meant to be used with
> rosmake, which cannot create multiple build directories.

Correct.

> Since rosmake
> basically re-runs cmake when you change OROCOS_TARGET (how does it detect
> that, by the way ? Does it forward the environment variable to the cmake
> command line or is it some other magic ?)

rosmake re-runs cmake every time. Dependencies that don't need to be
built can get a ROS_NOBUILD touch file to speed up that process. Most
of the time, we only run 'make' in the package we are coding in.

That's actually the main reason why catkin (aka rosbuild 2) has been
made: http://people.willowgarage.com/straszheim/catkin-dev/catkin/index.html
See also http://www.ros.org/reps/rep-0122.html for the intended
directory structure

Peter

Multiple segmentation fault errors

On 02/22/2012 09:47 PM, Peter Soetens wrote:
>> Since rosmake
>> basically re-runs cmake when you change OROCOS_TARGET (how does it detect
>> that, by the way ? Does it forward the environment variable to the cmake
>> command line or is it some other magic ?)
>
> rosmake re-runs cmake every time. Dependencies that don't need to be
> built can get a ROS_NOBUILD touch file to speed up that process. Most
> of the time, we only run 'make' in the package we are coding in.
>
> That's actually the main reason why catkin (aka rosbuild 2) has been
> made: http://people.willowgarage.com/straszheim/catkin-dev/catkin/index.html
> See also http://www.ros.org/reps/rep-0122.html for the intended
> directory structure
Oh. But that actually looks like a decent build system that could be
interfaced easily by others (e.g. autoproj). Do you know of the timeplan
on its deployment ?

Sylvain

Multiple segmentation fault errors

On Thu, Feb 23, 2012 at 10:06 AM, Sylvain Joyeux <sylvain [dot] joyeux [..] ...>wrote:

> On 02/22/2012 09:47 PM, Peter Soetens wrote:
>
>> Since rosmake
>>> basically re-runs cmake when you change OROCOS_TARGET (how does it detect
>>> that, by the way ? Does it forward the environment variable to the cmake
>>> command line or is it some other magic ?)
>>>
>>
>> rosmake re-runs cmake every time. Dependencies that don't need to be
>> built can get a ROS_NOBUILD touch file to speed up that process. Most
>> of the time, we only run 'make' in the package we are coding in.
>>
>> That's actually the main reason why catkin (aka rosbuild 2) has been
>> made: http://people.willowgarage.**com/straszheim/catkin-dev/**
>> catkin/index.html<http://people.willowgarage.com/straszheim/catkin-dev/catkin/index.html>
>> See also http://www.ros.org/reps/rep-**0122.html<http://www.ros.org/reps/rep-0122... the intended
>> directory structure
>>
> Oh. But that actually looks like a decent build system that could be
> interfaced easily by others (e.g. autoproj). Do you know of the timeplan on
> its deployment ?
>
>
It is being used in Fuerte for testing on a set of selected packages, but
the API is said to be still unstable. Migration to catkin will only happen
after Fuerte. I think they want to release it as an independent tool as
well (debian package or similar).

Peter