Subject: Re: Reading file causes process to hang on getblk
To: David Brownlee <abs@anim.dreamworks.com>
From: Dave Huang <khym@bga.com>
List: current-users
Date: 07/05/1997 17:40:46
On Sat, 5 Jul 1997, David Brownlee wrote:
> 	Two small ideas...
> 	  o Boot to single user then run 'fsck -f' just to confirm the
> 	    filesystem is ok.

Did that, fsck didn't find anything wrong.

> 	  o Try 'dd' on the raw partition (again, to see if it is a
> 	    filesystem problem).

Ooh, I did "dd if=/dev/rccd0d of=/dev/null bs=1043968", and it went
through almost the whole partition, then hung on "physio" at or near
the end. I don't know exactly where though... stack trace says:

#0  mi_switch () at ../../../../kern/kern_synch.c:615
#1  0xf8119c51 in bpendtsleep ()
#2  0xf8114ee7 in physio (strategy=0xf810b6f0 <ccdstrategy>, bp=0xf8dbc7f8, 
    dev=4611, flags=1048576, minphys=0xf8115118 <minphys>, uio=0xfcc93f20)
    at ../../../../kern/kern_physio.c:190
#3  0xf810bdb8 in ccdread (dev=0, uio=0xfcc93f20, flags=0)
    at ../../../../dev/ccd.c:1021
#4  0xf813c2e9 in spec_read (v=0xfcc93ed8)
    at ../../../../miscfs/specfs/spec_vnops.c:259
#5  0xf819b9f1 in ufsspec_read (v=0x0) at ../../../../ufs/ufs/ufs_vnops.c:1700
#6  0xf813732f in vn_read (fp=0xf883f6c0, uio=0xfcc93f20, cred=0xf87b4300)
    at ../../../../sys/vnode_if.h:269
#7  0xf811e6e3 in sys_read (p=0xf883b200, v=0xfcc93f88, retval=0xfcc93f80)
    at ../../../../kern/sys_generic.c:112
#8  0xf81aeb58 in syscall (frame={tf_es = 31, tf_ds = 31, tf_edi = -138420804, 
      tf_esi = -138420784, tf_ebp = -138420872, tf_ebx = 8452, tf_edx = 0, 
      tf_ecx = 1, tf_eax = 3, tf_trapno = 3, tf_err = 2, tf_eip = 43983, 
      tf_cs = 23, tf_eflags = 647, tf_esp = -138420896, tf_ss = 31, 
      tf_vm86_es = 0, tf_vm86_ds = 0, tf_vm86_fs = 0, tf_vm86_gs = 0})
    at ../../../../arch/i386/i386/trap.c:623

My /etc/ccd.conf is:
ccd0		32	2	/dev/sd0e /dev/sd1e

Doing "dd if=/dev/rsd0e of=/dev/null bs=1043968" and "dd if=/dev/rsd1e
of=/dev/null bs=1043968" work just fine.

rsd0e is:
#        size   offset    fstype   [fsize bsize   cpg]
  e:  1553718  1091560    4.2BSD     1024  8192    16   # (Cyl. 1082*- 2624*)

rsd1e is:
#        size   offset    fstype   [fsize bsize   cpg]
  e:  1553718  1190168    4.2BSD     1024  8192    16   # (Cyl. 1062*- 2449*)

and ccd0d is:
#        size   offset    fstype   [fsize bsize   cpg]
  d:  3107436        0    4.2BSD     1024  8192    16   # (Cyl.    0 - 1517*)

Is the problem that my ccd interleave size isn't a factor of the
partition size?

-- 
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 21 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++