kern/72488: ata-queue.c rev 1.22 broke dd(1) conv=noerror

Ulrich Spoerlein q at uni.de
Sun Oct 10 11:30:16 PDT 2004


>Number:         72488
>Category:       kern
>Synopsis:       ata-queue.c rev 1.22 broke dd(1) conv=noerror
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 10 18:30:15 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 5.3-BETA7 i386
>Organization:
>Environment:
System: FreeBSD roadrunner 5.3-BETA7
One Kernel dated 2004/02/28
One Kernel dated 2004/02/29
>Description:
# dd if=/dev/acd0 bs=2048 of=foo conv=sync,noerror
dd: /dev/acd0: Input/output error
2316+0 records in
2316+0 records out
4743168 bytes transferred in 10.777543 secs (440097 bytes/sec)
dd: /dev/acd0: Input/output error
dd: /dev/acd0: Invalid argument
2317+0 records in
2317+0 records out
2318+0 records in
2318+0 records out
4747264 bytes transferred in 10.800617 secs (439536 bytes/sec)
dd: /dev/acd0: Invalid argument
dd: /dev/acd0: Invalid argument
2319+0 records in
2319+0 records out
4749312 bytes transferred in 10.800908 secs (439714 bytes/sec)
dd: /dev/acd0: Invalid argument
dd: /dev/acd0: Invalid argument
2320+0 records in
2320+0 records out
... This loops as fast as it can, dd(1) doesn't even try to access the
device from this point forward.

When booting the 29th Kernel but with ata-queue.c rev 1.21 instead of 1.22:
# dd if=/dev/acd0 bs=2048 of=foo conv=sync,noerror
dd: /dev/acd0: Input/output error
2316+0 records in
2316+0 records out
4743168 bytes transferred in 10.737025 secs (441758 bytes/sec)
dd: /dev/acd0: Input/output error
dd: /dev/acd0: Input/output error
2317+0 records in
2317+0 records out
4745216 bytes transferred in 12.324324 secs (385028 bytes/sec)
dd: /dev/acd0: Input/output error
dd: /dev/acd0: Input/output error
2318+0 records in
2318+0 records out
4747264 bytes transferred in 13.919411 secs (341054 bytes/sec)
dd: /dev/acd0: Input/output error
2326+0 records in
2326+0 records out
^C

Note, that it at least reads blocks 2319-2326, it's also spinning the CD like
mad (this is expected).
Additionally I get this in dmesg, whereas rev. 1.22 is silent
acd0: FAILURE - READ_BIG status=51<READY,DSC,ERROR> sensekey=MEDIUM ERROR error=4<ABORTED>
acd0: FAILURE - READ_BIG status=51<READY,DSC,ERROR> sensekey=MEDIUM ERROR error=4<ABORTED>
acd0: FAILURE - READ_BIG status=51<READY,DSC,ERROR> sensekey=MEDIUM ERROR error=4<ABORTED>
acd0: FAILURE - READ_BIG status=51<READY,DSC,ERROR> sensekey=MEDIUM ERROR error=4<ABORTED>

Someone from bsdforen.de pointed out, that he too got this error when reading
old CDs and tracked it down to the relative lseek() failing in dd(1). When
using an absolute lseek() things just work.

>How-To-Repeat:
Put old/scratched CD in drive, run:
dd if=/dev/acd0 of=/dev/null bs=2048 conv=noerror
Wait for the first error, then watch those errors fly by...
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list