Joerg Schilling wrote:
> Hi,
>
> There is a fatal bug in the sg driver:
>
> it may hang infintely and unkillable in open("/dev/sg1", 2)
>
>
> Repeat: Insert a PCATA CD-Writer in a Sony VAIO notebook and run
> cdrecord -scanbus.
>
> I tried a workaround with alarm()/setjmp()/longjmp() but even signals
> are not processed
J�rg,
Could you supply further information such as which
linux kernel version? Is the cdwriter SCSI, ATAPI,
IEE1394, USB-2 ...? Is it likely that there are
2 (pseudo) scsi devices on that notebook?
Looking at sg_open() the only "wait" done there is
associated with the exclusive lock and that wait is
interruptible. sg_open() does call the linux scsi
mid-level code [scsi_block_when_processing_errors()]
which could wait forever in non-interruptible state.
This would imply that the device was continually in
the "recovering from error" state.
If you have access to the machine and cdwriter in
question and the machine is still useable after the
reported problem, then this command may help find
where open("/dev/sg1", ...) is hanging inside the
kernel:
ps -eo cmd,wchan
There may also be some information in the /var/log/messages
file (potentially showing ongoing device resets). If the
cdwriter is ATAPI and the kernel is in the 2.4 series
then turning off (or reducing the speed of) DMA may be
helpful.
Doug Gilbert
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]