Date: Sun, 5 Nov 2006 14:38:34 -0600 From: Brooks Davis <brooks@one-eyed-alien.net> To: spil.oss@gmail.com Cc: Lodewijk V?ge <lvoege@gmail.com>, freebsd-stable@freebsd.org Subject: Re: dhclient taking up all CPU Message-ID: <20061105203834.GA22060@lor.one-eyed-alien.net> In-Reply-To: <5fbf03c20611051212q28a819cbhf7e49d56c4ff6b3e@mail.gmail.com> References: <82912730-AD0E-4AE0-AA7C-FDD321F00B57@gmail.com> <5fbf03c20611051212q28a819cbhf7e49d56c4ff6b3e@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
It should be fixed in STABLE. The particular fixes were to bpf.c so I
belive (but have not verified) that if you grab the latest version of
that file, put it in src/sbin/dhclient/ and rebuild dhclient the
problems will go away.
-- Brooks
On Sun, Nov 05, 2006 at 09:12:25PM +0100, Spil Oss wrote:
> Hi all,
>
> Been experiencing this same behaviour every now-and-then.
>
> FreeBSD/i386 6.1-RELEASE-p10
>
> Any solutions to this?
>
> Kind regards,
>
> Spil.
>
> On 06/05/06, Lodewijk V??ge <lvoege@gmail.com> wrote:
> >hello,
> >
> >a while ago someone reported the same problem I had been seeing, that
> >dhclient starts taking up 100% CPU. it's probably something comcast
> >is doing.
> >
> >I couldn't get the requested coredump then, if I set kern.corefile
> >to /tmp/%N.core and kill -QUIT it, it doesn't seem to produce a
> >coredump. but it happened again just now, and I was able to attach
> >gdb. this is where it's spinning, in receive_packet() in bpf.c:
> >
> >(gdb)
> >285 if (interface->rbuf_offset == interface-
> > >rbuf_len) {
> >(gdb)
> >299 if (interface->rbuf_len - interface-
> > >rbuf_offset <
> >(gdb)
> >306 memcpy(&hdr, &interface->rbuf[interface-
> > >rbuf_offset],
> >(gdb)
> >313 if (interface->rbuf_offset + hdr.bh_hdrlen +
> >hdr.bh_caplen >
> >(gdb)
> >320 interface->rbuf_offset += hdr.bh_hdrlen;
> >(gdb)
> >327 if (hdr.bh_caplen != hdr.bh_datalen) {
> >(gdb)
> >328 interface->rbuf_offset =
> >(gdb)
> >331 continue;
> >(gdb)
> >385 } while (!length);
> >
> >and then it goes back to line 285. interesting variables are:
> >
> >(gdb) p *interface
> >$1 = {next = 0x0, hw_address = {htype = 1 '\001', hlen = 6 '\006',
> > haddr = "\000\021??\223?\000\000\000\000\000\000\000\000\000"},
> >primary_address = {s_addr = 0},
> > name = "vr0", '\0' <repeats 12 times>, rfdesc = 7, wfdesc = 7,
> >rbuf = 0x807d000 "\022?\\Dk\214", rbuf_max = 4096,
> > rbuf_offset = 416, rbuf_len = 415, ifp = 0x806f160, client =
> >0x8075000, noifmedia = 0, errors = 0, dead = 0, index = 2}
> >(gdb) p length
> >$2 = 0
> >(gdb) p hdr
> >$3 = {bh_tstamp = {tv_sec = 0, tv_usec = 0}, bh_caplen = 4294901760,
> >bh_datalen = 4294901778, bh_hdrlen = 65535}
> >
> >this is FreeBSD/i386 6.1-RC as of about two weeks ago.
> >
> >Lodewijk
> >
> >_______________________________________________
> >freebsd-stable@freebsd.org mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> >To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
> >
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
iD8DBQFFTkvKXY6L6fI4GtQRApn2AKCs39MJrr/IBM/372K99Nar++yWwQCfSPeW
VJxDWH+XOKNDoMDekywnlg4=
=o9NB
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061105203834.GA22060>
