synapse-old/synapse
Richard van der Hoff f22e7cda2c Fix a class of logcontext leaks
So, it turns out that if you have a first `Deferred` `D1`, you can add a
callback which returns another `Deferred` `D2`, and `D2` must then complete
before any further callbacks on `D1` will execute (and later callbacks on `D1`
get the *result* of `D2` rather than `D2` itself).

So, `D1` might have `called=True` (as in, it has started running its
callbacks), but any new callbacks added to `D1` won't get run until `D2`
completes - so if you `yield D1` in an `inlineCallbacks` function, your `yield`
will 'block'.

In conclusion: some of our assumptions in `logcontext` were invalid. We need to
make sure that we don't optimise out the logcontext juggling when this
situation happens. Fortunately, it is easy to detect by checking `D1.paused`.
2018-05-02 11:58:00 +01:00
..
api Apply some limits to depth to counter abuse 2018-05-01 17:54:19 +01:00
app Merge remote-tracking branch 'origin/develop' into rav/use_run_in_background 2018-04-27 14:31:23 +01:00
appservice Merge remote-tracking branch 'origin/develop' into rav/use_run_in_background 2018-04-27 14:31:23 +01:00
config Merge pull request #3085 from NotAFile/py3-config-text-mode 2018-04-30 01:00:23 +01:00
crypto Fixes #3135 - Replace _OpenSSLECCurve with crypto.get_elliptic_curve (#3157) 2018-04-30 16:21:11 +01:00
events add comment explaining attributeerror 2018-04-30 09:49:10 +02:00
federation Merge branch 'release-v0.28.1' into develop 2018-05-01 18:16:57 +01:00
groups Merge remote-tracking branch 'origin/develop' into rav/use_run_in_background 2018-04-27 14:31:23 +01:00
handlers Merge branch 'release-v0.28.1' into develop 2018-05-01 18:16:57 +01:00
http Merge pull request #3154 from NotAFile/py3-stringio 2018-04-30 00:59:04 +01:00
metrics s/list/tuple 2018-04-12 11:19:04 +01:00
module_api Delete devices in various logout situations 2017-11-29 16:44:35 +00:00
push Merge pull request #3152 from NotAFile/py3-local-imports 2018-04-30 01:28:13 +01:00
replication make imports local 2018-04-28 13:41:41 +02:00
rest add guard for None on purge_history api 2018-04-30 14:29:48 +02:00
static/client Updates to fallback CAS login to do new token login 2015-11-06 09:57:17 +00:00
storage Merge pull request #3129 from matrix-org/matthew/fix_group_dups 2018-04-30 11:47:25 +01:00
streams replace 'except:' with 'except Exception:' 2017-10-23 15:52:32 +01:00
util Fix a class of logcontext leaks 2018-05-02 11:58:00 +01:00
__init__.py update changelog and bump version to 0.28.0 2018-04-26 15:51:39 +01:00
event_auth.py Fix templating error with unban permission message 2018-01-07 19:52:58 -07:00
notifier.py Merge remote-tracking branch 'origin/develop' into rav/deferred_timeout 2018-04-27 14:18:00 +01:00
python_dependencies.py Miscellaneous fixes to python_dependencies 2018-05-01 18:13:54 +01:00
server.py Split RoomMemberWorkerHandler to separate file 2018-03-14 11:41:45 +00:00
server.pyi Factor out resolve_state_groups to a separate handler 2018-02-01 12:40:04 +00:00
state.py Measure time it takes to calculate state group ID 2018-03-28 11:03:52 +01:00
types.py In DomainSpecificString, override __repr__ in addition to __str__ 2018-04-10 11:35:29 +02:00
visibility.py Remove preserve_context_over_{fn, deferred} 2017-11-14 11:22:42 +00:00