Skip to contentSkip to conversation

USB HD: No Sense / Info fld=0x0 and read corruption

DISCUSSION Ludovico Cavedon 3 participants 6 messages Dec 24, 2008 – Dec 26, 2008 4 messages not in the archive SCSI

lore
Share & tools
lore
#0 lore raw

Hi,
I have a problem with a USB hard drive.

The problem starts to happen after some random time of operation; the time may range from 1 minute up to one hour...

The first symptom are these messages in the kernel log.
---------------
sd 5:0:0:0: [sdb] Sense Key : No Sense [current] Info fld=0x0
5:0:0:0: [sdb] Add. Sense: No additional sense information
---------------
The may appear only once or multiple times.

Sometime they are not associated with other errors, sometimes I start to see filesystem corrpution:
---------------
attempt to access beyond end of device
sdb8: rw=0, want=15514452856, limit=207045657
---------------

If I unmount the device and replug it, I am able to read the same data without any problem.
I suspect that some read corruption is happening. However I have *never* seen I/O error reported!

Here is the usbmon log:
http://pastebin.com/f4e1afeb1

There are some successful read operation, than the read operation 31 = 55534243 8f150000 00100100 80000a28 0022ebd0 a8000088 00000000 000000

whose command completion status ends with "01". The subsequent REQUEST SENSE, however is empty.

What may be happening here?
My situation looks different from
http://thread.gmane.org/gmane.linux.kernel/747753
-there is an additional "Info fld=0x0" line in the log
-there log messages are not always looping
-it is happening also with 2.6.28-rc8 (which should have the patch, right?)

I am not able to understand if this is HD problem or a kernel problem. I am able to replicate it:
-2.6.28-rc8 vanilla kernel
-2.6.27 ubuntu (intrepid) kernel
-2.6.25 ubuntu (hardy) kernel
-on two different computers
-with different USB cables (so it not a cable problem)

However, I have never got errors reported by Windows (dual boot on the same machine).

The HD driver is a Wester Didital 320GB (WD3200):

T:  Bus=07 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1058 ProdID=0704 Rev= 1.05
S:  Manufacturer=Western Digital
S:  Product=External HDD
S:  SerialNumber=5758453730384E5036333734
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

The USB controller is
00:1a.7 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 [8086:283a] (rev 03)

Please tell me if I can provide other useful information.

Thank you,
Ludovico Cavedon
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 32 lines · Ludovico Cavedon

Hi,
I have a problem with a USB hard drive.

The problem starts to happen after some random time of operation; the time may range from 1 minute up to one hour...

The first symptom are these messages in the kernel log.
---------------
sd 5:0:0:0: [sdb] Sense Key : No Sense [current] Info fld=0x0
5:0:0:0: [sdb] Add. Sense: No additional sense information
---------------
The may appear only once or multiple times.

Sometime they are not associated with other errors, sometimes I start to see filesystem corrpution:
---------------
attempt to access beyond end of device
sdb8: rw=0, want=15514452856, limit=207045657
---------------

If I unmount the device and replug it, I am able to read the same data without any problem.
I suspect that some read corruption is happening. However I have *never* seen I/O error reported!

Here is the usbmon log:
http://pastebin.com/f4e1afeb1

There are some successful read operation, than the read operation 31 = 55534243 8f150000 00100100 80000a28 0022ebd0 a8000088 00000000 000000

Quoted 7 lines

whose command completion status ends with "01". The subsequent REQUEST SENSE, however is empty.

What may be happening here?
My situation looks different from
http://thread.gmane.org/gmane.linux.kernel/747753
-there is an additional "Info fld=0x0" line in the log

That's because your "empty" sense information has the Valid flag set.

Review

Quoted 2 lines
(quoted diff) +0 -2
-there log messages are not always looping
-it is happening also with 2.6.28-rc8 (which should have the patch, right?)

What patch? Do you mean the patch at the end of that email thread? It affects only Argosy USB drives, not your Western Digital.

Quoted 1 line

I am not able to understand if this is HD problem or a kernel problem. I

Partly both. The HD (or more likely, its USB interface) is responsible for sending those unnecessary empty sense records. The kernel is responsible for not reporting an I/O error (assuming an error actually did take place).

Quoted 3 lines

am able to replicate it:
-2.6.28-rc8 vanilla kernel
-2.6.27 ubuntu (intrepid) kernel

2.6.27 doesn't go into an endless loop? This may indicate that eventually the drive stops sending the Check Condition status.

Quoted 19 lines

-2.6.25 ubuntu (hardy) kernel

(quoted diff) +0 -2
-on two different computers
-with different USB cables (so it not a cable problem)

However, I have never got errors reported by Windows (dual boot on the same machine).

The HD driver is a Wester Didital 320GB (WD3200):

T:  Bus=07 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1058 ProdID=0704 Rev= 1.05
S:  Manufacturer=Western Digital
S:  Product=External HDD
S:  SerialNumber=5758453730384E5036333734
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Quoted 6 lines

The USB controller is
00:1a.7 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 [8086:283a] (rev 03)

Please tell me if I can provide other useful information.

It would help to see the dmesg log for when one of these errors occurs.

It would also help to know what happens under Windows. Do the same "empty sense" errors occur? If they do, how does Windows handle them?

Alan Stern

A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.44L0.0812241253300.27059-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org

#3 lore raw
Quoted 5 lines · Alan Stern
Quoted 1 line · Ludovico Cavedon

-it is happening also with 2.6.28-rc8 (which should have the patch, right?)

What patch? Do you mean the patch at the end of that email thread? It affects only Argosy USB drives, not your Western Digital.

