Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 846515

Summary: net-misc/dhcpcd-ui-0.7.8 net-misc/dhcpcd-9.4.1 dhcpcd-gtk memory leak?
Product: Gentoo Linux Reporter: d.b.armstrong <d.b.armstrong>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED UPSTREAM    
Severity: normal CC: gentoo, roy, williamh
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description d.b.armstrong@sasktel.net 2022-05-20 00:51:53 UTC
dhcpcd-gtk consumes memory to the point where the system become unresponsive.
killing dhcpcd-gtk restores the system to a usable state.
 
/var/log/daemon.log gets filled with lines like:

 dhcpcd[1690]: control_free: No such file or directory 

The two relevent packages are:

net-misc/dhcpcd-ui 0.7.8
net-misc/dhcpcd 9.4.1 

downgrading to dhcpcd-9.4.0-r1  fixes the problem.
Comment 1 Mike Gilbert gentoo-dev 2022-05-20 16:06:03 UTC
Adding Roy.
Comment 2 hfk22 2022-06-07 05:20:54 UTC
This affects me as well, dhcpcd-gtk leaks memory and the system becomes unresponsive.  Running on the command line gives:

 dhcpcd-gtk 
** Message: 00:21:19.803: Connecting ...
** Message: 00:21:19.803: Status changed to opened
** Message: 00:21:19.803: Connected to dhcpcd-9.4.1
** Message: 00:21:19.804: Status changed to down

** (dhcpcd-gtk:17775): CRITICAL **: 00:21:19.804: dhcpcd_open: Bad file descriptor
** Message: 00:21:19.904: Status changed to opened
** Message: 00:21:19.904: Connected to dhcpcd-9.4.1
** Message: 00:21:19.904: Status changed to down
** Message: 00:21:19.905: Status changed to opened
** Message: 00:21:19.905: Connected to dhcpcd-9.4.1
** Message: 00:21:19.906: Status changed to down
** Message: 00:21:20.005: Status changed to opened
** Message: 00:21:20.005: Connected to dhcpcd-9.4.1

This repeats multiple times a second.

----

$ emerge --info
Portage 3.0.30 (python 3.9.12-final-0, default/linux/amd64/17.1/hardened, gcc-11.3.0, glibc-2.34-r13, 5.10.61-gentoo x86_64)
=================================================================
System uname: Linux-5.10.61-gentoo-x86_64-Intel-R-_Core-TM-_i7-4910MQ_CPU_@_2.90GHz-with-glibc2.34
KiB Mem:    16306064 total,   8348508 free
KiB Swap:    8388604 total,   8379388 free
Timestamp of repository gentoo: Sat, 04 Jun 2022 04:30:01 +0000
Head commit of repository gentoo: 6072ffe65140af46bae199eb28b93b5bb7036307
sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
ccache version 4.5.1 [disabled]
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.0-r9::gentoo
dev-lang/python:           2.7.18_p15::gentoo, 3.8.13::gentoo, 3.9.12::gentoo, 3.10.4::gentoo
dev-lang/rust:             1.59.0::gentoo
dev-util/ccache:           4.5.1::gentoo
dev-util/cmake:            3.22.4::gentoo
dev-util/meson:            0.61.4-r2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           13.0.1::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/lld:             13.0.1::gentoo
sys-devel/llvm:            13.0.1::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r13::gentoo
sys-libs/libselinux:       3.3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes

local
    location: /home/josyoun/usr/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirrors.rit.edu/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en nb"
MAKEOPTS="-j10"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="a52 aac acl acpi alsa amd64 apm bash-completion bluetooth bzip2 cdda cddb crypt css dbus djvu dri dvd dvdr elogind eselect-ldso ffmpeg flac fortran gamepad gcj gif gnuplot gnutls hardened hdf5 heif iconv ipv6 jpeg jpeg2k libglvnd libtirpc mmx mono mozilla mp3 mp4 mpeg mpi mplayer multilib ncurses nls nptl ocaml ocamlopt offensive ogg opengl openmp pam pcre pdf pie png pulseaudio readline seccomp split-usr sse sse2 ssl ssp svg theora threads tiff truetype unicode usb vim-syntax vorbis x264 xattr xtpax xv zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="canon ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="en nb" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="NVPTX X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" USERLAND="GNU" VIDEO_CARDS="intel nvidia modesetting" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 3 eNca 2022-06-08 15:30:13 UTC
I didn't noticed the memory leak but I can confirm that dhcpcd-gtk (as well as dhcpcd-qt) does not work with dhcpcd 9.4.1 and the downgrade of dhcpcd to 9.4.0-r1 fixed the issue.
Both UI applications display "disconnected icon" when dhcpcd 9.4.1 is running (but network works properly).

My /var/log/syslog file is full of these records:

Jun  8 17:10:15 localhost dhcpcd[24507]: wlp1s0: DHCPv6 REPLY: No Addresses Available
Jun  8 17:10:15 localhost dhcpcd[24507]: control_free: No such file or directory
Jun  8 17:10:45 localhost last message buffered 604 times
Jun  8 17:12:32 localhost last message buffered 2129 times
Jun  8 17:12:32 localhost dhcpcd[24507]: wlp1s0: DHCPv6 REPLY: No Addresses Available
Jun  8 17:12:32 localhost dhcpcd[24507]: control_free: No such file or directory
Jun  8 17:13:02 localhost last message buffered 610 times
Jun  8 17:15:03 localhost last message buffered 2420 times
Jun  8 17:16:06 localhost last message buffered 1249 times
Comment 4 Mike Thompson 2022-06-21 02:03:13 UTC
I had the same failure of dhcpcd-qt to communicate with dhcpcd-9.4.1.  I found no problem in dhcpcd-ui but found dhcpcd-9.4.1 to be at fault.

It seems that only 9.4.1 has the problem:  dhcpcd-qt works properly with both dhcpcd-9.4.0-r1 and with the HEAD of the dhcpcd Git repo (commit 29f6c47b9e as I write this).  With any luck, that'll fix your memory leak also.    I'd try reverting to 9.4.0-r1 for now and waiting for the next dhcpcd release.
Comment 5 Roy Marples 2022-07-12 11:19:38 UTC
Might be fixed by this commit on the dhcpcd-9 branch:
https://github.com/NetworkConfiguration/dhcpcd/commit/2b4fe4c12b5d4366ff21fabf3a6c3799f8e4fa53
Comment 6 Bruce Schultz 2023-04-27 13:57:10 UTC
This is fixed in dhcpcd-9.5.0. Also tested with dhcpcd-10.0.1 and that works fine too.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-28 01:10:19 UTC
(In reply to Bruce Schultz from comment #6)
> This is fixed in dhcpcd-9.5.0. Also tested with dhcpcd-10.0.1 and that works
> fine too.

Thanks.