From owner-freebsd-usb@FreeBSD.ORG Tue Nov 24 23:09:40 2009 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 EFD90106568D; Tue, 24 Nov 2009 23:09:40 +0000 (UTC) (envelope-from gjin@ubicom.com) Received: from server70.appriver.com (server70.appriver.com [69.20.119.203]) by mx1.freebsd.org (Postfix) with ESMTP id 7ADE98FC19; Tue, 24 Nov 2009 23:09:40 +0000 (UTC) X-Policy: GLOBAL - ubicom.com X-Policy: GLOBAL - ubicom.com X-Policy: GLOBAL - ubicom.com X-Policy: GLOBAL - ubicom.com X-Primary: gjin@ubicom.com X-Note: This Email was scanned by AppRiver SecureTide X-Virus-Scan: V- X-Note: TCH-CT/SI:0-26/SG:2 11/24/2009 6:09:27 PM X-GBUdb-Analysis: 0, 216.112.109.98, Ugly c=0.758919 p=-0.912603 Source White X-Signature-Violations: 0-0-0-14325-c X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->UNITED STATES X-Note-Sending-IP: 216.112.109.98 X-Note-Reverse-DNS: 216.112.109.98.ptr.us.xo.net X-Note-WHTLIST: gjin@ubicom.com X-Note: User Rule Hits: X-Note: Global Rule Hits: 115 116 117 118 122 123 221 X-Note: Mail Class: VALID X-Note: Headers Injected Received: from [216.112.109.98] (HELO stork.scenix.com) by server70.appriver.com (CommuniGate Pro SMTP 5.3c2) with ESMTP id 107975677; Tue, 24 Nov 2009 18:09:41 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 24 Nov 2009 15:08:59 -0800 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: 8.0-RC USB/FS problem Thread-Index: AcprWqhOc0di4XCLQnutgxkzKDrTkwAg+g77AD9+WyAAHqRYgA== References: <200911221047.20362.hselasky@c2i.net> From: "Guojun Jin" To: "Hans Petter Selasky" , Cc: bugs@freebsd.org, freebsd-stable@freebsd.org Subject: RE: 8.0-RC USB/FS problem 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: Tue, 24 Nov 2009 23:09:41 -0000 Interesting now by some incident :-) The single CPU machine (Intel P4) with 8.0 works fine on the USB drives and the USB stick. So, installed 8.0 on another AMD Turion64 HP Pavilion dv5210us Laptop, it comes the same problem -- accessing the USB hard drive causes system panic and reboot: Took the previously dump/restored USB drive and mount it on this Laptop, tried to remove the data before dump/restore, it crashed the system after=20 hit ^C and unplugged USB hard drive when the LED on USB hard drive becomes solid red and spiting out numbers of lines Operation not permitted=20 (the user is root, so this means accessing hard drive is not possible): rm: bin/... : Operation not permitted ...... A second try causes the system locks up After ^C. So, try to re-partitioning the USB hard drive on AMD laptop and dump/restore, partitioning passed, but dump/restore crashed. Since hw.usb.umass.debug=3D-1 does not tell a USB problem beside the RESET, What other debug shall we turn on to analyze this problem. -----Original Message----- From: Guojun Jin=20 Sent: Tuesday, November 24, 2009 12:13 AM To: Guojun Jin; Hans Petter Selasky; freebsd-usb@freebsd.org Cc: bugs@freebsd.org; freebsd-stable@freebsd.org Subject: RE: 8.0-RC USB/FS problem Freshly installed 8.0-RELEASE on two differnt machines, and USB stick work well so far, but the USB hard drive still has crash on this SMP (4-core AMD phenom 9600) during the dump/restore. I will try it on the single CPU machine tomorrow. Re-tested dump/restore with FreeBSD 6.3/6.4 on this SMP machine and they are working well. Also the another strange thing ocurred during the mount a partition on /tmp, which ended with two /tmp, and the last one mounted is on the top (the first should be hidden): : df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad0s1a 756750 165484 530726 24% / devfs 1 1 0 100% /dev /dev/ad0s2e 43194318 27833648 11905126 70% /data /dev/ad0s2d 9135182 5870390 2533978 70% /home /dev/ad0s1e 507630 34882 432138 7% /tmp /dev/ad0s1f 13246730 1424522 10762470 12% /usr /dev/ad0s1d 5077038 12700 4658176 0% /var /dev/da0s2 661176 487660 120622 80% /mnt /dev/da1s3d 9135182 4 8404364 0% /dist /dev/da1s3e 74938948 4 68943830 0% /tmp : df /tmp Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/da1s3e 74938948 4 68943830 0% /tmp -----Original Message----- From: Guojun Jin Sent: Sun 11/22/2009 7:59 PM To: Hans Petter Selasky; freebsd-usb@freebsd.org Cc: bugs@freebsd.org; freebsd-stable@freebsd.org Subject: RE: 8.0-RC USB/FS problem =20 >From more intensive diagnose, it looks like more related USB layer. repeated a few time on following process and ithe crash happened at different USB access phase at each time. dd if=3D/dev/zero of=3D/dev/da0 count=3D1000 bs=3D4k sysinstall partition=20 slice 1 (da0s1) 18GB ID=3D12 slice 2 (da0s2) 10-15GB Id=3D165 slice 3 (da0s3) rest ID=3D165 W ---> OK label da0s3d 9GB /mnt da0s3e rest /dist W ---> da0s3e ---- device is not configured. w# ll /dev/da0* # after sysinstall did partition + W at 1st time crw-r----- 1 root operator 0, 97 Nov 22 11:23 /dev/da0 crw-r----- 1 root operator 0, 98 Nov 22 11:23 /dev/da0s1 crw-r----- 1 root operator 0, 99 Nov 22 11:23 /dev/da0s2 crw-r----- 1 root operator 0, 100 Nov 22 11:23 /dev/da0s3 # ll /dev/da0* # after sysinstall start at 2nd time crw-r----- 1 root operator 0, 97 Nov 22 11:27 /dev/da0 System crashed The crash log is available at http:/www.daemonfun.com/archives/pub/USB/crash1-reset.bz2 (All logs are based on hw.usb.umass.debug=3D-1) After system reboot, and repeated above processes, the da0s3e was mounted on /dist, but da0s3d cannot. It tunred out that newfs fail inside labeling process in sysinstall. Manually did newfs on da0s3d, and it cannot be mounted on /mnt, but access to it caused crash. The crash log is available at http:/www.daemonfun.com/archives/pub/USB/newfs Tried entire process again, this time, both partitons are formatted (newfs) inside labaling process (sysinstall) but crahsed system during dump/restore on da0s3e (/dist). The crash log is available at http:/www.daemonfun.com/archives/pub/USB/usb-log.crash2.bz2, which is huge one. It contains two parts, one dump/restore IDE to da0s3d (passed), and the rest is dump/restore to da0s3e (crashed). I am going to reinstall the system with the new ISO from Nov 21 8.0-RELEASE to see if anything will improve. -----Original Message----- From: Hans Petter Selasky [mailto:hselasky@c2i.net] Sent: Sun 11/22/2009 1:47 AM To: freebsd-usb@freebsd.org Cc: Guojun Jin; bugs@freebsd.org; freebsd-stable@freebsd.org Subject: Re: 8.0-RC USB/FS problem =20 On Sunday 22 November 2009 05:38:13 Guojun Jin wrote: > Tried on the USB hard drive: > > Deleted slice 3 and recreated slice 3 with two partitions s3d and s3e. > Was happy because successfully did dump/restore on s3d, and thought it just > partition format issue; but system crashed during dump/restore on s3e, and > partition lost the file system type. > > wolf# mount /dev/da0s3e /mnt > WARNING: /mnt was not properly dismounted > /mnt: mount pending error: blocks 35968 files 0 > wolf# fsck da0s3e > fsck: Could not determine filesystem type > wolf# bsdlabel da0s3 > # /dev/da0s3: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > c: 175735035 0 unused 0 0 # "raw" part, > don't edi t > d: 18874368 0 4.2BSD 0 0 0 > e: 156860667 18874368 4.2BSD 0 0 0 > > Therefore, tried directly use fsck_ufs on both USB hard drive and USB stick > to get file system clean up. All data got back now. > > The machine has run with FreeBSD 6.1 all the way to 7.2 without such > problem. How can we determine what could go wrong in 8.0? FS or USB. Hi, Error 5 means IO error, so probably the transport layer, USB or lower, is to=20 blame. Some things to check: 1) Make sure the connection for your memory stick is Ok. 2) Make sure there is enough power for your memory stick. Regarding memory sticks: Other operating systems do a port bus reset when the device has a problem. On=20 FreeBSD we just try a software reset via the control endpoint. I guess that it=20 is a device problem you are seeing. The USB stack in FreeBSD is faster than=20 the old one, and maybe the faster queueing of mass storage requests trigger=20 some hidden bugs in your device. When the problem happens try: sysctl hw.usb.umass.debug=3D-1 --HPS