Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#2041 - Double dhcpcd running

Attached to Project: Arch Linux
Opened by Sander Hekman (RedHead) - Wednesday, 19 January 2005, 14:51 GMT
Last edited by Judd Vinet (judd) - Wednesday, 19 January 2005, 18:40 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I have just installed Arch Linux on my home linux server, no problems at all en running smoothly now.
But i did noticed that the dhcpcd was running double. the command Code:
ps aux | grep dhcp
gives me the following:
Code:
root 1140 0.0 0.1 1412 536 ? S<s 18:12 0:00 /usr/sbin/dhcpcd -d -t 30 -h cc758314-b eth0
root 1281 0.0 0.1 1412 552 ? Ss 18:12 0:00 /usr/sbin/dhcpcd -d -t 30 -h cc758314-b eth0
sander 1617 0.0 0.1 3476 580 pts/0 S+ 18:13 0:00 grep dhcp

After some trouble shooting of my own see also http://bbs.archlinux.org/viewtopic.php?t=9282, i found the following, that the hotplug scripts also starts op the network interface with dhcpcd but later on also the rc scripts start op the dhcpcd.
This task depends upon

Closed by  Judd Vinet (judd)
Friday, 11 November 2005, 18:48 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed for next build of initscripts
Comment by Jan de Groot (JGC) - Wednesday, 19 January 2005, 18:18 GMT
Hmm, I think our network script should support detection if an interface is already running: hotplug calls this script when it detects the network interface, so a 2nd call should bail out that the interface is already configured.

You can solve this by removing eth0 from the INTERFACES array in rc.conf, hotplug puts up eth0 when it detects it.
Comment by Todd Musall (twm) - Wednesday, 16 March 2005, 14:11 GMT
This problem still exists even after the recent rc.d/network script changes. On my arch box at work I'm still two dhcpcd instances running. The work around mentioned in Jan's comment no longer works because function hotplug_ifup now looks for disabled network interfaces. And if you do !eth0 'network start' won't bring up the interface as well. I need 'network start' to bring up my interface because hotplug alone doesn't do enough. Having two dhcpcd instances running causes an IP renewal at least twice a day! It would be nice if there was a way to tell hotplug not to bring up an interface that's _separate_ from Arch's INTERFACES list.
Comment by Aaron Griffin (phrakture) - Monday, 13 June 2005, 18:31 GMT
I admit to not looking at the network script while writing this, but I did look at them recently.

The original ifup function has a check for dhcpcd's pid file (i.e. if [ -f /etc/dhcpcd/dhcpcd-eth0.pid ];). I don't think the hotplug_ifup has this. I'd assume the hotplug version would keep the same check and simply do nothing (returning success so hotplug doesn't balk) in the case of it already existing...
Comment by Todd Musall (twm) - Monday, 13 June 2005, 19:32 GMT
Aaron I'm not sure what you mean when you say the original ifup function had a pid file check. I see where it checked for the pid or cache file and the deleted them (that code still exists in the current version), but I couldn't find anything that would kill a running dhcpcd and then start a new one. As far as I can tell the older versions of ifup() would have the same problem and will start another dhcpcd instance.
Comment by Judd Vinet (judd) - Wednesday, 24 August 2005, 21:30 GMT
Both ifup() and hotplug_ifup() will check for an existing dhcpcd .pid, since hotplug_ifup() calls ifup()

Is it definitely hotplug's fault? If you disable hotplug and reboot, do you still have two dhcp processes?
Comment by Todd Musall (twm) - Monday, 29 August 2005, 01:36 GMT
Judd, I was having this problem with my work machine. Unfortunately I no longer work at that company and don't have anyway to test this. At home I use statically configured IP addresses. Maybe someone that uses dhcpcd can try running with hotplug disabled.
Comment by Matiss Piesins (piesis) - Friday, 11 November 2005, 16:29 GMT
I have this problem in a fresh 0.7.1pre1 install - is still exists.

What I found problematic from hotplug and network initscript is the latter:
it should check whether ifaceX is already up or not.

For testing purposes of this really good distro and curiosity for Kivio, I made a simple diagram of what might be going on with this double-dhcp problem. For Your delight - please see the attached pdf :)
Comment by Judd Vinet (judd) - Friday, 11 November 2005, 18:48 GMT
Okay, I've added a check to ignore interfaces that are already up. Hopefully that fixes it. If not, please reopen this bug.

Loading...