Skip to content
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

Connection hangs with debug logging enabled, causing socket.timeout errors #207

awlodge opened this issue Jan 4, 2017 · 0 comments


Copy link

@awlodge awlodge commented Jan 4, 2017

Running RPyC tip code, the following code doesn't work:

import logging
from rpyc.utils.zerodeploy import DeployedServer
from plumbum.machines.paramiko_machine import ParamikoMachine
from paramiko import AutoAddPolicy


p = ParamikoMachine("localhost", missing_host_policy=AutoAddPolicy())
s = DeployedServer(p)
r = s.classic_connect()

# Configure logging, so that remote logging events are correctly
# passed to the local logger to be handled.
rlogger = r.modules.logging.getLogger()

# If this is set to a log level higher than DEBUG, the bug doesn't reproduce.

It hits a socket.timeout error after 30 seconds:

Traceback (most recent call last):
  File "", line 14, in <module>
  File "/home/rpyc/rpyc/core/", line 148, in __getattribute__
    return syncreq(self, consts.HANDLE_GETATTR, name)
  File "/home/rpyc/rpyc/core/", line 71, in syncreq
    return conn.sync_request(handler, oid, *args)
  File "/home/rpyc/rpyc/core/", line 467, in sync_request
    raise socket.timeout

It seems to hang indefinitely, even manually setting SYNC_REQUEST_TIMEOUT in rpyc/core/ to five minutes hits the same error (after five minutes).

Digging into it, it looks like this is caused by 8c8481a - reverting this commit causes the bug to no longer reproduce.

@coldfix coldfix closed this in 3f1cc1e Jul 28, 2017
coldfix added a commit that referenced this issue Aug 7, 2017
- Fix refcount leakage when unboxing from cache (#196)
- Fix TypeError when dispatching exceptions on py2 (unicode)
- Respect ``rpyc_protocol_config`` for default Service getattr (#202)
- Support unix domain sockets (#100,#208)
- Use first accessible server in ``connect_by_service`` (#220)
- Fix deadlock problem with logging (#207,#212)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant