From owner-freebsd-usb@FreeBSD.ORG Tue Apr 19 04:15:28 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AF0216A4CE for ; Tue, 19 Apr 2005 04:15:28 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8579C43D4C for ; Tue, 19 Apr 2005 04:15:27 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j3J4FQvM012584; Tue, 19 Apr 2005 00:15:26 -0400 (EDT) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12056-05; Tue, 19 Apr 2005 00:15:26 -0400 (EDT) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id j3J4FPnp012578; Tue, 19 Apr 2005 00:15:25 -0400 (EDT) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.3/8.12.11) with ESMTP id j3J4FJHV044198; Tue, 19 Apr 2005 00:15:19 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <6.2.1.2.0.20050418232543.034c5970@64.7.153.2> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Tue, 19 Apr 2005 00:13:52 -0400 To: "Adam Kropelin" , From: Mike Tancsa In-Reply-To: <064001c54481$19ea1b90$03c8a8c0@kroptech.com> References: <6.2.1.2.0.20050418133919.03102d90@64.7.153.2> <064001c54481$19ea1b90$03c8a8c0@kroptech.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b Subject: Re: ugen lockups with apcupsd X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2005 04:15:28 -0000 At 09:42 PM 18/04/2005, Adam Kropelin wrote: >Mike Tancsa wrote: >>Hi, >> I have been trying out the apcupsd program with an APC >>RS-1500 on FreeBSD via the ugen interface. On my VIA box, the machine >>locks up >>solid within a short period of time after starting the daemon. > >This is a known bug and is fixed by a patch I posted to apcupsd-users. The >BSD UHCI driver has a tendency to leave transfers on the queue when they >complete 'short' (i.e., with fewer bytes than expected). This happens >often in apcupsd-3.10.17 due to some poor coding on my part, but can also >happen on UPSes having broken firmware that sends fewer bytes than the >report descriptor claims. (These UPSes do not deadlock on Linux, so I >think there is still a BSD UHCI bug here, but luckily it can be worked >around in apcupsd.) Hi, actually, I was just about to post that I found the patches while looking through the mailing archives and it does seem to fix the issue. I will let it run overnight to see if it fixes it long term by doing an apcaccess status once per second in a loop. I guess this is still kind of a bug as a userland app could potentially DoS a system no ? One does not need to be root to open the device and presumably a malicious program could recreate the issue no ? Thanks again for the code and fix! ---Mike