hku-mars / FAST-LIVO

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

corrupted size vs. prev_size [laserMapping-2] process has died #33

Closed ZZy129326999 closed 1 year ago

ZZy129326999 commented 1 year ago

2022-12-19 21-09-08 的屏幕截图

ZZy129326999 commented 1 year ago

I can well run FAST-LIO, R3LIVE. But I do not run FAST-LIVO in hku1.bag.

ZZy129326999 commented 1 year ago

` src/FAST-LIVO/src/laserMapping.cpp

    if (feats_undistort->empty() || (feats_undistort == nullptr))
    {
        // cout<<" No point!!!"<<endl;
        if (!fast_lio_is_ready)
        {
            first_lidar_time = LidarMeasures.lidar_beg_time;
            p_imu->first_lidar_time = first_lidar_time;
            LidarMeasures.measures.clear();
            cout<<"FAST-LIO not ready"<<endl;
            continue;
        }
    }

` 这个是我用 gdb 定位的错误,我的配置是Ubuntu20.04,其他包都没啥问题,也是最近两天重装的系统,应该不存在其他的干扰。

xuankuzcr commented 1 year ago

gdb的终端提示可以发下么

ZZy129326999 commented 1 year ago

[ INFO] [1671458733.991821882]: IMU Initializing: 10.0 % corrupted size vs. prev_size --Type for more, q to quit, c to continue without paging--c

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: 没有那个文件或目录. (gdb) bt

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

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

2 0x00007ffff4b9826e in __libc_message

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

3 0x00007ffff4ba02fc in malloc_printerr

(str=str@entry=0x7ffff4cc044d "corrupted size vs. prev_size")
at malloc.c:5347

4 0x00007ffff4ba096b in unlink_chunk

(p=p@entry=0x55555c429a90, av=0x7ffff4cf7b80 <main_arena>) at malloc.c:1454

5 0x00007ffff4ba1e8b in _int_free

(av=0x7ffff4cf7b80 <main_arena>, p=0x55555c429930, have_lock=<optimized out>) at malloc.c:4342

6 0x00005555555b7613 in boost::detail::sp_counted_base::release()

(this=0x55555c8a0af0)
at /usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp:112

7 boost::detail::sp_counted_base::release() (this=0x55555c8a0af0)

at /usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp:108

8 boost::detail::shared_count::~shared_count()

(this=0x55555c06e648, __in_chrg=<optimized out>)
at /usr/include/boost/smart_ptr/detail/shared_count.hpp:427

9 boost::shared_ptr<sensormsgs::Imu<std::allocator > const>::~shared_ptr() (this=0x55555c06e640, __in_chrg=)

--Type for more, q to quit, c to continue without paging-- at /usr/include/boost/smart_ptr/shared_ptr.hpp:341

10 std::_Destroy<boost::shared_ptr<sensormsgs::Imu<std::allocator > const> >(boost::shared_ptr<sensormsgs::Imu<std::allocator > const>*)

(__pointer=0x55555c06e640) at /usr/include/c++/9/bits/stl_construct.h:98

11 std::_Destroy_aux::__destroy<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>>(boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>*) (last=, first=0x55555c06e640)

at /usr/include/c++/9/bits/stl_construct.h:108

12 std::_Destroy<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>>(boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>*)

(__last=<optimized out>, __first=<optimized out>)
at /usr/include/c++/9/bits/stl_construct.h:137

13 std::_Destroy<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, boost::shared_ptr<sensormsgs::Imu<std::allocator > const> >(boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>*, std::allocator<boost::shared_ptr<sensormsgs::Imu<std::allocator > const> >&)

(__last=0x55555c06e700, __first=<optimized out>)
at /usr/include/c++/9/bits/stl_construct.h:206

14 std::deque<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, std::allocator<boost::shared_ptr<sensormsgs::Imu<std::allocator > cons--Type for more, q to quit, c to continue without paging--

