From owner-freebsd-current@FreeBSD.ORG Fri Sep 25 22:04:13 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 518DB1065670 for ; Fri, 25 Sep 2009 22:04:13 +0000 (UTC) (envelope-from marcus@marcuscom.com) Received: from creme-brulee.marcuscom.com (marcuscom-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id 00F768FC2B for ; Fri, 25 Sep 2009 22:04:12 +0000 (UTC) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.3/8.14.3) with ESMTP id n8PM7C0r019345; Fri, 25 Sep 2009 18:07:12 -0400 (EDT) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: Rohit Grover In-Reply-To: <426bed110909251459p50ca5564mee568e14bd26d8cd@mail.gmail.com> References: <426bed110909250623j44c25ba8o97ded8393f5297a9@mail.gmail.com> <20090925153212.67247375@ernst.jennejohn.org> <426bed110909251459p50ca5564mee568e14bd26d8cd@mail.gmail.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-kny0M8wrCi22r7/VEa41" Organization: MarcusCom, Inc. Date: Fri, 25 Sep 2009 18:04:11 -0400 Message-Id: <1253916251.1274.25.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on creme-brulee.marcuscom.com Cc: freebsd-current@freebsd.org Subject: Re: hald spins in a poll/read loop against /dev/usb with CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2009 22:04:13 -0000 --=-kny0M8wrCi22r7/VEa41 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sat, 2009-09-26 at 05:59 +0800, Rohit Grover wrote: > On Fri, Sep 25, 2009 at 9:32 PM, Gary Jennejohn > wrote: > > On Fri, 25 Sep 2009 21:23:12 +0800 > > Rohit Grover wrote: > > > >> Hald spins endlessly on my CURRENT. I have the following from truss: > >> > >> open("/dev/usb",O_RDONLY,00) =3D 12 (0xc) > >> ... > >> ... > >> poll({4/POLLIN 8/POLLIN 10/POLLIN|POLLPRI 15/POLLIN 89/POLLIN 6/POLLIN > >> 9/POLLIN 88/POLLIN 7/POLLIN 12/POLLIN},10,161) =3D 1 (0x1) > >> gettimeofday({1253883730.961100 },0x0) =3D 0 (0x0) > >> read(12,0xbfbfe56c,384) =3D 0 (0x0) > >> gettimeofday({1253883730.961158 },0x0) =3D 0 (0x0) > >> poll({4/POLLIN 8/POLLIN 10/POLLIN|POLLPRI 15/POLLIN 89/POLLIN 6/POLLIN > >> 9/POLLIN 88/POLLIN 7/POLLIN 12/POLLIN},10,161) =3D 1 (0x1) > >> gettimeofday({1253883730.961228 },0x0) =3D 0 (0x0) > >> read(12,0xbfbfe56c,384) =3D 0 (0x0) > >> gettimeofday({1253883730.961286 },0x0) =3D 0 (0x0) > >> poll({4/POLLIN 8/POLLIN 10/POLLIN|POLLPRI 15/POLLIN 89/POLLIN 6/POLLIN > >> 9/POLLIN 88/POLLIN 7/POLLIN 12/POLLIN},10,161) =3D 1 (0x1) > >> gettimeofday({1253883730.961357 },0x0) =3D 0 (0x0) > >> read(12,0xbfbfe56c,384) =3D 0 (0x0) > >> gettimeofday({1253883730.961415 },0x0) =3D 0 (0x0) > >> ... > >> ... > >> > >> Why is /dev/usb responding to poll() when there is no data to be read? > >> > >> thanks. > >> > > > > /dev/usb is a directory on my 9-CURRENT machine, not a device file. > > > > Did you install hald recently, e.g. after updating you kernel? I'm pre= tty sure that > > hald depends on kernel sources and often requires a fresh installation. >=20 > I've rebuilt hald (hal-0.5.11_26) after checking out 8/stable under > /usr/src/sys. Same problem. A spin loop of poll/read, with /dev/usb > responding to poll() but not to read(). Insufficient. You need to be running on a world/kernel which are in sync with each other. You also need to make sure the libusb port is no longer installed, and that you have run "make delete-old" after the upgrade. Then rebuild hal. Joe > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " >=20 --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-kny0M8wrCi22r7/VEa41 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEABECAAYFAkq9PloACgkQb2iPiv4Uz4eO5ACcCXYRt5MC1UCl2swwQoYNpUP+ 4LIAn0p4q+wTy/GWGgThQLU/TPN6+1vR =SvIC -----END PGP SIGNATURE----- --=-kny0M8wrCi22r7/VEa41--