crossbario / crossbar

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

Bug #2096 memory leak in dealer.py #2097

Closed DZabavchik closed 10 months ago

DZabavchik commented 10 months ago

Fixes memory leak in dealer where InvocationRequest are not removed from _invocations_by_call dict when caller is already gone. Invocation requests retain references to session objects and others, exacerbating the leak.

Partition of a set of 6356 objects. Total size = 779728 bytes.
 Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)
     0   1158  18   227160  29    227160  29 dict (no owner)
     1    163   3    72072   9    299232  38 set
     2    735  12    64030   8    363262  47 str
     3     50   1    58800   8    422062  54 dict of
                                             crossbar.router.protocol.WampRawSocketServerProtocol
     4    887  14    54280   7    476342  61 tuple
     5    339   5    21696   3    498038  64 types.MethodType
     6     54   1    21600   3    519638  67 dict of crossbar.router.session.RouterSession
     7    270   4    21600   3    541238  69 functools.partial
     8    339   5    21520   3    562758  72 list
     9     32   1    15736   2    578494  74 types.FrameType
DZabavchik commented 10 months ago

There were a lot more resource leaks found (memory, sockets)

oberstet commented 10 months ago

There were a lot more resource leaks found (memory, sockets)

when you say "were found": did you search for and find leaks? or who did? and how? what's the tool the produced above output? leaks are bad obviously and would need fixing ..