From owner-freebsd-usb@FreeBSD.ORG Mon Jan 24 11:08:46 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 310F81065694 for ; Mon, 24 Jan 2011 11:08:46 +0000 (UTC) (envelope-from dr.clau@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id B11828FC15 for ; Mon, 24 Jan 2011 11:08:45 +0000 (UTC) Received: by ewy24 with SMTP id 24so1808737ewy.13 for ; Mon, 24 Jan 2011 03:08:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=Ojk6y0MQ1pyabWQuVr5H6Gd5nZBUEtq6bUw8G4G78dU=; b=IShhliv9oQ3v4XykY6wBY2p/voyVphc1evhDse2lYJHiBuUn1RaqvEqdXobYMKspej 7Cmf0DSsCgLXHEIYPlnlEi7X/iSS7QLlQJ9NA9O3/nllQRm0jICeTgEZ0doX6+4fQ4O0 z//Y6XTKreVAMZL8X6CZmUXhQcCBN6UKVL7As= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=fRdjdUIyShWLsoJ5Dm3vhGJOiZ0OZ9gspEXFKCw3+3rul1skZFGnC4H1DieRF6PwAZ VhhjoQsa5tIi7kSY7/nAEP7Pi6+ih7P++sGhfkHYXK3Ysr1xu7/45JJ2fwj+T7IICV/z 255oXBmYx4nJFQaK1skEsH7QvEBJsadm+SZIc= Received: by 10.213.26.70 with SMTP id d6mr2882683ebc.78.1295867324588; Mon, 24 Jan 2011 03:08:44 -0800 (PST) Received: from [127.0.0.103] ([78.96.107.4]) by mx.google.com with ESMTPS id t5sm10072733eeh.8.2011.01.24.03.08.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 24 Jan 2011 03:08:43 -0800 (PST) Message-ID: <4D3D5DBF.3080600@gmail.com> Date: Mon, 24 Jan 2011 13:08:47 +0200 From: CDP User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101210 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <4D3CAE4E.2040407@gmail.com> <5253D900-7A8F-43D7-8E86-88C0A14EF0B8@gsoft.com.au> <4D3D3FC5.9010205@gmail.com> <201101241034.07591.hselasky@c2i.net> In-Reply-To: <201101241034.07591.hselasky@c2i.net> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Subject: Re: System lockups caused by USB external HDD X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2011 11:08:46 -0000 On 01/24/11 11:34, Hans Petter Selasky wrote: > On Monday 24 January 2011 10:00:53 CDP wrote: >> On 01/24/11 01:56, Daniel O'Connor wrote: >>> On 24/01/2011, at 9:10, CDP wrote: >>>> g_vfs_done():da0s2[WRITE(offset=xxxxxxxxxxxx, length=16384)]error = 5 >>>> [several more lines similar to the above] >>>> panic: softdep_move_dependencies: need merge code >>>> cpuid = 0 >>>> KDB: stack backtrace: >>>> #0 0x... at kdb_backtrace+0x5e >>>> #1 0x... at panic+0x182 >>> >>> It looks like the disk is dying, or the FS is corrupt (the former might >>> cause the later). >>> >>> Can you run smartctl on the disk? Unfortunately a lot of enclosures >>> reject SMART commands so you might not be able to :( >> >> I have attached the output of smartctl -d sat -a /dev/da0. I didn't yet >> run a SMART long test for the simple reason that the disk is going into >> sleep mode and interrupts it. Haven't bothered to keep it alive for a >> long test but I might just do that. >> >> Although, I doubt it's a disk failure, since I do backups on it without >> problems by using FreeBSD 7.3, on the same space where FreeBSD 8.x >> fails. And I am talking about over 150GB of data in one run, while >> 8.2-RC2 crashes after 5-10GB. I have experienced disk failure in the >> past, on SATA, and a few read/write errors never caused a system lockup. >> >> My feeling is that enough traffic on USB causes the problem, and that >> this problem is only present in the new USB stack. >> Unfortunately downgrading to 7.x is not an option because there are >> things that won't work on this notebook. > > If you run a simple test like this: > > dd if=/dev/da0 of=/dev/null bs=65536 > dd if=/dev/da0 of=/dev/null bs=16384 > > Do you then see any errors? > > Do you have a spare USB memory stick which you could run similar write tests > on? Both reads fail with I/O error, while writes to an unused partition seem to be fine (I interrupted the writes after a while): % dd if=/dev/da0 of=/dev/null bs=65536 dd: /dev/da0: Input/output error 191732+0 records in 191732+0 records out 12565348352 bytes transferred in 429.999272 secs (29221790 bytes/sec) % dd if=/dev/da0 of=/dev/null bs=16384 dd: /dev/da0: Input/output error 126427+0 records in 126427+0 records out 2071379968 bytes transferred in 169.431766 secs (12225452 bytes/sec) # dd if=/dev/random of=/dev/da0s3 bs=65536 ^C329378+0 records in 329377+0 records out 21586051072 bytes transferred in 1003.020293 secs (21521051 bytes/sec) # dd if=/dev/random of=/dev/da0s3 bs=16384 ^C679571+0 records in 679571+0 records out 11134091264 bytes transferred in 690.135793 secs (16133189 bytes/sec) This is what I get in /var/log/messages when the I/O error occurs: (da0:umass-sim0:0:0:0): AutoSense failed However, I experience no lockup. Maybe this situation is not handled correctly at another level ? I've done the read test with a 4GB memory stick and it passed. I'll do the read tests with another HDD later today, but I expect to get the same error, since on file copying it behaves in the same way. Claudiu.