-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When giving dbus send command for AddExternalRoute, otbr-agent crashing #2079
Comments
Hi @gadekula1, could you run this command again but also capture the output of
I was able to get a crash on my setup, but it's a different signal. I'm curious to know if the data is being properly formatted. The
|
Thanks @jdswensen , for reply,
Error org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying cat dbus.log signal time=1698980780.789248 sender=org.freedesktop.DBus -> destination=:1.29 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired (gdb) p aRoute.mPrefix can we get complete/working dbus send command for AddExternalRoute if possible? |
now we are able to pass values correctly ((ayy)y(bbbbbbb)). method call time=1672542658.774958 sender=:1.44 -> destination=io.openthread.BorderRouter.wpan0 serial=2 path=/io/openthread/BorderRouter/wpan0; interface=io.openthread.BorderRouter.wpan0; member=AddOnMeshPrefix AddOnMeshPrefix method from Introspect
|
For the issue in #2079 (comment), I've sent #2126 which should be able to fix the issue. @gadekula1 could you cherry-pick it and have a try? |
@superwhd Now calling OnMeshPrefixes method with c++ dbus code with below parameters method call time=1672532690.284219 sender=:1.22 -> destination=io.openthread.BorderRouter.wpan0 serial=2 path=/io/openthread/BorderRouter/wpan0; interface=io.openthread.BorderRouter; member=AddOnMeshPrefix Result of OnMeshPrefixes get property dbus_test# dbus-send --system --print-reply --dest=io.openthread.BorderRouter.wpan0 /io/openthread/BorderRouter/wpan Note we tried to call method with dbus-send command but otbr-agent crashing dbus-send --system --print-reply --dest=io.openthread.BorderRouter.wpan0 /io/openthread/BorderRouter/wpan logs of dbus monitor unable send parameters in structure format using dbus-send. can we know how to pass parameters properly using dbus-send command. |
I reproduced the crash issue via I'm not sure if the payload of BTW, I was able to call this API using
|
@superwhd dbus-send --system --print-reply --dest=io.openthread.BorderRouter.wpan0 /io/openthread/BorderRouter/wpan0 io.opent not implemented error for PermitUnsecureJoin dbus-send --system --print-reply --dest=io.openthread.BorderRouter.wpan0 /io/openthread/BorderRouter/wpan0 io.openth |
@gadekula1 I think your payload is different from the expected type. The prefix byte array (array:byte:0x00,0x11) and the prefix length (byte:0x01) should be wrapped into a struct. However, I'm not sure how to send a struct as argument via For your reference, here's how I called
|
@superwhd, Thanks, applied #2128 locally, now no crash observed for AddExternalRoute and AddOnMeshPrefix methods dbus-send --system --print-reply --dest=io.openthread.BorderRouter.wpan0 /io/openthread/BorderRouter/wpan0 dbus-send --system --print-reply --dest=io.openthread.BorderRouter.wpan0 /io/openthread/BorderRouter/wpan0 |
Resolved by #2128 |
When giving dbus send command for AddExternalRoute, otbr-agent crashing
please find below dbus send command
dbus-send --system --print-reply --dest=io.openthread.BorderRouter.wpan0 /io/openthread/BorderRouter/wpan0 io.openthread.BorderRouter.AddExternalRoute array:byte:0x00,0x11 byte:0x01 uint16:byte:bool:bool:0x1111:0x01:0x00:0x00
log of otbr-agent:
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.416 [C] Platform------: ------------------ BEGINNING OF CRASH -------------
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.416 [C] Platform------: *** FATAL ERROR: Caught signal: 11 (Segmentation fault)
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 0: /usr/sbin/otbr-agent(+0x2ce968) [0x555cb9e968]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 1: /usr/sbin/otbr-agent(+0x2ceaac) [0x555cb9eaac]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 2: linux-vdso.so.1 __kernel_rt_sigreturn+0x0 [0x97ec27a8]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 3: /lib/aarch64-linux-gnu/libdbus-1.so.3 _dbus_type_reader_recurse+0x1e0 [0x97e370e0]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 4: /usr/sbin/otbr-agent otbr::DBus::DBusMessageExtract(DBusMessageIter*, otbr::DBus::Ip6Prefix&)+0x24 [0x5ccba744]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 5: /usr/sbin/otbr-agent otbr::DBus::DBusMessageExtract(DBusMessageIter*, otbr::DBus::ExternalRoute&)+0x30 [0x5ccba9a0]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 6: /usr/sbin/otbr-agent otbr::DBus::DBusMessageIterFor<1ul, 1ul, otbr::DBus::ExternalRoute&>::ConvertToTuple(DBusMessageIter*, std::tupleotbr::DBus::ExternalRoute&&)+0x28 [0x5cb44a3c]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 7: /usr/sbin/otbr-agent otbrError otbr::DBus::ConvertToTupleotbr::DBus::ExternalRoute&(DBusMessageIter*, std::tupleotbr::DBus::ExternalRoute&&)+0x1c [0x5cb4098c]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 8: /usr/sbin/otbr-agent otbrError otbr::DBus::DBusMessageToTupleotbr::DBus::ExternalRoute&(DBusMessage&, std::tupleotbr::DBus::ExternalRoute&&)+0x50 [0x5cb3c378]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: # 9: /usr/sbin/otbr-agent otbr::DBus::DBusThreadObject::AddExternalRouteHandler(otbr::DBus::DBusRequest&)+0x64 [0x5cb33c00]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: #10: /usr/sbin/otbr-agent void std::__invoke_impl<void, void (otbr::DBus::DBusThreadObject::&)(otbr::DBus::DBusRequest&), otbr::DBus::DBusThreadObject&, otbr::DBus::DBusRequest&>(std::__invoke_memfun_deref, void (otbr::DBus::DBusThreadObject::&)(otbr::DBus::DBusRequest&), otbr::DBus::DBusThreadObject&, otbr::DBus::DBusRequest&)+0x90 [0x5cb4e780]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: #11: /usr/sbin/otbr-agent std::__invoke_result<void (otbr::DBus::DBusThreadObject::&)(otbr::DBus::DBusRequest&), otbr::DBus::DBusThreadObject&, otbr::DBus::DBusRequest&>::type std::__invoke<void (otbr::DBus::DBusThreadObject::&)(otbr::DBus::DBusRequest&), otbr::DBus::DBusThreadObject&, otbr::DBus::DBusRequest&>(void (otbr::DBus::DBusThreadObject::&)(otbr::DBus::DBusRequest&), otbr::DBus::DBusThreadObject&, otbr::DBus::DBusRequest&)+0x50 [0x5cb4cd00]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: #12: /usr/sbin/otbr-agent void std::_Bind<void (otbr::DBus::DBusThreadObject::(otbr::DBus::DBusThreadObject, std::_Placeholder<1>))(otbr::DBus::DBusRequest&)>::__call<void, otbr::DBus::DBusRequest&, 0ul, 1ul>(std::tupleotbr::DBus::DBusRequest&&&, std::_Index_tuple<0ul, 1ul>)+0x68 [0x5cb4b144]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: #13: /usr/sbin/otbr-agent void std::_Bind<void (otbr::DBus::DBusThreadObject::(otbr::DBus::DBusThreadObject, std::_Placeholder<1>))(otbr::DBus::DBusRequest&)>::operator()<otbr::DBus::DBusRequest&, void>(otbr::DBus::DBusRequest&)+0x44 [0x5cb496d4]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: #14: /usr/sbin/otbr-agent void std::__invoke_impl<void, std::_Bind<void (otbr::DBus::DBusThreadObject::(otbr::DBus::DBusThreadObject, std::_Placeholder<1>))(otbr::DBus::DBusRequest&)>&, otbr::DBus::DBusRequest&>(std::__invoke_other, std::_Bind<void (otbr::DBus::DBusThreadObject::(otbr::DBus::DBusThreadObject, std::_Placeholder<1>))(otbr::DBus::DBusRequest&)>&, otbr::DBus::DBusRequest&)+0x38 [0x5cb47174]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: #15: /usr/sbin/otbr-agent std::enable_if<std::_and<std::is_void, std::__is_invocable<std::_Bind<void (otbr::DBus::DBusThreadObject::(otbr::DBus::DBusThreadObject, std::_Placeholder<1>))(otbr::DBus::DBusRequest&)>&, otbr::DBus::DBusRequest&> >::value, void>::type std::__invoke_r<void, std::_Bind<void (otbr::DBus::DBusThreadObject::(otbr::DBus::DBusThreadObject, std::_Placeholder<1>))(otbr::DBus::DBusRequest&)>&, otbr::DBus::DBusRequest&>(std::_Bind<void (otbr::DBus::DBusThreadObject::(otbr::DBus::DBusThreadObject, std::_Placeholder<1>))(otbr::DBus::DBusRequest&)>&, otbr::DBus::DBusRequest&)+0x38 [0x5cb43468]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.427 [C] Platform------: #16: /usr/sbin/otbr-agent std::_Function_handler<void (otbr::DBus::DBusRequest&), std::_Bind<void (otbr::DBus::DBusThreadObject::(otbr::DBus::DBusThreadObject, std::_Placeholder<1>))(otbr::DBus::DBusRequest&)> >::_M_invoke(std::_Any_data const&, otbr::DBus::DBusRequest&)+0x34 [0x5cb3f344]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #17: /usr/sbin/otbr-agent std::function<void (otbr::DBus::DBusRequest&)>::operator()(otbr::DBus::DBusRequest&) const+0x4c [0x5cb523bc]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #18: /usr/sbin/otbr-agent otbr::DBus::DBusObject::MessageHandler(DBusConnection*, DBusMessage*)+0x15c [0x5cb50f20]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #19: /usr/sbin/otbr-agent otbr::DBus::DBusObject::sMessageHandler(DBusConnection*, DBusMessage*, void*)+0x2c [0x5cb50dbc]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #20: /lib/aarch64-linux-gnu/libdbus-1.so.3(+0x29aa8) [0x7f97e42aa8]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #21: /lib/aarch64-linux-gnu/libdbus-1.so.3 dbus_connection_dispatch+0x4e4 [0x97e30e84]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #22: /usr/sbin/otbr-agent otbr::DBus::DBusAgent::Process(otSysMainloopContext const&)+0x210 [0x5cb28214]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #23: /usr/sbin/otbr-agent otbr::MainloopManager::Process(otSysMainloopContext const&)+0x7c [0x5cca4ac8]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #24: /usr/sbin/otbr-agent otbr::Application::Run()+0x204 [0x5cb1692c]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #25: /usr/sbin/otbr-agent(+0x248084) [0x555cb18084]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #26: /usr/sbin/otbr-agent main+0x88 [0x5cb18244]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #27: /lib/aarch64-linux-gnu/libc.so.6 __libc_start_main+0xe8 [0x97992e18]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: #28: /usr/sbin/otbr-agent(+0x246388) [0x555cb16388]
Oct 23 14:35:33 raspberrypi otbr-agent[1854]: 00:00:05.428 [C] Platform------: ------------------ END OF CRASH ------------------
Oct 23 14:35:33 raspberrypi systemd[1]: otbr-agent.service: Main process exited, code=killed, status=11/SEGV
Oct 23 14:35:33 raspberrypi systemd[1]: otbr-agent.service: Failed with result 'signal'.
seems like passing parameters is not in correct way
can we get examples of dbus commands for RemoveOnMeshPrefix, AddExternalRoute , basically the methods which are having structure as parameters
and also we want to knoe how to get signagls using dbus when there is a change in thread properties
The text was updated successfully, but these errors were encountered: