Subject: lldpd: Memory usage of lldpd implies memory leak
Date: Sat, 01 Jun 2019 12:53:08 +0200
Package: lldpd
Version: 0.9.6-1
Severity: normal
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
-- System Information:
Debian Release: 9.9
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 4.9.0-9-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to de_DE.utf8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to de_DE.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages lldpd depends on:
ii adduser 3.115
ii init-system-helpers 1.48
ii libbsd0 0.8.3-1
ii libc6 2.24-11+deb9u4
ii libevent-2.0-5 2.0.21-stable-3
ii libjansson4 2.9-1
ii libpci3 1:3.5.2-1
ii libreadline7 7.0-3
ii libsensors4 1:3.4.0-4
ii libsnmp30 5.7.3+dfsg-1.7+deb9u1
ii libssl1.0.2 1.0.2r-1~deb9u1
ii libwrap0 7.6.q-26
ii libxml2 2.9.4+dfsg1-2.2+deb9u2
ii lsb-base 9.20161125
lldpd recommends no packages.
Versions of packages lldpd suggests:
pn snmpd <none>
-- no debconf information
Acknowledgement sent
to michael-dev <[email protected]>:
Extra info received and forwarded to list. Copy sent to Vincent Bernat <[email protected]>.
(Sat, 01 Jun 2019 11:24:03 GMT) (full text, mbox, link).
Hi,
while memory usage was increasing, syslog showed (few) lldpd[1264]:
unable to receive netlink answer: No buffer space available messages.
Regards,
M. Braun
Acknowledgement sent
to Vincent Bernat <[email protected]>:
Extra info received and forwarded to list.
(Sat, 01 Jun 2019 12:15:06 GMT) (full text, mbox, link).
❦ 1 juin 2019 13:14 +02, michael-dev <[email protected]>:
> while memory usage was increasing, syslog showed (few) lldpd[1264]:
> unable to receive netlink answer: No buffer space available messages.
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?
--
An honest tale speeds best being plainly told.
-- William Shakespeare, "Henry VI"
Acknowledgement sent
to michael-dev <[email protected]>:
Extra info received and forwarded to list. Copy sent to Vincent Bernat <[email protected]>.
(Tue, 11 Jun 2019 09:39:03 GMT) (full text, mbox, link).
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
Acknowledgement sent
to Vincent Bernat <[email protected]>:
Extra info received and forwarded to list.
(Tue, 11 Jun 2019 10:48:03 GMT) (full text, mbox, link).
❦ 11 juin 2019 11:36 +02, michael-dev <[email protected]>:
> 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.
Is there anything special on your setup? Lots of interface running or
interfaces cycling (VM)?
--
My only love sprung from my only hate!
Too early seen unknown, and known too late!
-- William Shakespeare, "Romeo and Juliet"
Acknowledgement sent
to michael-dev <[email protected]>:
Extra info received and forwarded to list. Copy sent to Vincent Bernat <[email protected]>.
(Thu, 13 Jun 2019 07:06:02 GMT) (full text, mbox, link).
Am 11.06.2019 12:45, schrieb Vincent Bernat:
> Is there anything special on your setup? Lots of interface running or
> interfaces cycling (VM)?
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
Acknowledgement sent
to Vincent Bernat <[email protected]>:
Extra info received and forwarded to list.
(Thu, 13 Jun 2019 07:48:03 GMT) (full text, mbox, link).
❦ 13 juin 2019 09:03 +02, michael-dev <[email protected]>:
>> Is there anything special on your setup? Lots of interface running or
>> interfaces cycling (VM)?
>
> 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.
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.
--
Don't go around saying the world owes you a living. The world owes you
nothing. It was here first.
-- Mark Twain
Acknowledgement sent
to Gürkan Myczko <[email protected]>:
Extra info received and forwarded to list. Copy sent to Vincent Bernat <[email protected]>.
(Mon, 15 Jan 2024 10:00:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Vincent Bernat <[email protected]>:
Extra info received and forwarded to list.
(Mon, 15 Jan 2024 10:39:02 GMT) (full text, mbox, link).
This is only for FDP/EDP (rare protocols). But a similar problem was
fixed in earlier releases. So, maybe.
On 2024-01-15 10:56, Gürkan Myczko wrote:
> Maybe the memory leak(s) are fixed with 1.0.18?
> https://github.com/lldpd/lldpd/releases
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.