From owner-freebsd-current@FreeBSD.ORG Fri Sep 25 21:59:24 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 54F79106568B for ; Fri, 25 Sep 2009 21:59:24 +0000 (UTC) (envelope-from rgrover1@gmail.com) Received: from mail-yx0-f184.google.com (mail-yx0-f184.google.com [209.85.210.184]) by mx1.freebsd.org (Postfix) with ESMTP id 0EEDF8FC1C for ; Fri, 25 Sep 2009 21:59:23 +0000 (UTC) Received: by yxe14 with SMTP id 14so7741077yxe.7 for ; Fri, 25 Sep 2009 14:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=9e3G+wHBg+wNBHvMq85Pn0DQBKvAGk+ebctMAqGNQjw=; b=qLeruRkrpN03qPFNg7tPTc0RE1vnM/oe78oRdc8FITM/Mcurw820UEw7nuiFZIt/TU TWZnfu2y2ti/BQOftUTz7KEZs4qVr9pvWxTbOo68FFpSNkfTDupB8nGiM0HaDz7mC/gc LfoYd1YHzeK9e3vomAqw3FlST+Pn77OfFnlc4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=uqo/kiXqSRzeIRFetnXin+CV4z+glvvGeqvKnuMSO3g+KlceNWM5GvXLUY2tctHz9L 6FmVGNDIkTs0uWMqqoe3j13UMXTkZ9Gn/rQ4F1RfsBEZYzbk9wqsYz9/AAPqjt+V5bdJ 5TrTZJHw6dNQNZnKY7DihM3WqySE5CU8GO/vo= MIME-Version: 1.0 Received: by 10.150.45.20 with SMTP id s20mr3301592ybs.211.1253915963298; Fri, 25 Sep 2009 14:59:23 -0700 (PDT) In-Reply-To: <20090925153212.67247375@ernst.jennejohn.org> References: <426bed110909250623j44c25ba8o97ded8393f5297a9@mail.gmail.com> <20090925153212.67247375@ernst.jennejohn.org> Date: Sat, 26 Sep 2009 05:59:23 +0800 Message-ID: <426bed110909251459p50ca5564mee568e14bd26d8cd@mail.gmail.com> From: Rohit Grover To: gary.jennejohn@freenet.de Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 21:59:24 -0000 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) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =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) =A0 =A0 =A0 =A0 =A0 =3D 0 (0x0) >> read(12,0xbfbfe56c,384) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0=3D 0 (0x0) >> gettimeofday({1253883730.961158 },0x0) =A0 =A0 =A0 =A0 =A0 =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) =A0 =A0 =A0 =A0 =A0 =3D 0 (0x0) >> read(12,0xbfbfe56c,384) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0=3D 0 (0x0) >> gettimeofday({1253883730.961286 },0x0) =A0 =A0 =A0 =A0 =A0 =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) =A0 =A0 =A0 =A0 =A0 =3D 0 (0x0) >> read(12,0xbfbfe56c,384) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0=3D 0 (0x0) >> gettimeofday({1253883730.961415 },0x0) =A0 =A0 =A0 =A0 =A0 =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? =A0I'm pre= tty sure that > hald depends on kernel sources and often requires a fresh installation. 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().