t> > >::_M_destroy_data_aux(std::_Deque_iterator<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>&, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>>, std::_Deque_iterator<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>&, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>>) (this=, _first= {px = 0x55555c8a0170, pn = {pi = 0x55555c06f7c0}}, __last=...) at /usr/include/c++/9/bits/deque.tcc:870

15 0x00005555555b7d3f in std::deque<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, std::allocator<boost::shared_ptr<sensormsgs::Imu<std::allocator > const> > >::_M_destroy_data(std::_Deque_iterator<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>&, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>>, std::_Deque_iterator<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>&, boost::shared_ptr<sensormsgs::Imu<std::allocator > const>>, std::allocator<boost::shared_ptr<sensormsgs::Imu<std::allocator > const> > const&) (last=..., first=..., this=0x55555c06f838)

at /usr/include/c++/9/bits/stl_deque.h:167

16 std::deque<boost::shared_ptr<sensormsgs::Imu<std::allocator > const>, std::allocator<boost::shared_ptr<sensormsgs::Imu<std::allocator > const> > >::~deque() (this=0x55555c06f838, __in_chrg=)

--Type for more, q to quit, c to continue without paging-- at /usr/include/c++/9/bits/stl_deque.h:1072

17 MeasureGroup::~MeasureGroup()

(this=0x55555c06f830, __in_chrg=<optimized out>)
at /home/zzy/work/catkin_ws/fast_livo_ws/src/FAST-LIVO/include/common_lib.h:149

18 std::_Destroy(MeasureGroup*) (__pointer=0x55555c06f830)

at /usr/include/c++/9/bits/stl_construct.h:98

19 std::_Destroy_aux::destroy<MeasureGroup>(MeasureGroup, MeasureGroup*) (last=, __first=0x55555c06f830)

at /usr/include/c++/9/bits/stl_construct.h:108

20 std::_Destroy<MeasureGroup>(MeasureGroup, MeasureGroup*)

(__last=<optimized out>, __first=<optimized out>)
at /usr/include/c++/9/bits/stl_construct.h:137

21 std::_Destroy<MeasureGroup, MeasureGroup>(MeasureGroup, MeasureGroup*, std::allocator&) (last=0x55555c06f8e8, first=)

at /usr/include/c++/9/bits/stl_construct.h:206

22 std::deque<MeasureGroup, std::allocator >::_M_destroy_data_aux(std::_Deque_iterator<MeasureGroup, MeasureGroup&, MeasureGroup>, std::_Deque_iterator<MeasureGroup, MeasureGroup&, MeasureGroup>)

(this=<optimized out>, __first=
    {img_offset_time = 0, imu = std::deque with 20 elements = {{px = 0x55555c8a0170, pn = {pi_ = 0x55555c06f7c0}}, {px = 0x55555c8a02d0, pn = {pi_ = 0x55555c8a0430}}, {px = 0x55555c89e890, pn = {pi_ = 0x55555c4de440}}, {px = 0x55555c89e--Type <RET> for more, q to quit, c to continue without paging--

710, pn = {pi = 0x55555c39aa10}}, {px = 0x55555c89e590, pn = {pi = 0x55555c89e470}}, {px = 0x55555c4dbea0, pn = {pi = 0x55555c89e490}}, {px = 0x55555c4dce00, pn = {pi = 0x55555c42cfa0}}, {px = 0x55555c8a1070, pn = {pi = 0x55555c8a0660}}, {px = 0x55555c429940, pn = {pi = 0x55555c8a0af0}}, {px = 0x55555c89eb90, pn = {pi = 0x55555c89fd70}}, {px = 0x55555c89f610, pn = {pi = 0x55555c89f2f0}}, {px = 0x55555c89f490, pn = {pi = 0x55555c89f470}}, {px = 0x55555c89f310, pn = {pi = 0x55555c89f5f0}}, {px = 0x55555c89f190, pn = {pi = 0x55555c89f770}}, {px = 0x55555c89f010, pn = {pi = 0x55555c89f8f0}}, {px = 0x55555c89ee90, pn = {pi = 0x55555c89fa70}}, {px = 0x55555c89ed10, pn = {pi = 0x55555c89fbf0}}, {px = 0x55555c89f790, pn = {pi = 0x55555c89f170}}, {px = 0x55555c89fc10, pn = {pi = 0x55555c89e6f0}}, {px = 0x55555c89fa90, pn = {pi_ = 0x55555c89e870}}}, img = {flags = 1124007936, dims = 0, rows = 0, cols = 0, data = 0x0, datastart = 0x0, dataend = 0x0, datalimit = 0x0, allocator = 0x0, u = 0x0, size = {p = 0x55555c06f890}, step = {p = 0x55555c06f8d8, buf = {0, 0}}}}, __last= {img_offset_time = 0, imu = std::deque with -32 elements, img = {flags = 0, dims = 0, rows = 0, cols = 0, data = 0x0, datastart = 0x0, dataend = 0x0, datalimit = 0x0, allocator = 0x0, u = 0x0, size = {p = 0x0}, step = {p = 0x0, buf = {0, 0}}}}) at /usr/include/c++/9/bits/deque.tcc:870

