udhcpc uses 100% cpu
William Thompson
wt at electro-mechanical.com
Wed May 23 13:54:23 UTC 2007
On Wed, May 23, 2007 at 07:59:14AM -0400, William Thompson wrote:
> I'm using udhcpc from an initramfs and I've noticed it's eating all the CPU
> time. Busybox v1.5.0
>
> I decided to strace it and I'm seeing this over and over again:
> sysinfo({uptime=909, loads=[71200, 63040, 36928] totalram=262553600, freeram=223490048, sharedram=0, bufferram=0} totalswap=0, freeswap=0, procs=35}) = 0
> select(1, [0], NULL, NULL, {296, 0}) = 1 (in [0], left {296, 0})
> sysinfo({uptime=909, loads=[71200, 63040, 36928] totalram=262553600, freeram=223490048, sharedram=0, bufferram=0} totalswap=0, freeswap=0, procs=35}) = 0
> read(0, "", 4) = 0
>
> According to /proc, fd 0 is /dev/null:
> /: v /proc/3947/fd
> total 0
> lrwx------ 1 root root 64 May 23 08:41 0 -> /dev/null
> lrwx------ 1 root root 64 May 23 08:41 1 -> /dev/null
> lrwx------ 1 root root 64 May 23 08:41 2 -> /dev/null
> lrwx------ 1 root root 64 May 23 08:41 3 -> socket:[924]
> /:
>
> I'm calling udhcpc like this: udhcpc -i eth0 -p /tmp/dhcpc.pid -n
>
> It appears that somewhere, something is setting the fd to 0 when it should
> be 3.
I hate replying to myself. I ran an strace on it as it started and it turns
out that there's no error checking on socketpair()
(networking/udhcp/signalpipe.c:39). The stage that I'm running this didn't
have the unix module loaded so it was unable to open a socket.
If anyone's interested in the setup I'm using, just ask.
More information about the busybox
mailing list