#989035 nyx: leaks memory

#989035#5
Date:
2021-05-24 08:03:25 UTC
From:
To:
nyx leaks memory, 262144 (== 64*4096) bytes every 5 seconds in my case.
Under Buster it didn't.

Running

  strace -e trace=mmap -v -ttt -f -p $(pgrep nyx)

shows calls to

  99483: mmap(NULL, 262144, ...)

every 5 seconds.  Running

  dd if=/proc/$(pgrep nyx)/task/99483/mem bs=4096 count=64 skip=$((0x7f37bfe80000/4096))|xxd

tells me it's the information from the Connection window.  Running
(which needs 6cd89c4[1] applied first):

  nyx --debug /tmp/nyx.debug

reveals that nyx queries the circuit information ("GETINFO
circuit-status") into a variable LAST_RETRIEVED_CIRCUITS every 5
seconds in
/usr/lib/python3/dist-packages/nyx/panel/connection.py:_update

I suspect something prevents the allocated data from being GCed.

N.B.: I also tested with onioncircuits to see if the bug might be in
stem, but it showed no sign of leaking.