Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Cyclic dependency while building tcp_replication error in 1.12.0 #7169

Closed
Half-Shot opened this issue Mar 30, 2020 · 2 comments
Closed

Cyclic dependency while building tcp_replication error in 1.12.0 #7169

Half-Shot opened this issue Mar 30, 2020 · 2 comments

Comments

@Half-Shot
Copy link
Collaborator

Updating to 1.12.0 from 1.11.0 today, and found that my synchronous have stopped working and are displaying this error when handling requests. I can't see any warnings in CHANGES.md of package breakages so I'm not sure what's going on here.

2020-03-30 11:03:19,111 - synapse.http.server - 110 - ERROR - GET-292- Failed handle request via 'SyncRestServlet': <XForwardedForRequest at 0x7f0da79160f0 method='GET' uri='/_matrix/client/r0/sync?filter=174&timeout=30000&since=s36342669_269113417_0_17571341_303994_1359_188889_1109467_48' clientproto='HTTP/1.0' site=8018>
Traceback (most recent call last):
  File "/opt/synapse/lib/python3.7/site-packages/synapse/http/server.py", line 78, in wrapped_request_handler
    await h(self, request)
  File "/opt/synapse/lib/python3.7/site-packages/synapse/http/server.py", line 331, in _async_render
    callback_return = await callback_return
  File "/opt/synapse/lib/python3.7/site-packages/synapse/rest/client/v2_alpha/sync.py", line 96, in on_GET
    requester = await self.auth.get_user_by_req(request, allow_guest=True)
  File "/opt/synapse/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/synapse/lib/python3.7/site-packages/synapse/api/auth.py", line 232, in get_user_by_req
    device_id=device_id,
  File "/opt/synapse/lib/python3.7/site-packages/synapse/replication/slave/storage/client_ips.py", line 47, in insert_client_ip
    self.hs.get_tcp_replication().send_user_ip(
  File "/opt/synapse/lib/python3.7/site-packages/synapse/server.py", line 565, in _get
    raise ValueError("Cyclic dependency while building %s" % (depname,))
ValueError: Cyclic dependency while building tcp_replication
@Half-Shot
Copy link
Collaborator Author

Rolling back to 1.11.0 seemed to fix this, so something may have changed.

@richvdh
Copy link
Member

richvdh commented Mar 30, 2020

I think this is just a symptom of #7130. I'll raise a PR to fix the confusing error message though.

richvdh added a commit that referenced this issue Mar 30, 2020
If there was an exception setting up one of the attributes of the Homeserver
god object, then future attempts to fetch that attribute would raise a
confusing "Cyclic dependency" error. Let's make sure that we clear the
`building` flag so that we just get the original exception.

Ref: #7169
richvdh added a commit that referenced this issue Mar 31, 2020
If there was an exception setting up one of the attributes of the Homeserver
god object, then future attempts to fetch that attribute would raise a
confusing "Cyclic dependency" error. Let's make sure that we clear the
`building` flag so that we just get the original exception.

Ref: #7169
@richvdh richvdh closed this as completed Apr 1, 2020
phil-flex pushed a commit to phil-flex/synapse that referenced this issue Jun 16, 2020
…rix-org#7178)

If there was an exception setting up one of the attributes of the Homeserver
god object, then future attempts to fetch that attribute would raise a
confusing "Cyclic dependency" error. Let's make sure that we clear the
`building` flag so that we just get the original exception.

Ref: matrix-org#7169
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants