Hi,
I've been having some problems with a system I'm trying to install OpenBSD 2.7
on (dmesg output is attached). Installation seems to go OK most of the time,
but sometimes I'll get a panic in the FFS driver. This can also happen after a
successful installation, under normal usage of the system (e.g. compiling
stuff, etc). The panic varies, but most of the time it is:
panic: ffs_valloc: dup alloc
a ddb trace then says, for instance:
_panic(e0222260,e1099600,ef6f8ba8,e02223fe,e0222240) at _panic+0x75
_ffs_valloc(ef6f8bd4,e1180100,e1011900,e01897d5,e1011900) at _ffs_valloc+0x11f
_VOP_valloc(e1011900,81a4,e1046380,ef6f8c2c,e1011900) at _VOP_VALLOC+0x5f
_ufs_make_inode(81a4,e1011900,ef6f8e88,ef6f8e9c,ef6f8d74) at _ufs_make_inode+0x61
_ufs_create(ef6f8d84,41,e10ed600,e1047800,ef6f8dd8) at _ufs_create+0x2a
_VOP_CREATE(e1011900,ef6f8e88,ef6f8e9c,ef6f8dd8,0) at _VOP_CREATE+0x5f
_vn_open(ef6f8e78,602,1a4,e01883ca,ef6f8f80) at _vn_open+0xc5
_sys_open(e10ed600,ef6f8f88,ef6f8f80,e0a29460,0) at _sys_open+0xe2
_syscall() at _syscall+0x242
--- syscall (number 5) ---
and sometimes it is:
panic: ifree: freeing free inode
I didn't trace that last one, I have no other machine here which I can connect
to the serial port, and writing this sort of stuff down on analog paper is
quite cumbersome. :)
Now, it seems that the problem is caused by mismatches between the
disk geometry, as seen by the BIOS, the controller and disklabel. For
instance, fdisk(8) says:
# fdisk /dev/rsd1c
Disk: /dev/rsd1c geometry: 553/255/63 [8883945 sectors]
Offset: 0 Signatures: 0xAA55,0x8C518D4A
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
-------------------------------------------------------------------------
0: 83 0 1 1 - 191 254 63 [ 63 - 3084417] Linux files*
1: 83 192 0 1 - 383 254 63 [ 3084480 - 3084480] Linux files*
2: 82 384 0 1 - 400 254 63 [ 6168960 - 273105] Linux swap
3: A6 401 0 1 - 552 254 63 [ 6442065 - 2441880] OpenBSD
while disklabel(8) says:
# disklabel /dev/rsd1c
# using MBR partition 3: type A6 off 6442065 (0x624c51) size 2441880 (0x254298)
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: XP34550W
flags:
bytes/sector: 512
sectors/track: 150
tracks/cylinder: 10
sectors/cylinder: 1500
cylinders: 5899
total sectors: 8890760
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 2187260 6442065 4.2BSD 1024 8192 16 # (Cyl. 4294*- 5752*)
b: 261435 8629325 swap # (Cyl. 5752*- 5927*)
c: 8890760 0 unused 0 0 # (Cyl. 0 - 5927*)
i: 3084417 63 ext2fs # (Cyl. 0*- 2056*)
j: 3084480 3084480 ext2fs # (Cyl. 2056*- 4112*)
k: 273105 6168960 unknown # (Cyl. 4112*- 4294*)
First of all, how does disklabel come up with 8890760 total sectors? I would
rather think cylinders*heads*sectors_per_track = 5899*10*150 = 8848500 total
sectors. Also, there's a difference of 8890760-8883945=6815 sectors between
what fdisk and disklabel thinks, and that can never be good.
It's even stranger that disklabel first declares that the disk has 5899
cylinders, while it says later that the c slice runs from cyl 0-5927... Where
does it get the 28 extra cylinders from?
Please note that previously FreeBSD 3.x ran for most of a year in exact the
same spot/partition where OpenBSD is now, and I have never had any filesystem
problems with it. I think that rules out a bad disk or controller.
If anybody knows what is wrong here, or knows a solution to these panics I am
getting, I would be glad to hear from you.
Cheers,
--
Dimitry Andric <dim_(_at_)_xs4all_(_dot_)_nl>
PGP key: http://www.xs4all.nl/~dim/dim.asc
KeyID: 4096/1024-0x2E2096A3
Fingerprint: 7AB4 62D2 CE35 FC6D 4239 4FCD B05E A30A 2E20 96A3
Attachment:
dmesg.gz
Description: GNU Zip compressed data