#929830 lldpd: Memory usage of lldpd implies memory leak

Package:
lldpd
Source:
lldpd
Description:
implementation of IEEE 802.1ab (LLDP)
Submitter:
Date:
2024-01-15 10:39:02 UTC
Severity:
normal
#929830#5
Date:
2019-06-01 10:53:08 UTC
From:
To:
Dear Maintainer,

my system was slow due to increased memory usage.
htop shows lldpd consuming 425M Res Memory, rapidly increasing.

htop output:
 1264 _lldpd     20   0  471M  425M  1428 D  2.6 69.1     121h lldpd: connected to e-switch-1.

So I conclude lldpd consumed to much memory possibly due to a memory leak.

Regards,
M. Braun

#929830#10
Date:
2019-06-01 11:14:37 UTC
From:
To:
Hi,

while memory usage was increasing, syslog showed (few) lldpd[1264]:
unable to receive netlink answer: No buffer space available messages.

Regards,
M. Braun

#929830#15
Date:
2019-06-01 12:01:21 UTC
From:
To:
 ❦  1 juin 2019 13:14 +02, michael-dev <michael-dev@fami-braun.de>:

I think this may be more a consequence than a cause. The code around
this message seems to correctly handle memory, even in error cases.
Does the issue repeat after a restart?

#929830#20
Date:
2019-06-11 09:36:26 UTC
From:
To:
Hi,

the problem occured on multiple machines. Directly after restart, lldpd
memory usage seems fine, but eventually memory usage starts exploding
again.
The started happening within weeks after upgrading to stretch. All
machines were restartet after upgrading to stretch.

Regards,
M. Braun

#929830#25
Date:
2019-06-11 10:45:17 UTC
From:
To:
 ❦ 11 juin 2019 11:36 +02, michael-dev <michael-dev@fami-braun.de>:

Is there anything special on your setup? Lots of interface running or
interfaces cycling (VM)?

#929830#30
Date:
2019-06-13 07:03:42 UTC
From:
To:
Am 11.06.2019 12:45, schrieb Vincent Bernat:

This has happened both in virtual and non-virtual machines, some of them
only have one interface, others have two or three.
I also do not see spurious link up/down messages in dmesg, so interfaces
should not have cycled.

Regards,
M. Braun

#929830#35
Date:
2019-06-13 07:45:27 UTC
From:
To:
 ❦ 13 juin 2019 09:03 +02, michael-dev <michael-dev@fami-braun.de>:

Are there all 32bits x86 hosts?

If it happens in a few hours/days, could you run it through valgrind?
You will need to install lldpd-dbgsym (see
https://wiki.debian.org/AutomaticDebugPackages) and run the following
command:

  valgrind --leak-check=full lldpd -dd

It will use more memory than usual but when you see the memory growing a
lot, you can Ctrl-C and you'll get a report that would help to find
where the leak is.

#929830#40
Date:
2024-01-15 09:56:28 UTC
From:
To:
Maybe the memory leak(s) are fixed with 1.0.18?
https://github.com/lldpd/lldpd/releases

#929830#45
Date:
2024-01-15 10:34:33 UTC
From:
To:
This is only for FDP/EDP (rare protocols). But a similar problem was
fixed in earlier releases. So, maybe.