hku-mars / FAST-LIVO

A Fast and Tightly-coupled Sparse-Direct LiDAR-Inertial-Visual Odometry (LIVO).
GNU General Public License v2.0
1.26k stars 202 forks source link

【求助】Double free or corruption (out)报错,终止 #31

Closed Noahcuptea closed 1 year ago

Noahcuptea commented 1 year ago

尊敬的港大团队,您好,

在测试数据集或者收集私人数据都会出现如下报错:

[ LIO ]: Raw feature num: 1417 downsamp num 161 Map num: 152. [ LIO ]: Using multi-processor, used core number: 4. double free or corruption (out) [laserMapping-1] process has died ...

报错节点是在接受lidar和imu数据后就会发生,情况如下: https://user-images.githubusercontent.com/45952143/207554474-f0282eb6-b0f2-4e81-9771-207f330cc036.mp4

lidar和imu的硬同步应该没有问题,因为FAST-LIO可以跑,报错时候的log files已上传,您过目。 rosout.log rosout-1-stdout.log rviz-3-stdout.log imu-1.log master.log roslaunch-cpc-MoreFine-S500-319789.log roslaunch-cpc-MoreFine-S500-320153.log roslaunch-cpc-MoreFine-S500-320331.log

xuankuzcr commented 1 year ago

试试gdb debug模式通过这样修改 xxx.launch <node pkg="fast_livo" type="fastlivo_mapping" name="laserMapping" output="screen" launch-prefix="gdb -ex run --args"> 然后看看终端的报错位置

Noahcuptea commented 1 year ago

您好,下图是报错信息,现在往哪个方向整? image

Noahcuptea commented 1 year ago

试试gdb debug模式通过这样修改 xxx.launch <node pkg="fast_livo" type="fastlivo_mapping" name="laserMapping" output="screen" launch-prefix="gdb -ex run --args"> 然后看看终端的报错位置

您好,您的环境都用的什么?我搜索了港大团队过去的issues,我怀疑是环境问题,您可以把您的环境列出来么?我按照您的环境做一遍系统, 甚至做一份docker。您可以这么列:ubuntu 18.04 - ros_melodic - pcl 1.9 - eignen 3.3.4 - opencv 3.2 - XXX

Noahcuptea commented 1 year ago

您好,以下是gdb调试输入bt后所获信息的截图和代码(一样的),您过目

51672195821_ pic 61672195883_ pic

`[ LIO ]: Raw feature num: 6335 downsamp num 4224 Map num: 2890. [ LIO ]: Using multi-processor, used core number: 4. [New Thread 0x7fff77fff700 (LWP 1052713)] [New Thread 0x7fff777fe700 (LWP 1052714)] [New Thread 0x7fff76ffd700 (LWP 1052715)] double free or corruption (out) --Type for more, q to quit, c to continue without paging--bt

Thread 1 "fastlivo_mappin" received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt

0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50

1 0x00007ffff47cd859 in __GI_abort () at abort.c:79

2 0x00007ffff483826e in __libc_message

(action=action@entry=do_abort, fmt=fmt@entry=0x7ffff4962298 "%s\n")
at ../sysdeps/posix/libc_fatal.c:155

3 0x00007ffff48402fc in malloc_printerr

(str=str@entry=0x7ffff4964670 "double free or corruption (out)")
at malloc.c:5347

4 0x00007ffff4841fa0 in _int_free

(av=0x7ffff4997b80 <main_arena>, p=0x55555c58b710, have_lock=<optimized out>)
at malloc.c:4314

5 0x00007ffff4e3841a in Eigen::internal::aligned_free(void*)

(ptr=<optimized out>) at /usr/include/eigen3/Eigen/src/Core/util/Memory.h:745

6 Eigen::aligned_allocator::deallocate(pcl::PointXYZINormal*, unsigned long) (this=, p=)

at /usr/include/eigen3/Eigen/src/Core/util/Memory.h:747

7 std::allocator_traits<Eigen::aligned_allocator >::deallocate(Eigen::aligned_allocator&, pcl::PointXYZINormal*, unsigned long) (a=..., n=, __p=)

at /usr/include/c++/9/bits/alloc_traits.h:332

8 std::_Vector_base<pcl::PointXYZINormal, Eigen::aligned_allocator >::_M_deallocate(pcl::PointXYZINormal*, unsigned long)

(this=<optimized out>, __n=<optimized out>, __p=<optimized out>)
at /usr/include/c++/9/bits/stl_vector.h:351

9 std::_Vector_base<pcl::PointXYZINormal, Eigen::aligned_allocator >::~_Vector_base() (this=, __in_chrg=)

at /usr/include/c++/9/bits/stl_vector.h:332

10 std::vector<pcl::PointXYZINormal, Eigen::aligned_allocator >::~vector() (this=, __in_chrg=)

at /usr/include/c++/9/bits/stl_vector.h:680

11 KD_TREE::Add_Points(std::vector<pcl::PointXYZINormal, Eigen::aligned_allocator >&, bool)

(this=0x555555629520 <ikdtree>, PointToAdd=std::vector of length 4224, capacity--Type <RET> for more, q to quit, c to continue without paging--bt

4224 = {...}, downsample_on=true) at /home/cpc/catkin_ws/src/FAST-LIVO/include/ikd-Tree/ikd_Tree.cpp:401

12 0x000055555558efad in main(int, char**)

(argc=<optimized out>, argv=<optimized out>)
at /home/cpc/catkin_ws/src/FAST-LIVO/src/laserMapping.cpp:1746`
Noahcuptea commented 1 year ago

做好了,库之间一定要配套,我做了如下改动:

推荐软件 timeshift,一个系统备份还原工具,方便restore至合适的节点

QingKe-UP commented 4 months ago

@Noahcuptea 您好,请问您后面排查出是哪里出问题了吗?或者您是如何解决这个问题的?