crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 275 forks source link

Slow memory leak in dealer.py #2096

Open DZabavchik opened 10 months ago

DZabavchik commented 10 months ago

Finally found this leak that was haunting for 7+ years

https://github.com/crossbario/crossbar/blob/0089c1ef6fbbb87fc7316088a91f1859fa84eeb0/crossbar/router/dealer.py#L1135-L1139

Zombie invocations remain in _invocations_by_call with references to callee, caller, authorization that will not be GC'd

Testing changes that preserve original caller session ID in InvocationRequest object, so it can be deleted by key from _invocations_by_call with del self._invocations_by_call[invocation_request.caller_session_id, invocation_request.call.request]

Will submit PR shortly