Skip to contentSkip to conversation

SCSI system freeze w/2.4.18

DISCUSSION Albrecht Dre? 4 participants 5 messages Apr 4, 2002 – Apr 7, 2002

lore
Share & tools
lore
#0 lore raw

[I already posted this to the users list, but apparently nobody had a solution...]

I upgraded my PowerMac 7300 from 2.4.6-pre3 to (stock) 2.4.18, and since then I have a nasty scsi problem: Trying to read data from the cd drive without a cd loaded (e.g. "dd if=/dev/scd0 of=/dev/null bs=1 count=1") freezes the machine. I usually use this command in a shutdown script to detect and eventually eject a floppy and a cd. This worked perfectly before, but hangs without *any* notice in the logs in 2.4.18.

I am almost sure that this is a SCSI problem, as the same script works still nicely on an iMac (which has a ide cd drive) with 2.4.18.

System details are--
PowerMac 7300/166, CD attached to internal scsi bus (MESH), verbose scsi logging enabled, mesh compiled into the kernel, LinuxPPC 2000, upgraded to Halloween release, kernel 2.4.18 from kernel.org, plus post-release elf patch, built with gcc-2.95.2, glibc 2.1.3

Thanks in advance for any help,

Albrecht.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn (Germany)

       Phone (+49) 228 6199571  -  mailto:[email protected]

_________________________________________________________________________

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw

Albercht,

I have an 8500 with both mesh and a adaptec 2930 card.
I have a yahmaha cd writer on the mesh interface and a 30gig ultra scsi 2 drive on the adaptec 2930.
I rebuilt 2.4.18 several times with the adaptec card as part of the kernel as well as the mesh drive.
I have no problems.
I have never used dd for reading files but I have loaded addition rpms from the stock 7.3 cd disks recently.

I know this does not immediately help but if you want me to try out one of your scripts with an unmounted cd I will be more than glad to!

Regards
Andrew

Quoted 25 lines · Albrecht Dre?

[I already posted this to the users list, but apparently nobody had a solution...]

I upgraded my PowerMac 7300 from 2.4.6-pre3 to (stock) 2.4.18, and since then I have a nasty scsi problem: Trying to read data from the cd drive without a cd loaded (e.g. "dd if=/dev/scd0 of=/dev/null bs=1 count=1") freezes the machine. I usually use this command in a shutdown script to detect and eventually eject a floppy and a cd. This worked perfectly before,
but hangs without *any* notice in the logs in 2.4.18.

I am almost sure that this is a SCSI problem, as the same script works still
nicely on an iMac (which has a ide cd drive) with 2.4.18.

System details are--
PowerMac 7300/166, CD attached to internal scsi bus (MESH), verbose scsi logging enabled, mesh compiled into the kernel, LinuxPPC 2000, upgraded to Halloween release, kernel 2.4.18 from kernel.org, plus post-release elf patch, built with gcc-2.95.2, glibc 2.1.3

Thanks in advance for any help,

Quoted 10 lines

Albrecht.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn (Germany)

       Phone (+49) 228 6199571  -  mailto:[email protected]

_________________________________________________________________________

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
In reply to Albrecht Dre?

Hey,

On 4 Apr, this message from Albrecht Dre? echoed through cyberspace:

Quoted 4 lines

I upgraded my PowerMac 7300 from 2.4.6-pre3 to (stock) 2.4.18, and since then I have a nasty scsi problem: Trying to read data from the cd drive without a cd loaded (e.g. "dd if=/dev/scd0 of=/dev/null bs=1 count=1") freezes the machine.

Hmm, I tried your dd command on my 7600 this morning, and I see weird things as well.

In fact, the system doesn't do _any_ disk access as long as the dd command sits there waiting for the cdrom. dd is unkillable, and it seems no other disk access is possible as long as dd waits.

I can still switch desktops in X, i can type in my xterms, but I cannot start a new command (needs to load the binary from disk...), and all existing processes that need to read from disk are blocked.

Inserting a CD makes the dd command complete, and the system unfreezes.

This is with stock (more or less; unrelated local changes) 2.4.16. Not sure how older kernels behaved....

Cheers

Michel

-------------------------------------------------------------------------

Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   [email protected]            |
http://www.cpu.lu/~mlan        |                     Learn Always. "

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw

Kernel Gurus: Module insertion deadlock? [Was: SCSI system freeze w/2.4.18]

Am 05.04.02 21:35:34 schrieb(en) Michel Lanners:

Quoted 15 lines

Hey,

On 4 Apr, this message from Albrecht Dre? echoed through cyberspace:

Quoted 4 lines

I upgraded my PowerMac 7300 from 2.4.6-pre3 to (stock) 2.4.18, and since then I have a nasty scsi problem: Trying to read data from the cd drive without a cd loaded (e.g. "dd if=/dev/scd0 of=/dev/null bs=1 count=1") freezes the machine.

Hmm, I tried your dd command on my 7600 this morning, and I see weird things as well.

In fact, the system doesn't do _any_ disk access as long as the dd command sits there waiting for the cdrom. dd is unkillable, and it seems no other disk access is possible as long as dd waits.

[snip]

Quoted 1 line

Inserting a CD makes the dd command complete, and the system unfreezes.

O.k., this was more a "user panic", as the script hung upon system shutdown, and after a while I simply powered off...

I played a little more with this, and got the following picture:

* scsi cd support built into the kernel: the access works without a cd in the drive

* scsi cd support built as module
- do a "modprobe sr_mod" (which inserts sr_mod.o and cdrom.o): access

    works like support built fixed into the kernel;

- remove sr_mod (cdrom.o may still be loaded): access leads to the hang as described.

So I think there is some kind of deadlock between dd and the module insertion (which includes a disk access to read/load the module). As I do not see this on an iMac with a ide cd drive, it might be a problem either in sr_mod or in the scsi stuff. However, the iMac has two separate ide busses for the cd and the disk, so the hang might be "same bus" related. Maybe some of the kernel gurus know more about that?

Thanks,

Albrecht.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn (Germany)

       Phone (+49) 228 6199571  -  mailto:[email protected]

_________________________________________________________________________

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw

Re: Kernel Gurus: Module insertion deadlock? [Was: SCSI system freeze w/2.4.18]

Quoted 9 lines · Albrecht Dre?

I played a little more with this, and got the following picture:

* scsi cd support built into the kernel: the access works without a cd in the drive

* scsi cd support built as module
- do a "modprobe sr_mod" (which inserts sr_mod.o and cdrom.o): access

     works like support built fixed into the kernel;
Quoted 8 lines

- remove sr_mod (cdrom.o may still be loaded): access leads to the hang as described.

So I think there is some kind of deadlock between dd and the module insertion (which includes a disk access to read/load the module). As I do not see this on an iMac with a ide cd drive, it might be a problem either in sr_mod or in the scsi stuff. However, the iMac has two separate ide busses for the cd and the disk, so the hang might be "same bus" related.

Indeed, I've experienced the same problem on a Cube where both HD and CD-ROM are on the first IDE bus. Used to work before around 2.4.10, don't remember exactly.

--
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member / CS student, Free Software enthusiast

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/