23 0x000055555558c0ad in std::deque<MeasureGroup, std::allocator >::_M_destroy_data(std::_Deque_iterator<MeasureGroup, MeasureGroup&, MeasureGroup>, std::_Deque_iterator<MeasureGroup, MeasureGroup&, MeasureGroup>, std::allocator const&)

(__last=..., __first=..., this=0x555555623540 <LidarMeasures+32>)

--Type for more, q to quit, c to continue without paging-- at /usr/include/c++/9/bits/stl_deque.h:2132

24 std::deque<MeasureGroup, std::allocator >::_M_erase_at_end(std::_Deque_iterator<MeasureGroup, MeasureGroup&, MeasureGroup*>)

(__pos=..., this=0x555555623540 <LidarMeasures+32>)
at /usr/include/c++/9/bits/stl_deque.h:2134

25 std::deque<MeasureGroup, std::allocator >::clear()

(this=0x555555623540 <LidarMeasures+32>)
at /usr/include/c++/9/bits/stl_deque.h:1868

26 main(int, char**) (argc=, argv=)

at /home/zzy/work/catkin_ws/fast_livo_ws/src/FAST-LIVO/src/laserMapping.cpp:1306
ZZy129326999 commented 1 year ago

` src/FAST-LIVO/src/laserMapping.cpp

    if (feats_undistort->empty() || (feats_undistort == nullptr))
    {
        // cout<<" No point!!!"<<endl;
        if (!fast_lio_is_ready)
        {
            first_lidar_time = LidarMeasures.lidar_beg_time;
            p_imu->first_lidar_time = first_lidar_time;
            LidarMeasures.measures.clear();
            cout<<"FAST-LIO not ready"<<endl;
            continue;
        }
    }

展开的gdb发到前一个信息里了,LidarMeasures.measures.clear(); 这个是1306中断的代码。感谢您啦!!

xuankuzcr commented 1 year ago

std::deque<struct MeasureGroup> ().swap(LidarMeasures.measures) 替换LidarMeasures.measures.clear()试试

ZZy129326999 commented 1 year ago

std::deque ().swap(LidarMeasures.measures)

0x0}, step = {p = 0x0, buf = {0, 0}}}}) at /usr/include/c++/9/bits/deque.tcc:870

23 0x00005555555b7d73 in std::deque<MeasureGroup, std::allocator >::_M_destroy_data(std::_Deque_iterator<MeasureGroup, MeasureGroup&, MeasureGrou--Type for more, q to quit, c to continue without paging--

p>, std::_Deque_iterator<MeasureGroup, MeasureGroup&, MeasureGroup>, std::allocator const&) (last=..., first=..., this=0x7fffffff8f80) at /usr/include/c++/9/bits/stl_deque.h:167

24 std::deque<MeasureGroup, std::allocator >::~deque()

(this=0x7fffffff8f80, __in_chrg=<optimized out>)
at /usr/include/c++/9/bits/stl_deque.h:1072

25 0x000055555558cf7a in main(int, char**)

(argc=<optimized out>, argv=<optimized out>)
at /usr/include/c++/9/bits/move.h:182

(gdb) (gdb) up 25

25 0x000055555558cf7a in main (argc=, argv=)

at /usr/include/c++/9/bits/move.h:182

182 swap(_Tp& __a, _Tp& __b)

ZZy129326999 commented 1 year ago

std::deque<struct MeasureGroup> ().swap(LidarMeasures.measures) 替换LidarMeasures.measures.clear()试试

感谢您的指教!!但是现在gdb定位不到具体位置了,感觉这个错误有些摸不到头绪。

ZZy129326999 commented 1 year ago

std::deque<struct MeasureGroup> ().swap(LidarMeasures.measures) 替换LidarMeasures.measures.clear()试试

    {img_offset_time = 0.0017692896071821451, imu = std::deque with -32 elements, img = {flags = 0, dims = 0, rows = 536870912, cols = 1067186637, data = 0x3fa772c8c0000000 <error: Cannot access memory at address 0x3fa772c8c0000000>, datastart = 0x3fefaeaec0000000 <error: Cannot access memory at address 0x3fefaeaec0000000>, dataend = 0x0, datalimit = 0x0, allocator = 0x0, u = 0x0, size = {p = 0x0}, step = {p = 0x0, buf = {0, 0}}}}) at /usr/include/c++/9/bits/stl_deque.h:2117

25 0x00005555559d9dc0 in std::deque<MeasureGroup, std::allocator >::~deque() (this=0x7fffffff9770, __in_chrg=)

at /usr/include/c++/9/bits/stl_deque.h:1072

26 0x00005555559c98f5 in main(int, char**) (argc=1, argv=0x7fffffffd698)

at /home/zzy/work/catkin_ws/fast_livo_ws/src/FAST-LIVO/src/laserMapping.cpp:1306

(gdb) (gdb) (gdb) up 26

26 0x00005555559c98f5 in main (argc=1, argv=0x7fffffffd698)

at /home/zzy/work/catkin_ws/fast_livo_ws/src/FAST-LIVO/src/laserMapping.cpp:1306

1306 std::deque ().swap(LidarMeasures.measures);

这次我把rosbag play 停掉了,又有了。刚才没关rosbag就没定位到好像。 我顺便改成-O0了。麻烦您啦!!

ZZy129326999 commented 1 year ago

std::deque<struct MeasureGroup> ().swap(LidarMeasures.measures) 替换LidarMeasures.measures.clear()试试

2022-12-20 16-07-07 的屏幕截图

ZZy129326999 commented 1 year ago

std::deque<struct MeasureGroup> ().swap(LidarMeasures.measures) 替换LidarMeasures.measures.clear()试试 我尝试输出了deque的长度是1。

crowningwang commented 1 year ago

std::deque<struct MeasureGroup> ().swap(LidarMeasures.measures) 替换LidarMeasures.measures.clear()试试 我尝试输出了deque的长度是1。

Hello, have you solved this problem? I have the same question.

sebastiantorres1 commented 1 year ago

I also have the same question, but in my case I'm using a Jetson Orin and when i use the command $ roslaunch fast_livo mapping_avia.launch the launch shows me this

Screenshot from 2023-02-01 17-08-50

and the rviz doesn't show me the hku2.bag file. I made the same test in my computer and it works fine, do you know how can i solve this problem?

xuankuzcr commented 1 year ago

std::deque<struct MeasureGroup> ().swap(LidarMeasures.measures) 替换LidarMeasures.measures.clear()试试 我尝试输出了deque的长度是1。

这个长度是1是没问题的,是别的问题,主要我这边无法复现你的问题,你解决这个问题了么?

widmer2001 commented 11 months ago

你好 我也遇到了同样的问题,请问你解决了嘛?