Replies: 5 comments 14 replies
-
Hello @colazzo, I don't know. It might be a libsystemd limitation? It might be a python-sdbus limitation? Might be a bus implementation limit? What was the method type signature you have used? A string Also what version of python-sdbus are you using and how did you install it? |
Beta Was this translation helpful? Give feedback.
-
It is string type. The thing is that the same full string copied in D-Spy client was working fine. I am using latest official version 0.11.1. |
Beta Was this translation helpful? Give feedback.
-
Hmmm. I tested the 442_368 length string and it seems to be sometimes working meaning there is probably some kind of race condition? |
Beta Was this translation helpful? Give feedback.
-
@colazzo I think I narrowed down the issue. It has to do something with the epoll and how python-sdbus watches the file descriptor. I added this code to manually process sd-bus and sending the extremely large string worked: diff --git a/src/sdbus/dbus_proxy_async_method.py b/src/sdbus/dbus_proxy_async_method.py
index f7d39c1..a2a0bfa 100644
--- a/src/sdbus/dbus_proxy_async_method.py
+++ b/src/sdbus/dbus_proxy_async_method.py
@@ -85,8 +85,16 @@ class DbusMethodAsyncProxyBind(DbusMethodAsyncBaseBind):
self.__doc__ = dbus_method.__doc__
async def _dbus_async_call(self, call_message: SdBusMessage) -> Any:
+ from asyncio import sleep
bus = self.proxy_meta.attached_bus
- reply_message = await bus.call_async(call_message)
+ fut = bus.call_async(call_message)
+ while True:
+ bus.drive()
+ await sleep(0.1)
+
+ if fut.done():
+ break
+ reply_message = await fut
return reply_message.get_contents()
@staticmethod |
Beta Was this translation helpful? Give feedback.
-
@colazzo I added the 03593a1 which should fix the issue. I added a unit test to verify the behavior. You can test it by building it from source |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
What would be the max size of payload when calling dbus method?
I encounter an issue when trying to send big amount of data from the client.
It seems to get stuck from 450K bytes and above, on the moment the client does the call with a string value of that size it get stuck.
When calling the method with same amount of data from D-Spy it seems to work on the same service (service is also using python-dbus). I have actually a use case where I need to be be able to send around 900K bytes of data in one method call.
Do you know of any that kind of issue on client side? Is it limited through a parameters somewhere?
Beta Was this translation helpful? Give feedback.
All reactions