Comments (4)
RPyC 5.3.1 seem to work with the currently defined unittests on master for Python 3.12.1, but there are known issues I'm working on the develop branch. Would you be able more details to help reproduce your issue such as provide an example client/server or a failing unittest?
from rpyc.
I think that I was doing something wrong. Do to architecture change I was trying to chain service with rpc client to another rpc service thus creating this type of recursion.
I redesigned architecture of app and refactored the code, so honestly I don't think that old code will help. I will in day or two run framework with client in 3.12.1 and let you know.
It would be nice to know if you don't mind what is that you folks are working one in dev ... If I run into this again I will post here ...
from rpyc.
Hello,
I am confirming now that something is really deadly wrong with RPyC 5.3.1 and py-3.12.1
let me try to describe how our framework works:
py-3.12.1
main app will instantiate all sub-apps via multiprocessing. rpc threaded server is one of does apps. client in this case is part of another vertical stack FASTAPI (mix of sync and async behaviors) and number of metaclass structures representing one or the other software patterns. All of this is tied up with our code so everything works up to invocation of exposed method on rpc threaded server. rpc get's stuck on the protocol side, recursion error pops out and we fail. Now I tested it with py-3.11 and py-3.10.8. Both of these interpreters do a perfect job and no issues were detected.
def root(self): # serving
"""Fetches the root object (service) of the other party"""
if self._remote_root is None:
self._remote_root = self.sync_request(consts.HANDLE_GETROOT)
return self._remote_root
def sync_request(self, handler, *args):
"""requests, sends a synchronous request (waits for the reply to arrive)
:raises: any exception that the requets may be generated
:returns: the result of the request
"""
timeout = self._config["sync_request_timeout"]
_async_res = self.async_request(handler, *args, timeout=timeout)
# _async_res is an instance of AsyncResult, the value property invokes Connection.serve via AsyncResult.wait
# So, the _recvlock can be acquired multiple times by the owning thread and warrants the use of RLock
return _async_res.value
some of the traceback...
2024-02-07 16:58:37,739 - INFO - 1680823 - server.py:200 server:_serve_client - welcome ('10.197.136.73', 53908)
2024-02-07 16:59:09,841 - DEBUG - 1680823 - protocol.py:366 protocol:_dispatch_request - Exception caught
Traceback (most recent call last):
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/protocol.py", line 358, in _dispatch_request
args = self._unbox(args)
^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/protocol.py", line 324, in _unbox
return tuple(self._unbox(item) for item in value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/protocol.py", line 324, in
return tuple(self._unbox(item) for item in value)
^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/protocol.py", line 333, in _unbox
proxy = self._netref_factory(id_pack)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/protocol.py", line 353, in _netref_factory
return cls(self, id_pack)
^^^^^^^^^^^^^^^^^^
File "/data1/kacans2/.pycharm_helpers/pydev/_pydevd_bundle/pydevd_pep_669_tracing.py", line 498, in call
frame = self.frame
^^^^^^^^^^
File "/data1/kacans2/.pycharm_helpers/pydev/_pydevd_bundle/pydevd_pep_669_tracing.py", line 41, in frame
while frame and isinstance(frame.f_locals.get('self'), PEP669CallbackBase):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/netref.py", line 133, in getattribute
cls = object.__getattribute__(self, "__class__")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/netref.py", line 291, in get
return self.owner if netref_instance.____id_pack__[2] == 0 else self.instance
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/netref.py", line 153, in getattr
return syncreq(self, consts.HANDLE_GETATTR, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/netref.py", line 63, in syncreq
return conn.sync_request(handler, proxy, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/protocol.py", line 715, in sync_request
_async_res = self.async_request(handler, *args, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/protocol.py", line 742, in async_request
self._async_request(handler, args, res)
File "/cube/api/py-3.12.1/lib/python3.12/site-packages/rpyc/core/protocol.py", line 724, in _async_request
self._send(consts.MSG_REQUEST, seq, (handler, self._box(args)))
^^^^^^^^^^^^^^^
Regards,
from rpyc.
Hello,
Is there anything else wee can do on this issue...
from rpyc.
Related Issues (20)
- pyproject.toml value for license key should be a table, not a string HOT 1
- ervice HOT 1
- Large list of dicts transmit inefficiently as netref HOT 2
- How to poll an AsyncResult without blocking? HOT 3
- using rpyc as build in proxy in app to dispatch message to remote clinet
- How to cancel all the pending requests at the server?
- 5.3.1: sphinx warnings `reference target not found` HOT 2
- 5.3.1: pytest is failing in `tests/test_win32pipes.py::Test_NamedPipe::test_rpyc` unit HOT 6
- server side call client side callback function not work HOT 1
- Documentation on how to start/stop/reload/restart a RPyC service via systemctl services
- Compatibility issue with urllib3
- Allow a Server to expose multiple Services
- rpyc zerodeploy EOF during classic_connect (linux only)
- Specify a point of contact for security-related issues HOT 1
- ValueError: invalid message type: 18 between Server 5.0.1 and Client 6.0.0 HOT 2
- AttributeError: 'dict' object has no attribute 'shape'
- unix-socket unexpectetly closed by client
- ThreadedServer Signal Handling: Shutting down a server by a remote call accept by service? HOT 4
- 6.0.0: pytest fails in 6 units HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpyc.