Re: panic with CF drive + USB reader

2003-08-26 Thread Lars Eggert
Bernd,
. 
Seems that handling the stalled condition failed.
Can you try the following patch:
I was *just* going to write you saying it was still running with this 
patch, which would have been the longest yet. But then I saw these messages:

umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
initiate_write_filepage: already started
initiate_write_filepage: already started
initiate_write_filepage: already started
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
initiate_write_filepage: already started
And the box paniced again:

panic: initiate_write_inodeblock_ufs2: already started
cpuid = 0; lapic.id = 
Stack backtrace:
backtrace(c033157d,0,c0341a7f,e96a1ab0,100) at backtrace+0x17
panic(c0341a7f,c01bc427,c7dabdf4,e96a1ad0,e96a1ad0) at panic+0x13d
initiate_write_inodeblock_ufs2(c6f4cb00,d29060b8,c01fd879,0,d29060b8) at 
initiate_write_inodeblock_ufs2+0x68f
softdep_disk_io_initiation(d29060b8,c17fbf30,e96a1bb4,c01fda2b,d29060b8) 
at softdep_disk_io_initiation+0x80
spec_xstrategy(c6d88490,d29060b8,e96a1bb4,c017dfcc,e96a1be0) at 
spec_xstrategy+0x104
spec_specstrategy(e96a1be0,e96a1bfc,c01f8550,e96a1be0,1) at 
spec_specstrategy+0x1b
spec_vnoperate(e96a1be0,1,c6bfc800,d2a5f680,e96a1bdc) at spec_vnoperate+0x18
bwrite(d29060b8,100,c63304c0,e96a1c3c,80012) at bwrite+0x403
vfs_bio_awrite(d29060b8,80012,0,c63304c0,c017dfcc) at vfs_bio_awrite+0x27b
vop_stdfsync(e96a1cdc,0,c6d88490,e96a1ca4,c017dfcc) at vop_stdfsync+0x1b1
spec_fsync(e96a1cdc,e96a1d18,c020b613,e96a1cdc,20002) at spec_fsync+0x31
spec_vnoperate(e96a1cdc,20002,c63304c0,c0335c1b,0) at spec_vnoperate+0x18
sched_sync(0,e96a1d48,0,0,0) at sched_sync+0x1e3
fork_exit(c020b430,0,e96a1d48) at fork_exit+0xb2
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xe96a1d7c, ebp = 0 ---
Debugger(panic)
Stopped at  Debugger+0x4f:  xchgl   %ebx,in_Debugger.0

It seems that this happens under light or no load only. I had been doing 
a heavy cycle of dump/restore/dd, etc, and all was well. Could it be 
that the MicroDrive does some kind of internal power management that 
delays its reponses some, and the kernel doesn't expect that?

Lars
--
Lars Eggert [EMAIL PROTECTED]   USC Information Sciences Institute


smime.p7s
Description: S/MIME Cryptographic Signature


Re: panic with CF drive + USB reader

2003-08-26 Thread Bernd Walter
On Mon, Aug 25, 2003 at 04:22:57PM -0700, Lars Eggert wrote:
 It seems that this happens under light or no load only. I had been doing 
 a heavy cycle of dump/restore/dd, etc, and all was well. Could it be 
 that the MicroDrive does some kind of internal power management that 
 delays its reponses some, and the kernel doesn't expect that?

Yes microdrives stop spinning when idle for a while to save energy
for batterie powered devices and possibly to decrease wear.
That could explain on how to trigger this problem.
Handling should have been done transparently by your reader.
Is your reader declared to support microdrives?

