Bug 1787973

Summary: [sr0] tag#1 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jonathan, kzak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: util-linux-2.35-0.5.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-09 10:17:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dmesg
none
strace blkid
none
blkid 2.34 debug
none
blkid 2.35 debug none

Description Chris Murphy 2020-01-06 02:19:25 UTC
Description of problem:

When issuing 'blkid' many error messages appear for /dev/sr0 in dmesg. Drive is empty.


Version-Release number of selected component (if applicable):
libblkid-2.35-0.4.fc32.x86_64

How reproducible:
Always


Steps to Reproduce:
1. blkid
2.
3.

Actual results:

[   74.723968] fmac.local kernel: sr 2:0:0:0: [sr0] tag#1 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[   74.723982] fmac.local kernel: sr 2:0:0:0: [sr0] tag#1 Sense Key : Not Ready [current] 
[   74.723989] fmac.local kernel: sr 2:0:0:0: [sr0] tag#1 Add. Sense: Medium not present - tray open
[   74.723998] fmac.local kernel: sr 2:0:0:0: [sr0] tag#1 CDB: Read(10) 28 00 00 07 ff fc 00 00 02 00
[   74.724006] fmac.local kernel: blk_update_request: I/O error, dev sr0, sector 2097136 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[   74.724230] fmac.local kernel: sr 2:0:0:0: [sr0] tag#2 unaligned transfer


see attached dmesg for complete output


Expected results:

No errors.

Additional info:

Does not happen with the same kernel versions with Fedora 31, which has util-linux-2.34-4.fc31.x86_64

Comment 1 Chris Murphy 2020-01-06 02:23:50 UTC
Created attachment 1650013 [details]
dmesg

Comment 2 Chris Murphy 2020-01-06 02:24:07 UTC
Created attachment 1650014 [details]
strace blkid

Comment 3 Karel Zak 2020-01-06 10:19:54 UTC
It would be nice to have output from

 LIBBLKID_DEBUG=all blkid -p /dev/sr0

(ideally from the both versions:-)

Note that libblkid ignores I/O errors on CDROM to make it possible to work with some obscure hybrid audio+data disks. It's strange that now it generates so many error warnings. I'll also try it locally.

Comment 4 Chris Murphy 2020-01-06 19:02:16 UTC
Created attachment 1650199 [details]
blkid 2.34 debug

Comment 5 Chris Murphy 2020-01-06 19:02:30 UTC
Created attachment 1650200 [details]
blkid 2.35 debug

Comment 6 Karel Zak 2020-01-07 15:33:46 UTC
The problem is O_NONBLOCK we use for devices now... unfortunately open() successes when there is no medium and it continues with many read() calls. I'll try to fix it assap.

Comment 7 Karel Zak 2020-01-07 16:01:48 UTC
Fixed by upstream commit https://github.com/karelzak/util-linux/commit/dc30fd4383e57a0440cdb0e16ba5c4336a43b290. Fedora package will be updated later (with the upgrade to v2.35-rc2).

Thanks for your report!