scanse / sweep-ros

Scanse Sweep ROS Driver and Node
MIT License
68 stars 62 forks source link

Buffer overflow on 16.04 #3

Closed mjedmonds closed 7 years ago

mjedmonds commented 7 years ago

Hi, my sweep sensor just arrived. The Sweep Visualizer works fine on 16.04, but the ROS node immediately crashes with the following error:

❯❯❯❯ roslaunch sweep_ros sweep.launch                               ~/catkin_ws
... logging to /home/mark/.ros/log/41645042-e266-11e6-82de-3417ebcb9b7f/roslaunch-mark-ubuntu-9434-32739.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
WARNING: disk usage in log directory [/home/mark/.ros/log] is over 1GB.
It's recommended that you use the 'rosclean' command.

started roslaunch server http://mark-ubuntu-9434:39790/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.6
 * /sweep_node/frame_id: laser_frame
 * /sweep_node/rotation_speed: 10
 * /sweep_node/serial_baudrate: 115200
 * /sweep_node/serial_port: /dev/ttyUSB0

NODES
  /
    sweep_node (sweep_ros/sweep_node)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[sweep_node-1]: started with pid [32757]
*** buffer overflow detected ***: /home/mark/catkin_ws/devel/lib/sweep_ros/sweep_node terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fd68755b7e5]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7fd6875fc56c]
/lib/x86_64-linux-gnu/libc.so.6(+0x116570)[0x7fd6875fa570]
/home/mark/catkin_ws/devel/lib/sweep_ros/sweep_node(_ZN11SweepDriver16changeMotorSpeedEh+0x237)[0x4144f7]
/home/mark/catkin_ws/devel/lib/sweep_ros/sweep_node(main+0x4e8)[0x409758]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fd687504830]
/home/mark/catkin_ws/devel/lib/sweep_ros/sweep_node(_start+0x29)[0x40a449]
======= Memory map: ========
00400000-0041c000 r-xp 00000000 08:04 107348361                          /home/mark/catkin_ws/devel/lib/sweep_ros/sweep_node
0061b000-0061c000 r--p 0001b000 08:04 107348361                          /home/mark/catkin_ws/devel/lib/sweep_ros/sweep_node
0061c000-0061d000 rw-p 0001c000 08:04 107348361                          /home/mark/catkin_ws/devel/lib/sweep_ros/sweep_node
022ab000-022dd000 rw-p 00000000 00:00 0                                  [heap]
7fd674000000-7fd674021000 rw-p 00000000 00:00 0 
7fd674021000-7fd678000000 ---p 00000000 00:00 0 
7fd67c000000-7fd67c021000 rw-p 00000000 00:00 0 
7fd67c021000-7fd680000000 ---p 00000000 00:00 0 
7fd680bf2000-7fd680bf3000 ---p 00000000 00:00 0 
7fd680bf3000-7fd6813f3000 rw-p 00000000 00:00 0 
7fd6813f3000-7fd6813f4000 ---p 00000000 00:00 0 
7fd6813f4000-7fd681bf4000 rw-p 00000000 00:00 0 
7fd681bf4000-7fd681bf5000 ---p 00000000 00:00 0 
7fd681bf5000-7fd6823f5000 rw-p 00000000 00:00 0 
7fd6823f5000-7fd6823f6000 ---p 00000000 00:00 0 
7fd6823f6000-7fd682bf6000 rw-p 00000000 00:00 0 
7fd682bf6000-7fd682c01000 r-xp 00000000 08:02 38670649                   /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fd682c01000-7fd682e00000 ---p 0000b000 08:02 38670649                   /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fd682e00000-7fd682e01000 r--p 0000a000 08:02 38670649                   /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fd682e01000-7fd682e02000 rw-p 0000b000 08:02 38670649                   /lib/x86_64-linux-gnu/libnss_files-2.23.so
7fd682e02000-7fd682e08000 rw-p 00000000 00:00 0 
7fd682e08000-7fd6846be000 r-xp 00000000 08:02 41689388                   /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7fd6846be000-7fd6848bd000 ---p 018b6000 08:02 41689388                   /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7fd6848bd000-7fd6848be000 r--p 018b5000 08:02 41689388                   /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7fd6848be000-7fd6848bf000 rw-p 018b6000 08:02 41689388                   /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
7fd6848bf000-7fd6848e5000 r-xp 00000000 08:02 38670662                   /lib/x86_64-linux-gnu/libexpat.so.1.6.0
7fd6848e5000-7fd684ae5000 ---p 00026000 08:02 38670662                   /lib/x86_64-linux-gnu/libexpat.so.1.6.0
7fd684ae5000-7fd684ae7000 r--p 00026000 08:02 38670662                   /lib/x86_64-linux-gnu/libexpat.so.1.6.0
7fd684ae7000-7fd684ae8000 rw-p 00028000 08:02 38670662                   /lib/x86_64-linux-gnu/libexpat.so.1.6.0
7fd684ae8000-7fd684af1000 r-xp 00000000 08:02 38666333                   /lib/x86_64-linux-gnu/libcrypt-2.23.so
7fd684af1000-7fd684cf0000 ---p 00009000 08:02 38666333                   /lib/x86_64-linux-gnu/libcrypt-2.23.so
7fd684cf0000-7fd684cf1000 r--p 00008000 08:02 38666333                   /lib/x86_64-linux-gnu/libcrypt-2.23.so
7fd684cf1000-7fd684cf2000 rw-p 00009000 08:02 38666333                   /lib/x86_64-linux-gnu/libcrypt-2.23.so
7fd684cf2000-7fd684d20000 rw-p 00000000 00:00 0 
7fd684d20000-7fd684d23000 r-xp 00000000 08:02 38666330                   /lib/x86_64-linux-gnu/libdl-2.23.so
7fd684d23000-7fd684f22000 ---p 00003000 08:02 38666330                   /lib/x86_64-linux-gnu/libdl-2.23.so
7fd684f22000-7fd684f23000 r--p 00002000 08:02 38666330                   /lib/x86_64-linux-gnu/libdl-2.23.so
7fd684f23000-7fd684f24000 rw-p 00003000 08:02 38666330                   /lib/x86_64-linux-gnu/libdl-2.23.so
7fd684f24000-7fd684f28000 r-xp 00000000 08:02 38666427                   /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7fd684f28000-7fd685127000 ---p 00004000 08:02 38666427                   /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7fd685127000-7fd685128000 r--p 00003000 08:02 38666427                   /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7fd685128000-7fd685129000 rw-p 00004000 08:02 38666427                   /lib/x86_64-linux-gnu/libuuid.so.1.3.0
7fd685129000-7fd6852a8000 r-xp 00000000 08:02 41689402                   /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7fd6852a8000-7fd6854a8000 ---p 0017f000 08:02 41689402                   /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7fd6854a8000-7fd6854b8000 r--p 0017f000 08:02 41689402                   /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7fd6854b8000-7fd6854b9000 rw-p 0018f000 08:02 41689402                   /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
7fd6854b9000-7fd6854bd000 rw-p 00000000 00:00 0 
7fd6854bd000-7fd68570f000 r-xp 00000000 08:02 41689390                   /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
7fd68570f000-7fd68590f000 ---p 00252000 08:02 41689390                   /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
7fd68590f000-7fd68591e000 r--p 00252000 08:02 41689390                   /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
7fd68591e000-7fd68591f000 rw-p 00261000 08:02 41689390                   /usr/lib/x86_64-linux-gnu/libicui18n.so.55.1
7fd68591f000-7fd685945000 r-xp 00000000 08:02 41691892                   /usr/lib/x86_64-linux-gnu/libaprutil-1.so.0.5.4
7fd685945000-7fd685b44000 ---p 00026000 08:02 41691892                   /usr/lib/x86_64-linux-gnu/libaprutil-1.so.0.5.4
7fd685b44000-7fd685b45000 r--p 00025000 08:02 41691892                   /usr/lib/x86_64-linux-gnu/libaprutil-1.so.0.5.4
7fd685b45000-7fd685b46000 rw-p 00026000 08:02 41691892                   /usr/lib/x86_64-linux-gnu/libaprutil-1.so.0.5.4
7fd685b46000-7fd685b77000 r-xp 00000000 08:02 41691878                   /usr/lib/x86_64-linux-gnu/libapr-1.so.0.5.2
7fd685b77000-7fd685d76000 ---p 00031000 08:02 41691878                   /usr/lib/x86_64-linux-gnu/libapr-1.so.0.5.2
7fd685d76000-7fd685d77000 r--p 00030000 08:02 41691878                   /usr/lib/x86_64-linux-gnu/libapr-1.so.0.5.2
7fd685d77000-7fd685d78000 rw-p 00031000 08:02 41691878                   /usr/lib/x86_64-linux-gnu/libapr-1.so.0.5.2
7fd685d78000-7fd685d7c000 r-xp 00000000 08:02 41691712                   /usr/lib/x86_64-linux-gnu/libconsole_bridge.so.0.2
7fd685d7c000-7fd685f7b000 ---p 00004000 08:02 41691712                   /usr/lib/x86_64-linux-gnu/libconsole_bridge.so.0.2
7fd685f7b000-7fd685f7c000 r--p 00003000 08:02 41691712                   /usr/lib/x86_64-linux-gnu/libconsole_bridge.so.0.2
7fd685f7c000-7fd685f7d000 rw-p 00004000 08:02 41691712                   /usr/lib/x86_64-linux-gnu/libconsole_bridge.so.0.2
7fd685f7d000-7fd685f84000 r-xp 00000000 08:02 38666326                   /lib/x86_64-linux-gnu/librt-2.23.so
7fd685f84000-7fd686183000 ---p 00007000 08:02 38666326                   /lib/x86_64-linux-gnu/librt-2.23.so
7fd686183000-7fd686184000 r--p 00006000 08:02 38666326                   /lib/x86_64-linux-gnu/librt-2.23.so
7fd686184000-7fd686185000 rw-p 00007000 08:02 38666326                   /lib/x86_64-linux-gnu/librt-2.23.so
7fd686185000-7fd686288000 r-xp 00000000 08:02 41691612                   /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.58.0
7fd686288000-7fd686488000 ---p 00103000 08:02 41691612                   /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.58.0
7fd686488000-7fd68648c000 r--p 00103000 08:02 41691612                   /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.58.0
7fd68648c000-7fd68648d000 rw-p 00107000 08:02 41691612                   /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.58.0
7fd68648d000-7fd68663c000 r-xp 00000000 08:02 41692565                   /usr/lib/x86_64-linux-gnu/liblog4cxx.so.10.0.0
7fd68663c000-7fd68683b000 ---p 001af000 08:02 41692565                   /usr/lib/x86_64-linux-gnu/liblog4cxx.so.10.0.0
7fd68683b000-7fd686861000 r--p 001ae000 08:02 41692565                   /usr/lib/x86_64-linux-gnu/liblog4cxx.so.10.0.0
7fd686861000-7fd686862000 rw-p 001d4000 08:02 41692565                   /usr/lib/x86_64-linux-gnu/liblog4cxx.so.10.0.0
7fd686862000-7fd686864000 rw-p 00000000 00:00 0 
7fd686864000-7fd686865000 r-xp 00000000 08:02 59769672                   /opt/ros/kinetic/lib/librosconsole_backend_interface.so
7fd686865000-7fd686a64000 ---p 00001000 08:02 59769672                   /opt/ros/kinetic/lib/librosconsole_backend_interface.so
7fd686a64000-7fd686a65000 r--p 00000000 08:02 59769672                   /opt/ros/kinetic/lib/librosconsole_backend_interface.so
7fd686a65000-7fd686a66000 rw-p 00001000 08:02 59769672                   /opt/ros/kinetic/lib/librosconsole_backend_interface.so
7fd686a66000-7fd686a7c000 r-xp 00000000 08:02 59769671                   /opt/ros/kinetic/lib/librosconsole_log4cxx.so
7fd686a7c000-7fd686c7c000 ---p 00016000 08:02 59769671                   /opt/ros/kinetic/lib/librosconsole_log4cxx.so
7fd686c7c000-7fd686c7e000 r--p 00016000 08:02 59769671                   /opt/ros/kinetic/lib/librosconsole_log4cxx.so
7fd686c7e000-7fd686c7f000 rw-p 00018000 08:02 59769671                   /opt/ros/kinetic/lib/librosconsole_log4cxx.so
7fd686c7f000-7fd686c96000 r-xp 00000000 08:02 41688858                   /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
7fd686c96000-7fd686e95000 ---p 00017000 08:02 41688858                   /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
7fd686e95000-7fd686e96000 r--p 00016000 08:02 41688858                   /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
7fd686e96000-7fd686e97000 rw-p 00017000 08:02 41688858                   /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
7fd686e97000-7fd686ebb000 r-xp 00000000 08:02 41691613                   /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
7fd686ebb000-7fd6870ba000 ---p 00024000 08:02 41691613                   /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
7fd6870ba000-7fd6870bc000 r--p 00023000 08:02 41691613                   /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
7fd6870bc000-7fd6870bd000 rw-p 00025000 08:02 41691613                   /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
7fd6870bd000-7fd6870c4000 r-xp 00000000 08:02 59769232                   /opt/ros/kinetic/lib/libcpp_common.so
7fd6870c4000-7fd6872c3000 ---p 00007000 08:02 59769232                   /opt/ros/kinetic/lib/libcpp_common.so
7fd6872c3000-7fd6872c4000 r--p 00006000 08:02 59769232                   /opt/ros/kinetic/lib/libcpp_common.so
7fd6872c4000-7fd6872c5000 rw-p 00007000 08:02 59769232                   /opt/ros/kinetic/lib/libcpp_common.so
7fd6872c5000-7fd6872e3000 r-xp 00000000 08:02 59769749                   /opt/ros/kinetic/lib/libxmlrpcpp.so
7fd6872e3000-7fd6874e2000 ---p 0001e000 08:02 59769749                   /opt/ros/kinetic/lib/libxmlrpcpp.so
7fd6874e2000-7fd6874e3000 r--p 0001d000 08:02 59769749                   /opt/ros/kinetic/lib/libxmlrpcpp.so
7fd6874e3000-7fd6874e4000 rw-p 0001e000 08:02 59769749                   /opt/ros/kinetic/lib/libxmlrpcpp.so
7fd6874e4000-7fd6876a3000 r-xp 00000000 08:02 38666331                   /lib/x86_64-linux-gnu/libc-2.23.so
7fd6876a3000-7fd6878a3000 ---p 001bf000 08:02 38666331                   /lib/x86_64-linux-gnu/libc-2.23.so
7fd6878a3000-7fd6878a7000 r--p 001bf000 08:02 38666331                   /lib/x86_64-linux-gnu/libc-2.23.so
7fd6878a7000-7fd6878a9000 rw-p 001c3000 08:02 38666331                   /lib/x86_64-linux-gnu/libc-2.23.so
7fd6878a9000-7fd6878ad000 rw-p 00000000 00:00 0 
7fd6878ad000-7fd6878c3000 r-xp 00000000 08:02 38670669                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7fd6878c3000-7fd687ac2000 ---p 00016000 08:02 38670669                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7fd687ac2000-7fd687ac3000 rw-p 00015000 08:02 38670669                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7fd687ac3000-7fd687bcb000 r-xp 00000000 08:02 38666336                   /lib/x86_64-linux-gnu/libm-2.23.so
7fd687bcb000-7fd687dca000 ---p 00108000 08:02 38666336                   /lib/x86_64-linux-gnu/libm-2.23.so
7fd687dca000-7fd687dcb000 r--p 00107000 08:02 38666336                   /lib/x86_64-linux-gnu/libm-2.23.so
7fd687dcb000-7fd687dcc000 rw-p 00108000 08:02 38666336                   /lib/x86_64-linux-gnu/libm-2.23.so
7fd687dcc000-7fd687f3e000 r-xp 00000000 08:02 41683074                   /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fd687f3e000-7fd68813e000 ---p 00172000 08:02 41683074                   /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fd68813e000-7fd688148000 r--p 00172000 08:02 41683074                   /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fd688148000-7fd68814a000 rw-p 0017c000 08:02 41683074                   /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7fd68814a000-7fd68814e000 rw-p 00000000 00:00 0 
7fd68814e000-7fd688166000 r-xp 00000000 08:02 38666337                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7fd688166000-7fd688365000 ---p 00018000 08:02 38666337                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7fd688365000-7fd688366000 r--p 00017000 08:02 38666337                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7fd688366000-7fd688367000 rw-p 00018000 08:02 38666337                   /lib/x86_64-linux-gnu/libpthread-2.23.so
7fd688367000-7fd68836b000 rw-p 00000000 00:00 0 
7fd68836b000-7fd68836e000 r-xp 00000000 08:02 41688860                   /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
7fd68836e000-7fd68856d000 ---p 00003000 08:02 41688860                   /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
7fd68856d000-7fd68856e000 r--p 00002000 08:02 41688860                   /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
7fd68856e000-7fd68856f000 rw-p 00003000 08:02 41688860                   /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
7fd68856f000-7fd688598000 r-xp 00000000 08:02 59769246                   /opt/ros/kinetic/lib/librostime.so
7fd688598000-7fd688798000 ---p 00029000 08:02 59769246                   /opt/ros/kinetic/lib/librostime.so
7fd688798000-7fd68879a000 r--p 00029000 08:02 59769246                   /opt/ros/kinetic/lib/librostime.so
7fd68879a000-7fd68879b000 rw-p 0002b000 08:02 59769246                   /opt/ros/kinetic/lib/librostime.so
7fd68879b000-7fd68879d000 r-xp 00000000 08:02 59769268                   /opt/ros/kinetic/lib/libroscpp_serialization.so
7fd68879d000-7fd68899c000 ---p 00002000 08:02 59769268                   /opt/ros/kinetic/lib/libroscpp_serialization.so
7fd68899c000-7fd68899d000 r--p 00001000 08:02 59769268                   /opt/ros/kinetic/lib/libroscpp_serialization.so
7fd68899d000-7fd68899e000 rw-p 00002000 08:02 59769268                   /opt/ros/kinetic/lib/libroscpp_serialization.so
7fd68899e000-7fd6889cd000 r-xp 00000000 08:02 59769670                   /opt/ros/kinetic/lib/librosconsole.so
7fd6889cd000-7fd688bcd000 ---p 0002f000 08:02 59769670                   /opt/ros/kinetic/lib/librosconsole.so
7fd688bcd000-7fd688bcf000 r--p 0002f000 08:02 59769670                   /opt/ros/kinetic/lib/librosconsole.so
7fd688bcf000-7fd688bd0000 rw-p 00031000 08:02 59769670                   /opt/ros/kinetic/lib/librosconsole.so
7fd688bd0000-7fd688d52000 r-xp 00000000 08:02 59769848                   /opt/ros/kinetic/lib/libroscpp.so
7fd688d52000-7fd688f52000 ---p 00182000 08:02 59769848                   /opt/ros/kinetic/lib/libroscpp.so
7fd688f52000-7fd688f58000 r--p 00182000 08:02 59769848                   /opt/ros/kinetic/lib/libroscpp.so
7fd688f58000-7fd688f5c000 rw-p 00188000 08:02 59769848                   /opt/ros/kinetic/lib/libroscpp.so
7fd688f5c000-7fd688f82000 r-xp 00000000 08:02 38666245                   /lib/x86_64-linux-gnu/ld-2.23.so
7fd689122000-7fd689138000 rw-p 00000000 00:00 0 
7fd68916d000-7fd689181000 rw-p 00000000 00:00 0 
7fd689181000-7fd689182000 r--p 00025000 08:02 38666245                   /lib/x86_64-linux-gnu/ld-2.23.so
7fd689182000-7fd689183000 rw-p 00026000 08:02 38666245                   /lib/x86_64-linux-gnu/ld-2.23.so
7fd689183000-7fd689184000 rw-p 00000000 00:00 0 
7ffcb1664000-7ffcb1686000 rw-p 00000000 00:00 0                          [stack]
7ffcb17a5000-7ffcb17a7000 r--p 00000000 00:00 0                          [vvar]
7ffcb17a7000-7ffcb17a9000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
[sweep_node-1] process has died [pid 32757, exit code -6, cmd /home/mark/catkin_ws/devel/lib/sweep_ros/sweep_node __name:=sweep_node __log:=/home/mark/.ros/log/41645042-e266-11e6-82de-3417ebcb9b7f/sweep_node-1.log].
log file: /home/mark/.ros/log/41645042-e266-11e6-82de-3417ebcb9b7f/sweep_node-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Does the node only support Indigo/14.04 or is there something else wrong?

kent-williams commented 7 years ago

Hi @mjedmonds

Thanks for sharing this!

We have only tested this on Jade / Ubuntu 14.04 thus far. I will get Kinetic on 16.04 up soon and see if I can get this fixed.

-Kent

bhavyangupta commented 7 years ago

Hi @kent-williams , @mjedmonds

I observed this same issue on Indigo / Ubuntu 14.04. I have opened a pull request (https://github.com/scanse/sweep-ros/pull/4) demonstrating the solution that fixed the problem for me.