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
Created attachment 1650013 [details] dmesg
Created attachment 1650014 [details] strace blkid
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.
Created attachment 1650199 [details] blkid 2.34 debug
Created attachment 1650200 [details] blkid 2.35 debug
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.
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!