You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using CommonAPI dbus for my application. In application (x86), I have use case to get the attribute from server using async call. When I execute async call, it leads to crash at client side.
This crash behavior is seen if the attribute is configured as "DBusDefaultAttributeType = freedesktop" and observed for attribute type uint and int. Similar tested for string and bool attribute type, issue behavior is not seen.
Hi,
I am using CommonAPI dbus for my application. In application (x86), I have use case to get the attribute from server using async call. When I execute async call, it leads to crash at client side.
This crash behavior is seen if the attribute is configured as "DBusDefaultAttributeType = freedesktop" and observed for attribute type uint and int. Similar tested for string and bool attribute type, issue behavior is not seen.
For experiment, I have tried https://github.com/GENIVI/capicxx-core-tools/tree/master/CommonAPI-Examples/E02Attributes example application and added get attribute async call. Still the crash issue is observed.
Please find the library versions used in application,
CommonAPI core - 3.1.12.6
CommonAPI dbus - 3.1.12.11
dbus - 1.10.10
Crash call stack log available below,
ASAN:DEADLYSIGNAL
==76602==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000f4241 (pc 0x55a29de98f4d bp 0x7fee003fd160 sp 0x7fee003fd140 T2)
==76602==The signal is caused by a READ memory access.
#0 0x55a29de98f4c in CommonAPI::DBus::DBusTypeOutputStream::writeType(unsigned int const&, CommonAPI::DBus::IntegerDeployment const*) /home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/include/CommonAPI/DBus/DBusTypeOutputStream.hpp:65
#1 0x55a29dec16fd in CommonAPI::DBus::ApplyTypeCompareVisitor<CommonAPI::DBus::TypeCompareVisitor, CommonAPI::Variant, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment, unsigned int>::visit(CommonAPI::DBus::TypeCompareVisitor&, CommonAPI::Variant const&, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment const*, unsigned char&) /home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/include/CommonAPI/DBus/DBusFreedesktopVariant.hpp:42
#2 0x55a29debb110 in CommonAPI::InputStreamCommonAPI::DBus::DBusInputStream& CommonAPI::DBus::DBusInputStream::readValue<CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment, unsigned int>(CommonAPI::Variant&, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment const*) /home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/include/CommonAPI/DBus/DBusInputStream.hpp:197
#3 0x55a29deb3bdd in CommonAPI::InputStreamCommonAPI::DBus::DBusInputStream& CommonAPI::InputStreamCommonAPI::DBus::DBusInputStream::readValue<CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment, unsigned int>(CommonAPI::Variant&, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment const*) /home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-core-runtime/include/CommonAPI/InputStream.hpp:106
#4 0x55a29deb03f9 in CommonAPI::InputStreamCommonAPI::DBus::DBusInputStream& CommonAPI::operator>><CommonAPI::DBus::DBusInputStream, CommonAPI::Variant, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment >(CommonAPI::InputStreamCommonAPI::DBus::DBusInputStream&, CommonAPI::Deployable<CommonAPI::Variant, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment >&) /home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-core-runtime/include/CommonAPI/InputStream.hpp:236
#5 0x55a29deac57c in CommonAPI::SerializableArguments<CommonAPI::DBus::DBusInputStream, CommonAPI::DBus::DBusOutputStream, CommonAPI::Deployable<CommonAPI::Variant, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment > >::deserialize(CommonAPI::InputStreamCommonAPI::DBus::DBusInputStream&, CommonAPI::Deployable<CommonAPI::Variant, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment >&) (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/build/E02AttributesClient+0xcd57c)
#6 0x55a29decca7f in CommonAPI::CallStatus CommonAPI::DBus::DBusProxyAsyncCallbackHandler<CommonAPI::DBus::DBusProxy, CommonAPI::Deployable<CommonAPI::Variant, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment > >::handleDBusMessageReply<0>(CommonAPI::CallStatus, CommonAPI::DBus::DBusMessage const&, CommonAPI::DBus::index_sequence<0>, std::tuple<CommonAPI::Deployable<CommonAPI::Variant, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment > >&) const (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/build/E02AttributesClient+0xeda7f)
#7 0x55a29decb478 in CommonAPI::DBus::DBusProxyAsyncCallbackHandler<CommonAPI::DBus::DBusProxy, CommonAPI::Deployable<CommonAPI::Variant, CommonAPI::DBus::VariantDeploymentCommonAPI::DBus::IntegerDeployment > >::onDBusMessageReply(CommonAPI::CallStatus const&, CommonAPI::DBus::DBusMessage const&) (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/build/E02AttributesClient+0xec478)
#8 0x7fee063ce4d7 in CommonAPI::DBus::DBusConnection::onLibdbusPendingCall(DBusPendingCall*, CommonAPI::DBus::DBusMessage const&, CommonAPI::DBus::DBusProxyConnection::DBusMessageReplyAsyncHandler*) const /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusConnection.cpp:608
#9 0x7fee063ce725 in CommonAPI::DBus::DBusConnection::onLibdbusPendingCallNotifyThunk(DBusPendingCall*, void*) /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusConnection.cpp:642
#10 0x7fee0487bed1 in complete_pending_call_and_unlock /home/aan9cob/sampleApp/CommonAPI/dbus/dbus/dbus/dbus-connection.c:2330
#11 0x7fee0487fb5e in dbus_connection_dispatch /home/aan9cob/sampleApp/CommonAPI/dbus/dbus/dbus/dbus-connection.c:4802
#12 0x7fee063d0a52 in CommonAPI::DBus::DBusConnection::singleDispatch() /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusConnection.cpp:1004
#13 0x7fee06441845 in CommonAPI::DBus::DBusDispatchSource::dispatch() /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusMainLoopContext.cpp:43
#14 0x7fee064365ab in CommonAPI::DBus::DBusMainLoop::dispatch() /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusMainLoop.cpp:579
#15 0x7fee064355b7 in CommonAPI::DBus::DBusMainLoop::doSingleIteration(long const&) /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusMainLoop.cpp:342
#16 0x7fee06434d4f in CommonAPI::DBus::DBusMainLoop::run(long const&) /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusMainLoop.cpp:212
#17 0x7fee063cb454 in CommonAPI::DBus::DBusConnection::dispatch() /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusConnection.cpp:156
#18 0x7fee063fe5fc in void std::__invoke_impl<void, void (CommonAPI::DBus::DBusConnection::&)(), std::shared_ptrCommonAPI::DBus::DBusConnection&>(std::__invoke_memfun_deref, void (CommonAPI::DBus::DBusConnection::&)(), std::shared_ptrCommonAPI::DBus::DBusConnection&) (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/build/libCommonAPI-DBus.so.3.1.12+0x3c55fc)
#19 0x7fee063fa1c4 in std::__invoke_result<void (CommonAPI::DBus::DBusConnection::&)(), std::shared_ptrCommonAPI::DBus::DBusConnection&>::type std::__invoke<void (CommonAPI::DBus::DBusConnection::&)(), std::shared_ptrCommonAPI::DBus::DBusConnection&>(void (CommonAPI::DBus::DBusConnection::&)(), std::shared_ptrCommonAPI::DBus::DBusConnection&) (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/build/libCommonAPI-DBus.so.3.1.12+0x3c11c4)
#20 0x7fee063f38c3 in void std::_Bind<void (CommonAPI::DBus::DBusConnection::(std::shared_ptrCommonAPI::DBus::DBusConnection))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/build/libCommonAPI-DBus.so.3.1.12+0x3ba8c3)
#21 0x7fee063ec389 in void std::_Bind<void (CommonAPI::DBus::DBusConnection::(std::shared_ptrCommonAPI::DBus::DBusConnection))()>::operator()<, void>() /usr/include/c++/7/functional:551
#22 0x7fee063e4c82 in void std::__invoke_impl<void, std::_Bind<void (CommonAPI::DBus::DBusConnection::(std::shared_ptrCommonAPI::DBus::DBusConnection))()>>(std::__invoke_other, std::_Bind<void (CommonAPI::DBus::DBusConnection::(std::shared_ptrCommonAPI::DBus::DBusConnection))()>&&) /usr/include/c++/7/bits/invoke.h:60
#23 0x7fee063deb8d in std::__invoke_result<std::_Bind<void (CommonAPI::DBus::DBusConnection::(std::shared_ptrCommonAPI::DBus::DBusConnection))()>>::type std::__invoke<std::_Bind<void (CommonAPI::DBus::DBusConnection::(std::shared_ptrCommonAPI::DBus::DBusConnection))()>>(std::_Bind<void (CommonAPI::DBus::DBusConnection::(std::shared_ptrCommonAPI::DBus::DBusConnection))()>&&) (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/build/libCommonAPI-DBus.so.3.1.12+0x3a5b8d)
#24 0x7fee06408099 in decltype (__invoke((_S_declval<0ul>)())) std::thread::_Invoker<std::tuple<std::_Bind<void (CommonAPI::DBus::DBusConnection::(std::shared_ptrCommonAPI::DBus::DBusConnection))()> > >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/build/libCommonAPI-DBus.so.3.1.12+0x3cf099)
#25 0x7fee06407c66 in std::thread::_Invoker<std::tuple<std::_Bind<void (CommonAPI::DBus::DBusConnection::(std::shared_ptrCommonAPI::DBus::DBusConnection))()> > >::operator()() (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/build/libCommonAPI-DBus.so.3.1.12+0x3cec66)
#26 0x7fee06407697 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<std::_Bind<void (CommonAPI::DBus::DBusConnection::*(std::shared_ptrCommonAPI::DBus::DBusConnection))()> > > >::_M_run() (/home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/build/libCommonAPI-DBus.so.3.1.12+0x3ce697)
#27 0x7fee05d6d6de (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbd6de)
#28 0x7fee058806da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
#29 0x7fee055a971e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x12171e)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-dbus-runtime/include/CommonAPI/DBus/DBusTypeOutputStream.hpp:65 in CommonAPI::DBus::DBusTypeOutputStream::writeType(unsigned int const&, CommonAPI::DBus::IntegerDeployment const*)
Thread T2 created by T0 here:
#0 0x7fee069e5d2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x37d2f)
#1 0x7fee05d6d994 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_deletestd::thread::_State >, void (*)()) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbd994)
#2 0x7fee063cd148 in CommonAPI::DBus::DBusConnection::connect(CommonAPI::DBus::DBusError&, bool) /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusConnection.cpp:391
#3 0x7fee063ccbf6 in CommonAPI::DBus::DBusConnection::connect(bool) /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusConnection.cpp:342
#4 0x7fee06413ab8 in CommonAPI::DBus::Factory::getConnection(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusFactory.cpp:295
#5 0x7fee064119ca in CommonAPI::DBus::Factory::createProxy(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-dbus-runtime/src/CommonAPI/DBus/DBusFactory.cpp:94
#6 0x7fee0679c69b in CommonAPI::Runtime::createProxyHelper(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool) /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-core-runtime/src/CommonAPI/Runtime.cpp:447
#7 0x7fee067a2478 in CommonAPI::Runtime::createProxy(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) /home/aan9cob/sampleApp/CommonAPI/dbus/capicxx-core-runtime/src/CommonAPI/Runtime.cpp:265
#8 0x55a29def458e in std::shared_ptr<v1::commonapi::examples::E02AttributesProxy<> > CommonAPI::Runtime::buildProxyv1::commonapi::examples::E02AttributesProxy(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) /home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/../capicxx-core-runtime/include/CommonAPI/Runtime.hpp:51
#9 0x55a29def2e7c in main /home/aan9cob/sampleApp/CommonAPI/dbus/E02Attributes/src/E02AttributesClient.cpp:48
#10 0x7fee054a9bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
==76602==ABORTING
The text was updated successfully, but these errors were encountered: