Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twist_mux dies on ARM board when compiler optimisation enabled #13

Open
Timple opened this issue May 29, 2018 · 1 comment
Open

twist_mux dies on ARM board when compiler optimisation enabled #13

Timple opened this issue May 29, 2018 · 1 comment

Comments

@Timple
Copy link

Timple commented May 29, 2018

We use twist_mux on the lime2 ARM boards. The ROS provided binaries ros-kinetic-twist-mux do not work. Therefor we manually compile twist_mux from source.

Today I discoved that when I enabled RelWithDebInfo optimisation the node segfaults as well.

Working:
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-O3

Not working:
-DCMAKE_BUILD_TYPE=RelWithDebInfo

Full output of test:

$ catkin config --cmake-args -DCMAKE_BUILD_TYPE=Debug

$ catkin build --this
---------------------------------------------------------------------
Profile:                     performance
Extending:          [cached] /opt/ros/kinetic
Workspace:                   /home/noblean/ros/kinetic/system
---------------------------------------------------------------------
Source Space:       [exists] /home/noblean/ros/kinetic/system/src
Log Space:          [exists] /home/noblean/ros/kinetic/system/logs
Build Space:        [exists] /home/noblean/ros/kinetic/system/build
Devel Space:        [exists] /home/noblean/ros/kinetic/system/devel
Install Space:      [unused] /home/noblean/ros/kinetic/system/install
DESTDIR:            [unused] None
---------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
---------------------------------------------------------------------
Additional CMake Args:       -DCMAKE_BUILD_TYPE=Debug
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
---------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
---------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
---------------------------------------------------------------------
[build] Found '17' packages in 0.0 seconds.                                                                                                                                 
[build] Package table is up to date.                                                                                                                                        
Starting  >>> twist_mux                                                                                                                                                     
Finished  <<< twist_mux                [ 2 minutes and 22.9 seconds ]                                                                                                       
[build] Summary: All 1 packages succeeded!                                                                                                                                  
[build]   Ignored:   16 packages were skipped or are blacklisted.                                                                                                           
[build]   Warnings:  None.                                                                                                                                                  
[build]   Abandoned: None.                                                                                                                                                  
[build]   Failed:    None.                                                                                                                                                  
[build] Runtime: 2 minutes and 23.9 seconds total.                                                                                                                          


$ rosrun twist_mux twist_mux
[FATAL] [1527595846.514193176]: Error parsing params: could not load parameter 'topics'. (namespace: /twist_mux)
[FATAL] [1527595846.527107760]: Error parsing params: could not load parameter 'locks'. (namespace: /twist_mux)
^C

$ catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release

$ catkin build --this
---------------------------------------------------------------------
Profile:                     performance
Extending:          [cached] /opt/ros/kinetic
Workspace:                   /home/noblean/ros/kinetic/system
---------------------------------------------------------------------
Source Space:       [exists] /home/noblean/ros/kinetic/system/src
Log Space:          [exists] /home/noblean/ros/kinetic/system/logs
Build Space:        [exists] /home/noblean/ros/kinetic/system/build
Devel Space:        [exists] /home/noblean/ros/kinetic/system/devel
Install Space:      [unused] /home/noblean/ros/kinetic/system/install
DESTDIR:            [unused] None
---------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
---------------------------------------------------------------------
Additional CMake Args:       -DCMAKE_BUILD_TYPE=Release
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
---------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
---------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
---------------------------------------------------------------------
[build] Found '17' packages in 0.0 seconds.                                                                                                                                 
[build] Package table is up to date.                                                                                                                                        
Starting  >>> twist_mux                                                                                                                                                     
Finished  <<< twist_mux                [ 2 minutes and 11.5 seconds ]                                                                                                       
[build] Summary: All 1 packages succeeded!                                                                                                                                  
[build]   Ignored:   16 packages were skipped or are blacklisted.                                                                                                           
[build]   Warnings:  None.                                                                                                                                                  
[build]   Abandoned: None.                                                                                                                                                  
[build]   Failed:    None.                                                                                                                                                  
[build] Runtime: 2 minutes and 12.4 seconds total.                                                                                                                          


