https://bugs.kde.org/show_bug.cgi?id=527075

            Bug ID: 527075
           Summary: Unplugging a USB CD drive mid-read makes the audiocd
                    worker retry forever and flood syslog (19 GB in 13
                    minutes, disk full)
    Classification: Applications
           Product: AudioCD-KIO
      Version First unspecified
       Reported In:
          Platform: Kubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

LLM DISCLAIMER ! The report below was generated using an LLM after my disk was
suddenly full out of nowhere, right after I tested an external DVD drive with a
music CD. I have fully read through the report before pasting here.

---

SUMMARY
A USB CD drive disconnected while the audiocd worker was reading from it. The
worker never gave up. It kept retrying the read on the missing device and
printed every failed attempt to stderr, which systemd forwards to syslog. In
about 13 minutes /var/log/syslog grew to 19 GB and filled the root partition.
Writing stopped only because the disk was full. The worker was still using
about 40% CPU 15 minutes after the drive disappeared.

STEPS TO REPRODUCE
1. Plug in a USB CD drive with an audio CD.
2. Read a track from audiocd:/ (in my case the worker was spawned by kio-fuse,
through Dolphin).
3. Unplug the drive, or let it drop off USB, while the read is in progress.

OBSERVED RESULT
The kernel logs the disconnect, and 18 ms later the worker starts logging read
errors:

    14:50:27.849745 kernel: usb 1-7: USB disconnect, device number 7
    14:50:27.867367 kio-fuse[231957]: scsi_read error: sector=3038 length=27
retry=0

>From then on it repeats this block without end (the "Transport error" field is
binary garbage):

    kio-fuse[231957]: scsi_read error: sector=2937 length=1 retry=5
    kio-fuse[231957]:                  Sense key: 0 ASC: 1f ASCQ: 72
    kio-fuse[231957]:                  Transport error: <binary>
    kio-fuse[231957]:                  System error: No such device

- Rate: about 200,000 lines per second. The last 200 MB of syslog held
2,022,306 lines from this worker and 1 from anything else.
- Total: 19.4 GB written between 14:50:27 and 15:03:37, when the root partition
reached 0 bytes free and rsyslogd began failing with "No space left on device".
- The sector numbers stayed between 2937 and 3038 the whole time, so the read
was not progressing.
- The worker (kioworker .../kf6/kio/audiocd.so audiocd
local:/run/user/1000/kiofuse...kioworker.socket) was still alive at ~40% CPU
about 15 minutes after the disconnect.

EXPECTED RESULT
Once the device is gone ("No such device"), the read should fail with an error
and the worker should stop. A failing read should never write unbounded output
to stderr.

SOFTWARE/OS VERSIONS
Linux: Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic
KDE Plasma: 6.6.6
KDE Frameworks: 6.24.0
kio-audiocd: 25.12.3
kio-fuse: 5.1.1
cdparanoia (libcdda_interface / libcdda_paranoia): 3.10.2

ADDITIONAL INFORMATION
Drive: HP CDDVDW SN-208BB in a USB enclosure (USB ID 13fd:0840).
I found no existing report: searched open AudioCD-KIO bugs and Bugzilla-wide
for "scsi_read error". Closest is bug
https://bugs.kde.org/show_bug.cgi?id=116204 (from 2005, drive keeps spinning
and the worker cannot be killed), which looks like a different trigger.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to