Open samadDotDev opened 2 years ago
@samadDotDev If you run under a debugger, where is the crash happening?
@bzbarsky-apple, here is the backtrace:
Thread 4 "all-cluster-app" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xfffff62bf040 (LWP 3221)]
0x0000fffff7a42a5c in ?? () from /lib/aarch64-linux-gnu/libglib-2.0.so.0
(gdb) bt
#0 0x0000fffff7a42a5c in () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#1 0x0000fffff79b3d60 in g_bit_lock () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#2 0x0000fffff7a31290 in g_variant_n_children () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#3 0x0000aaaaaac90db8 in chip::DeviceLayer::ThreadStackManagerImpl::_OnNetworkScanFinished(_GAsyncResult*) (this=0xaaaaaadc69e0 <chip::DeviceLayer::ThreadStackManagerImpl::sInstance>, res=0xffffe8003e20)
at ../../third_party/connectedhomeip/src/platform/Linux/ThreadStackManagerImpl.cpp:609
#4 0x0000aaaaaac90a4c in chip::DeviceLayer::ThreadStackManagerImpl::_OnNetworkScanFinished(_GObject*, _GAsyncResult*, void*)
(source_object=0xaaaaaae12130, res=0xffffe8003e20, user_data=0xaaaaaadc69e0 <chip::DeviceLayer::ThreadStackManagerImpl::sInstance>) at ../../third_party/connectedhomeip/src/platform/Linux/ThreadStackManagerImpl.cpp:581
#5 0x0000fffff7c04ad8 in () at /lib/aarch64-linux-gnu/libgio-2.0.so.0
#6 0x0000fffff7c04d10 in () at /lib/aarch64-linux-gnu/libgio-2.0.so.0
#7 0x0000fffff7c72b48 in () at /lib/aarch64-linux-gnu/libgio-2.0.so.0
#8 0x0000fffff7c04ad8 in () at /lib/aarch64-linux-gnu/libgio-2.0.so.0
#9 0x0000fffff7c04d10 in () at /lib/aarch64-linux-gnu/libgio-2.0.so.0
#10 0x0000fffff7c61ef8 in () at /lib/aarch64-linux-gnu/libgio-2.0.so.0
#11 0x0000fffff7c04ad8 in () at /lib/aarch64-linux-gnu/libgio-2.0.so.0
#12 0x0000fffff7c04b24 in () at /lib/aarch64-linux-gnu/libgio-2.0.so.0
#13 0x0000fffff79ed19c in g_main_context_dispatch () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#14 0x0000fffff7a41cdc in () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#15 0x0000fffff79ec87c in g_main_loop_run () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#16 0x0000aaaaaac81a7c in chip::DeviceLayer::(anonymous namespace)::GDBus_Thread() () at ../../third_party/connectedhomeip/src/platform/Linux/PlatformManagerImpl.cpp:66
#17 0x0000aaaaaac83a04 in std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) (__f=@0xffffe8006cd8: 0xaaaaaac81a5c <chip::DeviceLayer::(anonymous namespace)::GDBus_Thread()>) at /usr/include/c++/11/bits/invoke.h:61
#18 0x0000aaaaaac839a4 in std::__invoke<void (*)()>(void (*&&)()) (__fn=@0xffffe8006cd8: 0xaaaaaac81a5c <chip::DeviceLayer::(anonymous namespace)::GDBus_Thread()>) at /usr/include/c++/11/bits/invoke.h:96
#19 0x0000aaaaaac83940 in std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0xffffe8006cd8) at /usr/include/c++/11/bits/std_thread.h:253
#20 0x0000aaaaaac83914 in std::thread::_Invoker<std::tuple<void (*)()> >::operator()() (this=0xffffe8006cd8) at /usr/include/c++/11/bits/std_thread.h:260
#21 0x0000aaaaaac838f4 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() (this=0xffffe8006cd0) at /usr/include/c++/11/bits/std_thread.h:211
#22 0x0000fffff784888c in () at /lib/aarch64-linux-gnu/libstdc++.so.6
#23 0x0000fffff75b669c in start_thread (arg=<optimized out>) at pthread_create.c:435
#24 0x0000fffff761ed1c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:79
@samadDotDev thank you, that is very helpful!
That's crashing under this line of code:
if (g_variant_n_children(scan_result.get()) > 0)
in glib. @erjiaqing could we have scan_result null here? For example if openthread_io_openthread_border_router_call_scan_finish
returned false. In that case it looks like we schedule an OnFinished callback but still try to use the scan result?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This stale issue has been automatically closed. Thank you for your contributions.
When running
all-cluster-app
with--thread
flag of TH 1.3 image on RPi, there is a segmentation fault onScanNetworks
command. Note that this doesn't crash if only--wifi
is enabled and returns the scan result correctly. Is there any thread configuration that needs to be set on Test Harness for these manual tests?