$ rosrun twist_mux twist_mux
[FATAL] [1527596036.439305912]: Error parsing params: could not load parameter 'topics'. (namespace: /twist_mux)
[FATAL] [1527596036.453513454]: Error parsing params: could not load parameter 'locks'. (namespace: /twist_mux)
^C


$ catkin config --cmake-args -DCMAKE_CXX_FLAGS=-O3

$ catkin build --this
---------------------------------------------------------------------
Profile:                     performance
Extending:          [cached] /opt/ros/kinetic
Workspace:                   /home/noblean/ros/kinetic/system
---------------------------------------------------------------------
Source Space:       [exists] /home/noblean/ros/kinetic/system/src
Log Space:          [exists] /home/noblean/ros/kinetic/system/logs
Build Space:        [exists] /home/noblean/ros/kinetic/system/build
Devel Space:        [exists] /home/noblean/ros/kinetic/system/devel
Install Space:      [unused] /home/noblean/ros/kinetic/system/install
DESTDIR:            [unused] None
---------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
---------------------------------------------------------------------
Additional CMake Args:       -DCMAKE_CXX_FLAGS=-O3
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
---------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
---------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
---------------------------------------------------------------------
[build] Found '17' packages in 0.0 seconds.                                                                                                                                 
[build] Package table is up to date.                                                                                                                                        
Starting  >>> twist_mux                                                                                                                                                     
Finished  <<< twist_mux                [ 2 minutes and 10.2 seconds ]                                                                                                       
[build] Summary: All 1 packages succeeded!                                                                                                                                  
[build]   Ignored:   16 packages were skipped or are blacklisted.                                                                                                           
[build]   Warnings:  None.                                                                                                                                                  
[build]   Abandoned: None.                                                                                                                                                  
[build]   Failed:    None.                                                                                                                                                  
[build] Runtime: 2 minutes and 11.1 seconds total.                                                                                                                          


$ rosrun twist_mux twist_mux
[FATAL] [1527596233.345567307]: Error parsing params: could not load parameter 'topics'. (namespace: /twist_mux)
[FATAL] [1527596233.361381641]: Error parsing params: could not load parameter 'locks'. (namespace: /twist_mux)
^C

$ catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo

$ catkin build --this
---------------------------------------------------------------------
Profile:                     performance
Extending:          [cached] /opt/ros/kinetic
Workspace:                   /home/noblean/ros/kinetic/system
---------------------------------------------------------------------
Source Space:       [exists] /home/noblean/ros/kinetic/system/src
Log Space:          [exists] /home/noblean/ros/kinetic/system/logs
Build Space:        [exists] /home/noblean/ros/kinetic/system/build
Devel Space:        [exists] /home/noblean/ros/kinetic/system/devel
Install Space:      [unused] /home/noblean/ros/kinetic/system/install
DESTDIR:            [unused] None
---------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
---------------------------------------------------------------------
Additional CMake Args:       -DCMAKE_BUILD_TYPE=RelWithDebInfo
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
---------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
---------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
---------------------------------------------------------------------
[build] Found '17' packages in 0.0 seconds.                                                                                                                                 
[build] Package table is up to date.                                                                                                                                        
Starting  >>> twist_mux                                                                                                                                                     
Finished  <<< twist_mux                [ 3 minutes and 6.5 seconds ]                                                                                                        
[build] Summary: All 1 packages succeeded!                                                                                                                                  
[build]   Ignored:   16 packages were skipped or are blacklisted.                                                                                                           
[build]   Warnings:  None.                                                                                                                                                  
[build]   Abandoned: None.                                                                                                                                                  
[build]   Failed:    None.                                                                                                                                                  
[build] Runtime: 3 minutes and 7.4 seconds total.                                                                                                                           


$ rosrun twist_mux twist_mux
Segmentation fault
@MCFurry
Copy link

MCFurry commented Sep 13, 2018

And since shortly compiling from source also results in segfaults with either compiler flags...

I just made a fresh armbian image for the lime2 board. The resulting binary for twist_mux segfaults.

Interestingly if I copy the physical binary from another board, it does run on my fresh image. Hence, it seems that compilation from source broke and it may be related to some linux updates? (Since the twist_mux source hasn't changed lately?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants