Open arunumd opened 10 months ago
The Segmentation fault issue does not happen in this commit : 9d0971107f6f9c95e16afd727fa2534d01a0fe4e
Thanks for the report @arunumd . Unfortunately, I'm not able to reproduce the issue.
-DCMAKE_BUILD_TYPE=Debug
), and if so would it be possible to get a stack trace (e.g. using gdb
)Cheers,
Tom Staff Engineer Ouster Inc.
The -DCMAKE_BUILD_TYPE=Debug
flag does not seem to generate a core dump.
Regarding the problematic pcap file, can you please consult Michael Turner?
I am unable to get a core dump in my WSL1 environment. It seems like a limitation of WSL1. So I ran Address Sanitizer using
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
inside this CMakeLists.txt file, and then cmake .. -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=ASAN .
This is the diagnostics I get from ASAN
arun@arun:~/ouster_example/build$ sudo ./examples/lidar_scan_example 2_meter.pcap 2_meter.json
[2023-11-20 10:18:38.041] [ouster::sensor] [info] parsing non-legacy metadata format
AddressSanitizer:DEADLYSIGNAL
=================================================================
==31884==ERROR: AddressSanitizer: SEGV on unknown address 0xfffffffffffffff1 (pc 0x7f09c7dacb3f bp 0x000000000000 sp 0x7fffd63c02a0 T0)
==31884==The signal is caused by a READ memory access.
#0 0x7f09c7dacb3e in bool __sanitizer::atomic_compare_exchange_strong<__sanitizer::atomic_uint8_t>(__sanitizer::atomic_uint8_t volatile*, __sanitizer::atomic_uint8_t::Type*, __sani
tizer::atomic_uint8_t::Type, __sanitizer::memory_order) ../../../../src/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h:79
#1 0x7f09c7dacb3e in __asan::Allocator::AtomicallySetQuarantineFlagIfAllocated(__asan::AsanChunk*, void*, __sanitizer::BufferedStackTrace*) ../../../../src/libsanitizer/asan/asan_a
llocator.cc:552
#2 0x7f09c7dacb3e in __asan::Allocator::Deallocate(void*, unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType) ../../../../src/libsanitizer/asan/asan_
allocator.cc:629
#3 0x7f09c7dacb3e in __asan::asan_delete(void*, unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType) ../../../../src/libsanitizer/asan/asan_allocator.
/ouster_example/build/examples/lidar_scan_example+0x15b8b)
#13 0x7f09c883d46b in std::_Optional_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, false>::~_Optional_base() (/home/arun/oust
er_example/build/examples/lidar_scan_example+0x1546b)
#14 0x7f09c883d48b in std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~optional() (/home/arun/ouster_example/build/examples
/lidar_scan_example+0x1548b)
#15 0x7f09c883d537 in ouster::sensor::sensor_config::~sensor_config() (/home/arun/ouster_example/build/examples/lidar_scan_example+0x15537)
#16 0x7f09c88620b5 in ouster::sensor::sensor_info::sensor_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) /home/arun/oust
er_example/ouster_client/src/sensor_info.cpp:504
#17 0x7f09c886760e in ouster::sensor::parse_metadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) /home/arun/ouster_example
/ouster_client/src/sensor_info.cpp:994
#18 0x7f09c8867109 in ouster::sensor::metadata_from_json(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) /home/arun/ouster_exa
mple/ouster_client/src/sensor_info.cpp:973
#19 0x7f09c883b96b in main /home/arun/ouster_example/examples/lidar_scan_example.cpp:37
#20 0x7f09c7574082 in __libc_start_main ../csu/libc-start.c:308
#21 0x7f09c883afad in _start (/home/arun/ouster_example/build/examples/lidar_scan_example+0x12fad)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../../../../src/libsanitizer/sanitizer_common/sanitizer_atomic_clang.h:79 in bool __sanitizer::atomic_compare_exchange_strong<__sanitizer::atomic_uint8_
t>(__sanitizer::atomic_uint8_t volatile*, __sanitizer::atomic_uint8_t::Type*, __sanitizer::atomic_uint8_t::Type, __sanitizer::memory_order)
==31884==ABORTING
The line 37 it is talking about is this line : https://github.com/ouster-lidar/ouster_example/blob/master/examples/lidar_scan_example.cpp#L37
It seems like it is having some issues parsing the metadata from the JSON file.
The JSON file parsed fine when I tried it. I'll see if I can get the PCAP from Michael. Thanks for the additional info!
Cheers,
Tom Staff Engineer Ouster Inc.
I have the same Segmentation fault (core dumped) error with 20231031 release. Here are the json and pcap files I tested with. testA.zip
Environment: Using a docker container (ubuntu 22.04 | cuda 12.1 | cmake 3.28.1) dockerfile.zip
Describe the bug If you try to compile and run the examples/lidar_scan_example.cpp with a pcap and a json file, it causes a SIGSEGV, Segmentation fault
To Reproduce Steps to reproduce the behavior (steps below are just an example):
Screenshots Refer the terminal log above
Platform (please complete the following information):
Note: For your convenience I am also attaching the json file created by the sensor when I created the pcap recording using the ouster-cli tool.
This is the json file : 2_meter.json
Additional Info (Maybe useful): ouster-sdk 0.9.0 was used for recording the pcap file with the ouster-cli tool