Peter Saveliev
Peter Saveliev
I confirm the RSS increase, tracking the cause.
@luis5tb sorry, I was totally busy with changing the package layout, and thank you for pinging me about the issue. Now switching to this task.
I found so far that some string objects are leaking, ~15 strings per interface creation. Most probably in the RTNL decoding. Though not tracked the source yet. It has nothing...
Yep, that's the parser. Same RSS increase with raw `IPRoute.get_links()`.
… Or not. Anyways, debugging now.
Still not perfect, but a bit better. The code: ```python import gc import objgraph from pyroute2 import NDB objgraph.show_most_common_types(limit=10) for _ in range(1000): ndb = NDB() ndb.close() gc.collect() print('8
I believe that more changes will follow, even this one might be reworked. Thus not closing the ticket.
RSS growth before https://github.com/svinota/pyroute2/commit/97d7d4f2281a1aef4b1808f23b72716b53a0e9c1, 1000 probes  RSS growth after https://github.com/svinota/pyroute2/commit/97d7d4f2281a1aef4b1808f23b72716b53a0e9c1, 1000 probes  Something is still leaking, I will hunt it down.
Is it possible that the nftables are not supported by the kernel you run the code on? I couldn't reproduce.
@pallas np, you're probably right. I just can not reproduce the issue. Do you know the conditions? It works starting at least from kernel version 4.19.x and up to net-next....