# dhcpcd 100% CPU

## kagura-san

Hello.

After my last update of system (emerge --update --deep --newuse world) I noticed a strange behavior of my hdcpd daemon. Every time when I start my network interface (/etc/init.d/net.eth0 start), the dhcpd daemon immediately takes 100% of CPU and it is a permanent state. I tried to reemerge older versions of dhcpd, bud the problem is same with them. Has anyone similar experience with dhcpd daemon? Has anyone an idea, how to solve my problem?

Perhaps the problem was caused by some config file overwritten by etc-update command, bud I dont know, how can any config file couse this.

Thank you for your replies.

----------

## notHerbert

Please post your  /etc/conf.d/net (xxxxxxx key if there is one)

----------

## d2_racing

Hi, can you post your emerge --info plz ?

----------

## UberLord

Some old dhcpcd version could enter an infinite loop state.

dhcpcd-4.x should not enter an infinite loop.

Oddly enough, the design of dhcpcd-5 should make this impossible  :Smile: 

However, don't confuse a DHCP packet flood, or ARP flood as an infinite loop - it's a DoS attack which dhcpcd has to process.

----------

## kagura-san

/etc/conf.d/net:

config_eth0=( "dhcp" )

config_eth1=( "dhcp" )

# Prefer wpa_supplicant over wireless-tools

modules=( "wpa_supplicant" )

# It's important that we tell wpa_supplicant which driver we should

# be using as it's not very good at guessing yet

wpa_supplicant_eth1="-Dwext"

iwconfig_eth1="power on"

emerge --info:

Portage 2.1.4.5 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-tuxonice-r9 i686)

=================================================================

System uname: 2.6.24-tuxonice-r9 i686 Intel(R) Pentium(R) M processor 1.73GHz

Timestamp of tree: Sun, 12 Oct 2008 19:34:01 +0000

app-shells/bash:     3.2_p33

dev-java/java-config: 1.3.7, 2.1.6

dev-lang/python:     2.5.2-r7

dev-util/cmake:      2.4.6-r1

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r2

sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.23-r3

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=pentium-m -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=pentium-m -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://gentoo.mirror.web4u.cz/"

LANG="en_US.UTF-8"

LC_ALL="en_US.UTF-8"

LINGUAS="en cs"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X a52 aac aalib accessibility acl acpi alsa apache2 audiofile bash-completion berkdb branding bzip2 cairo cdparanoia cdr cli cracklib crypt cscope cups dbus dga dri dvd dvdr dvdread encode esd exif fam fbcon ffmpeg fftw firefox flac fortran ftp fuse gd gdbm gif gpm gstreamer gtk gtk2 iconv icq imlib ipv6 isdnlog jack java javascript jbig jikes jpeg jpeg2k ldap libcaca libnotify mad midi mmx mng mono motif mp3 mpeg mpi mplayer mudflap musepack mysql nas ncurses nls nntp nptl nptlonly ogg openal opengl openmp pam pcre pdf perl php png portaudio pppd python quicktime rdesktop readline real reflection session slang sockets spell spl sse sse2 ssl svg svga tcpd tetex theora threads tidy tiff truetype unicode usb vcd vim-syntax vim-with-x vorbis wifi win32codecs wmf x86 xcomposite xface xinerama xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en cs" USERLAND="GNU" VIDEO_CARDS="i810 fbdev vmware"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

----------

## d2_racing

Hi, can you post this :

```

# lspci

# iwconfig

```

I think that it's weird to see eth1 as a wlan0 interface.

Maybe you have something wrong with a Udev rule.

----------

## UberLord

Also, state dhcpcd version (dhcpcd --version). It should be 4.0.2, but lets be sure eh? If it is, please try the 4.99.2 version hard masked in portage.

----------

## Sinker

 *d2_racing wrote:*   

> I think that it's weird to see eth1 as a wlan0 interface.
> 
> Maybe you have something wrong with a Udev rule.

 

My wireless lan interface is eth1. I have no problems with it like that.

----------

## d2_racing

Hi, you don't have for sure a Intel or an Atheros Wifi card.

----------

## kagura-san

Its very strange, because everything was ok for more than one year and now it does these strange things. Moreover, it behaves like this only at home, when I am connected to my router. In school, when connected to school wireless network, its all ok. But I didn't  change my router configuration before this started.

----------

## kagura-san

Downgrading to dhcpcd-3* solved the problem.

----------

