cdparanoia stuck in cbwait

Fabian Keil freebsd-listen at fabiankeil.de
Sat Nov 5 17:29:44 UTC 2011


Brandon Falk <falkman at gamozo.org> wrote:

> I was got some read errors when I was reading from my disk, which is
> fine. But then cdparanoia starting to no longer respond. Now it's
> zombied and sitting in cbwait. `kill -9 <pid>` does not take it down, it
> seems like it's stuck in the kernel (?). Is this an issue to look at
> cdparanoia for, or to look in the kernel? Perhaps cdparanoia or the
> kernel should have some sort of a timeout? Currently it looks like the
> only fix is a full reboot.

I believe this is a kernel issue.

Processes can become unresponsive and unkillable while
waiting for blocks to be read and in case of read failures
that can take quite some time.

Note that the kernel itself has a somewhat high default
retry count which multiplies the retries the firmware
already does transparently, so a failed read operation
can take minutes to complete while a successful one
takes fractions of a second.

And after the kernel eventually reports a read failure the
application may "smartly" decide to retry a few times as well,
again multiplying the time of the delay.

Before ripping CDs and DVDs with invalid sectors I
therefore set kern.cam.cd.retry_count to 0 and patched
vobcopy to skip invalid-sector ranges faster.

For some DVDs, this reduces the ripping time from
several hours to about 20 minutes.

How long did you wait for cdparanoia to die?
If you only waited a couple of minutes, it's possible
that rebooting may not have been necessary.

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20111105/bd95da6e/signature.pgp


More information about the freebsd-hackers mailing list