I thought also patches
http://marc.info/?l=linux-scsi&m=122443015406309&w=2
were included, but later I realized I was wrong.
I have patched my kernel with them, and now I/O errors get reported!

Quoted 6 lines
Quoted 1 line

I am not able to understand if this is HD problem or a kernel problem. I

Partly both. The HD (or more likely, its USB interface) is responsible for sending those unnecessary empty sense records. The kernel is responsible for not reporting an I/O error (assuming an error actually did take place).

I think I found out what is happening on the HD side. The SMART self test fails with a read error. The SMART log reports uncorrectable read errors. However Reallocated_Event_Count is 0. Searching on the web, looks like that these sectors have bad ECC, so the cause a read error, however they are not bad sectors. Is this correct?

My question is: how can this happen? and not just one sector, but at least a dozen!
Bad HD? (it's new! 93 hrs of activity so far!)

Quoted 6 lines
Quoted 3 lines

am able to replicate it:
-2.6.28-rc8 vanilla kernel
-2.6.27 ubuntu (intrepid) kernel

2.6.27 doesn't go into an endless loop? This may indicate that eventually the drive stops sending the Check Condition status.

You are right. Most of the read attempts succeed after a a while. However I found one sector that is causing an endless loop on 2.6.27 and unpatched 2.6.28-rc8

Quoted 1 line

It would help to see the dmesg log for when one of these errors occurs.

There are no additional messages. However here it is:
http://pastebin.com/mcfd54a3

Quoted 2 lines

It would also help to know what happens under Windows. Do the same "empty sense" errors occur? If they do, how does Windows handle them?

I can try to use usb snoopy to log usb traffic under windows. Do you know how I can ask Windows "read sector X"?

Thank you for your help,
Merry Christmas!
Ludovico
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 10 lines · Ludovico Cavedon
Quoted 5 lines · Alan Stern
Quoted 1 line · Ludovico Cavedon

-it is happening also with 2.6.28-rc8 (which should have the patch, right?)

What patch? Do you mean the patch at the end of that email thread? It affects only Argosy USB drives, not your Western Digital.

I thought also patches
http://marc.info/?l=linux-scsi&m=122443015406309&w=2
were included, but later I realized I was wrong.

A revised version of the first patch in that message is queued for 2.6.29. The second patch has not yet been merged in any form.

Quoted 9 lines

I have patched my kernel with them, and now I/O errors get reported!

Quoted 6 lines
Quoted 1 line

I am not able to understand if this is HD problem or a kernel problem. I

Partly both. The HD (or more likely, its USB interface) is responsible for sending those unnecessary empty sense records. The kernel is responsible for not reporting an I/O error (assuming an error actually did take place).

Quoted 5 lines

I think I found out what is happening on the HD side. The SMART self test fails with a read error. The SMART log reports uncorrectable read errors. However Reallocated_Event_Count is 0. Searching on the web, looks like that these sectors have bad ECC, so the cause a read error, however they are not bad sectors. Is this correct?

I don't know. It sounds reasonable. The real issue is: Why doesn't the drive send back appropriate sense information to let the host know about the bad ECC?

Quoted 3 lines

My question is: how can this happen? and not just one sector, but at least a dozen!
Bad HD? (it's new! 93 hrs of activity so far!)

Maybe you can exchange it...

Quoted 11 lines
Quoted 2 lines

2.6.27 doesn't go into an endless loop? This may indicate that eventually the drive stops sending the Check Condition status.

You are right. Most of the read attempts succeed after a a while. However I found one sector that is causing an endless loop on 2.6.27 and unpatched 2.6.28-rc8

Quoted 1 line

It would help to see the dmesg log for when one of these errors occurs.

There are no additional messages. However here it is:
http://pastebin.com/mcfd54a3

Yeah, that's not very useful.

Quoted 5 lines
Quoted 2 lines

It would also help to know what happens under Windows. Do the same "empty sense" errors occur? If they do, how does Windows handle them?

I can try to use usb snoopy to log usb traffic under windows. Do you know how I can ask Windows "read sector X"?

I wish I knew! Perhaps Microsoft's KnowledgeBase site can tell you how.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.44L0.0812241756020.917-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org

#7 lore raw
Quoted 6 lines · Alan Stern
Quoted 3 lines · Ludovico Cavedon

My question is: how can this happen? and not just one sector, but at least a dozen!
Bad HD? (it's new! 93 hrs of activity so far!)

Maybe you can exchange it...

Definitely!

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

It would also help to know what happens under Windows. Do the same "empty sense" errors occur? If they do, how does Windows handle them?

I can try to use usb snoopy to log usb traffic under windows. Do you know how I can ask Windows "read sector X"?

I wish I knew! Perhaps Microsoft's KnowledgeBase site can tell you how.

I found a free tool to read a raw sector of a partition (NT Disk Viewer). Unfortunately USB Snoopy kept stopping capturing packets after a few seconds, so I was not able to see what was happening. Anyway, I goi a read error ofter a while the program seemed frozen. So I guess Windows is handling them retrying to read the sector and finally giving up.

A question:
If I rewrite these sectors I can fix these errors (at least temporarily). I also noticed that when the "check condition" bit is set some data is also tranferred. Is there get these partial data (e.g. with dd)?

Thanks,
Ludovico

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw
Quoted 5 lines · Ludovico Cavedon

A question:
If I rewrite these sectors I can fix these errors (at least temporarily). I also noticed that when the "check condition" bit is set some data is also tranferred. Is there get these partial data (e.g. with dd)?

Not the way you're thinking. I believe wireshark is able to monitor USB packets, so you could see the raw data that way.

Also there are tools like the sg-utils package or plscsi, which provide a way for you to send specific SCSI commands to a device and see exactly what the results are.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html