[sclug] Uninterruptible sleep

Alex Butcher lug at assursys.co.uk
Sat Dec 3 18:11:54 UTC 2005


On Sat, 3 Dec 2005, Derek M Jones wrote:

> Does anybody have any ideas on how I can kill a process that
> has entered a D (uninterruptible sleep) state?

By rebooting, or making the syscall (probably IO related) it has made
complete. :-)

Not the answer you wanted to hear, I'm sure, but there you go.

> It is happening for any command that accesses one of my RAID 5
> mounts (mdadm -D /dev/md1 worked fine, mdadm -E /dev/md1
> goes into a D+ state).

I don't think you should be running -E on the md device, but on the
partitions that make it up. Here, mdadm works as follows:

# cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 hdg9[1] hde9[0]
       121154048 blocks [2/2] [UU]

md0 : active raid0 hdg7[1] hde7[0]
       64018432 blocks 256k chunks

unused devices: <none>

# mdadm -E /dev/md0
mdadm: No super block found on /dev/md0 (Expected magic a92b4efc, got
00000000)

# mdadm -E /dev/hde7
/dev/hde7:
           Magic : a92b4efc
         Version : 00.90.00
            UUID : b9c1c772:4dc83f5e:0fdc54e2:86d35763
   Creation Time : Thu Nov 18 00:37:31 2004
      Raid Level : raid0
     Device Size : 32009216 (30.53 GiB 32.78 GB)
    Raid Devices : 2
   Total Devices : 2
Preferred Minor : 0

     Update Time : Thu Nov 18 00:37:31 2004
           State : dirty
  Active Devices : 2
Working Devices : 2
  Failed Devices : 0
   Spare Devices : 0
        Checksum : cc894c9a - correct
          Events : 0.1

      Chunk Size : 256K

       Number   Major   Minor   RaidDevice State
this     0      33        7        0      active sync   /dev/hde7
    0     0      33        7        0      active sync   /dev/hde7
    1     1      34        7        1      active sync   /dev/hdg7

I don't know why your mdadm/kernel isn't returning immediately. Try
attaching strace to it and see what the last syscall it made was. Try
running it under strace.

Best Regards,
Alex.
-- 
Alex Butcher      Brainbench MVP for Internet Security: www.brainbench.com
Bristol, UK                      Need reliable and secure network systems?
PGP/GnuPG ID:0x271fd950                         <http://www.assursys.com/>


More information about the Sclug mailing list