-- 
B.Walter   BWCThttp://www.bwct.de
[EMAIL PROTECTED]  [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: panic with CF drive + USB reader

2003-08-25 Thread Lars Eggert
Here's another, different one:

(da2:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(da2:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(da2:umass-sim0:0:0:0): SCSI Status: Check Condition
(da2:umass-sim0:0:0:0): UNIT ATTENTION asc:0,0
(da2:umass-sim0:0:0:0): No additional sense information
(da2:umass-sim0:0:0:0): Retrying Command (per Sense Data)
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
/cf: bad dir ino 47104 at offset 0: mangled entry
panic: ufs_dirbad: bad dir
cpuid = 0; lapic.id = 
Stack backtrace:
backtrace(c033157d,0,c03429a4,eb9e8810,100) at backtrace+0x17
panic(c03429a4,c6ae0eb0,b800,0,c034295e) at panic+0x13d
ufs_dirbad(c7771604,0,c034295e,0,eb9e888c) at ufs_dirbad+0x53
ufs_lookup(eb9e894c,eb9e8988,c01ff704,eb9e894c,eb9e8bf0) at ufs_lookup+0x416
ufs_vnoperate(eb9e894c,eb9e8bf0,eb9e8c04,0,c6b09130) at ufs_vnoperate+0x18
vfs_cache_lookup(eb9e89cc,eb9e89e8,c020460b,eb9e89cc,c6b09130) at 
vfs_cache_look
u 
   up+0x2d8
ufs_vnoperate(eb9e89cc,c6b09130,0,c6b09130,c6b09130) at ufs_vnoperate+0x18
lookup(eb9e8bdc,c66cc800,400,eb9e8bf8,c6b09130) at lookup+0x2e0
namei(eb9e8bdc,1010002,c7add124,c6b09130,eb9e8a74) at namei+0x1e8
vn_open_cred(eb9e8bdc,eb9e8cdc,1a4,c6a0d400,4) at vn_open_cred+0x257
vn_open(eb9e8bdc,eb9e8cdc,1a4,4,c0201fe6) at vn_open+0x30
kern_open(c6b09130,8136dd8,0,1,1b6) at kern_open+0x15b
open(c6b09130,eb9e8d14,c,8136000,3) at open+0x30
syscall(2f,2f,2f,0,bfbff994) at syscall+0x25e
Xint0x80_syscall() at Xint0x80_syscall+0x1d
--- syscall (5), eip = 0x28192f5f, esp = 0xbfbff318, ebp = 0xbfbff344 ---
Debugger(panic)

Again, I could not get a coredump.

Lars
--
Lars Eggert [EMAIL PROTECTED]   USC Information Sciences Institute


smime.p7s
Description: S/MIME Cryptographic Signature


Re: panic with CF drive + USB reader

2003-08-25 Thread Nate Lawson
this happens with an IBM MicroDrive mounted on a USB CF reader, -current
from 8/19/03. I couldn't get a coredump:

umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
(da2:umass-sim0:0:0:0): AutoSense Failed
panic: softdep_setup_freeblocks: inode busy
da2 at umass-sim0 bus 0 target 0 lun 0
da2: SanDisk ImageMate II 1.30 Removable Direct Access SCSI-2 device
da2: 1.000MB/s transfers
da2: 1027MB (2104705 512 byte sectors: 255H 63S/T 131C)

Your microdrive may need some USB quirks.  Try RS_NO_CLEAR_UA (see
/sys/dev/usb/umass.c for examples).

-Nate
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: panic with CF drive + USB reader

2003-08-25 Thread Nate Lawson
On Mon, 25 Aug 2003, Lars Eggert wrote:
 Nate Lawson wrote:
 this happens with an IBM MicroDrive mounted on a USB CF reader, -current
 
 from 8/19/03. I couldn't get a coredump:
 
 umass0: BBB reset failed, STALLED
 (da2:umass-sim0:0:0:0): AutoSense Failed
 umass0: BBB reset failed, STALLED
 (da2:umass-sim0:0:0:0): AutoSense Failed
 panic: softdep_setup_freeblocks: inode busy
 da2 at umass-sim0 bus 0 target 0 lun 0
 da2: SanDisk ImageMate II 1.30 Removable Direct Access SCSI-2 device
 da2: 1.000MB/s transfers
 da2: 1027MB (2104705 512 byte sectors: 255H 63S/T 131C)
 
  Your microdrive may need some USB quirks.  Try RS_NO_CLEAR_UA (see
  /sys/dev/usb/umass.c for examples).

 Thanks, I'll try that. It also complains during boot about not
 supporting Get Max Lun, so that's a quirk also.

No, that's likely not a quirk.  Complaining is ok if it doesn't cause
actual problems (i.e. can't mount partition).  Try one quirk at a time
until it works.

 Do you have any guesses what combination to use for the wire and command
 protocol fields for this device?

Copy a BBB line most likely.

-Nate
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: panic with CF drive + USB reader

2003-08-25 Thread Bernd Walter
On Mon, Aug 25, 2003 at 02:11:45PM -0700, Lars Eggert wrote:
 Here's another, different one:
 
 (da2:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
 (da2:umass-sim0:0:0:0): CAM Status: SCSI Status Error
 (da2:umass-sim0:0:0:0): SCSI Status: Check Condition
 (da2:umass-sim0:0:0:0): UNIT ATTENTION asc:0,0
 (da2:umass-sim0:0:0:0): No additional sense information
 (da2:umass-sim0:0:0:0): Retrying Command (per Sense Data)
 umass0: BBB reset failed, STALLED
 (da2:umass-sim0:0:0:0): AutoSense Failed
 umass0: BBB reset failed, STALLED
 (da2:umass-sim0:0:0:0): AutoSense Failed
 umass0: BBB reset failed, STALLED
 (da2:umass-sim0:0:0:0): AutoSense Failed
 umass0: BBB reset failed, STALLED
 (da2:umass-sim0:0:0:0): AutoSense Failed
 umass0: BBB reset failed, STALLED
 (da2:umass-sim0:0:0:0): AutoSense Failed
 umass0: BBB reset failed, STALLED
 (da2:umass-sim0:0:0:0): AutoSense Failed
 umass0: BBB reset failed, STALLED

Seems that handling the stalled condition failed.
Can you try the following patch:
RCS file: /home/ncvs/src/sys/dev/usb/usbdi.c,v
retrieving revision 1.76
diff -u -r1.76 usbdi.c
--- usbdi.c 26 May 2002 22:00:06 -  1.76
+++ usbdi.c 15 Jun 2003 04:23:48 -
@@ -931,8 +931,17 @@
 usbd_do_request_flags(usbd_device_handle dev, usb_device_request_t *req,
  void *data, u_int16_t flags, int *actlen, u_int32_t timo)
 {
-   return (usbd_do_request_flags_pipe(dev, dev-default_pipe, req,
-  data, flags, actlen, timo));
+   int actlen2;
+   usbd_status ret;
+
+   ret = usbd_do_request_flags_pipe(dev, dev-default_pipe, req,
+  data, flags, actlen2, timo);
+   if (actlen != NULL)
+   *actlen = actlen2;
+   if (ret == USBD_STALLED  actlen2 == UGETW(req-wLength)) {
+   ret = USBD_NORMAL_COMPLETION;
+   }
+   return (ret);
 }

I'm not shure that this patch will have an effect for your drive, but
it helped in other cases of broken stall conditions.
However not all stall brokeness can be worked around this way.
Why the stall condition was triggered is another question.
 
 /cf: bad dir ino 47104 at offset 0: mangled entry
 panic: ufs_dirbad: bad dir

The panic is also another issue.
I guess someone has told upper layers success without this beeing the
case.

-- 
B.Walter   BWCThttp://www.bwct.de
[EMAIL PROTECTED]  [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]