- 최신
- 최다 투표
- 가장 많은 댓글
I have attached a snippet of a gdb backtrace from when the segfault occurs:
2021-09-28T15:17:10.959Z Thread 304 "enc_que0:src" received signal SIGSEGV, Segmentation fault..
2021-09-28T15:17:10.960Z [Switching to Thread 0x7eaa1fa7c0 (LWP 760)].
2021-09-28T15:17:10.960Z 0x0000005561527ac8 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7ee8006640) at /usr/include/c++/7/bits/shared_ptr_base.h:154.
2021-09-28T15:17:10.960Z 154 _M_dispose();.
2021-09-28T15:17:11.263Z [#0 0x0000005561527ac8 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (this=0x7ee8006640) at /usr/include/c++/7/bits/shared_ptr_base.h:154.
2021-09-28T15:17:11.264Z #1 0x0000005561527ac8 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (this=0x7eaa1f9ad0, __in_chrg=<optimized out>) at /usr/include/c++/7/bits/shared_ptr_base.h:684.
2021-09-28T15:17:11.264Z #2 0x0000005561527ac8 in std::__shared_ptr<std::__future_base::_State_baseV2, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (this=0x7eaa1f9ac8, __in_chrg=<optimized out>) at /usr/include/c++/7/bits/shared_ptr_base.h:1123.
2021-09-28T15:17:11.264Z #3 0x0000005561527ac8 in std::shared_ptr<std::__future_base::_State_baseV2>::~shared_ptr() (this=0x7eaa1f9ac8, __in_chrg=<optimized out>) at /usr/include/c++/7/bits/shared_ptr.h:93.
2021-09-28T15:17:11.264Z #4 0x0000005561527ac8 in std::__basic_future<Aws::Eventstreamrpc::RpcError>::~__basic_future() (this=0x7eaa1f9ac8, __in_chrg=<optimized out>) at /usr/include/c++/7/future:671.
2021-09-28T15:17:11.264Z #5 0x0000005561527ac8 in std::future<Aws::Eventstreamrpc::RpcError>::~future() (this=0x7eaa1f9ac8, __in_chrg=<optimized out>) at /usr/include/c++/7/future:761.
2021-09-28T15:17:11.264Z #6 0x0000005561527ac8 in publish_ipc_message(Aws::Greengrass::GreengrassCoreIpcClient*, std::__cxx11::basic_string<char, std::char_traits<char>, Aws::Crt::StlAllocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, Aws::Crt::StlAllocator<char> >, int) (ipcClient=<optimized out>, topic="<snipped for readability>"..., message=..., timeout=<optimized out>) at /root/source/deepstream-app/src/greengrass_ipc_pub.cpp:56.
_____________________________________________________________________________________________-
Edited by: GreengrassUser on Sep 28, 2021 9:20 AM
Edited by: GreengrassUser on Sep 28, 2021 9:20 AM
Hi GreengrassUser,
Thanks for reporting this, looking at the code you posted, I cannot see a specific piece that might be causing this. One note is that you do not need to attempt Connect() every time you want to publish the message, you can do that only once when you create the IPC client in your component initialization/start up code and keep using the IPC client for any IPC operations, any number of times in the component process later, it also means that using it from several threads to publish many messages as you're doing should work fine. The SDK maintainers would be able to help better in identifying/fixing this issue, could you please create an issue in the SDK github repo to get their help ? https://github.com/aws/aws-iot-device-sdk-cpp-v2/issues
Thanks,
Shagupta
I have created an issue in the Github, I was able to produce segfaults with the sample app for publishing IPC messages. I am still awaiting AWS follow-up on that.
See: https://github.com/aws/aws-iot-device-sdk-cpp-v2/issues/327