Subject: i386 current: simple_lock: unitialized lock
To: None <>
From: Erik Bertelsen <>
List: current-users
Date: 07/28/2007 23:02:53
For a while i have two i386 systems that have become very unstable
around the ugrade to 4.99.24 or 4.99.25.

They hang shortly after loading the system with e.g. a cvs update or a build.

Adding DEBUG and DIAGNOSTIC to the kernels did not help much -- sometimes the
machines just hang, sometimes they paniced with an uvm_fault.

Several hangs while trying to update the sources also did bad things to
the file system, e.g. some files ended up containing nul bytes, a lot of CVS
Root files contained garbage, etc. Parts of the sources had to be removed
and re-cvs updated to recover this.

Today adding LOCKDEBUG in the first run seemed to make the systems much
more stable. Now I have made a full cvs update of src and one machine has built
it self completely (sh build) and the slower one is still
working on this.

On the faster machine I then did a cvs -z3 -q update -dP in pgksrc and
almost at the
end it panic'ed again.

This is NetBSD i386 current as of tonight.

A sparc64 and a macppc machine also running current don't seem to be affected.

The panic message and a traceback follows (manually typed from the screen):

simple_lock: unitialized lock
lock: 0xd918f57c, currently at: ../../../../kern/kern_synch.c:184
uvm_fault(0xc047c6c0, 0xdeadb000, 1) -> 0
Stopped in pid 0.21 (system) at netbsd:kprintf+0x8a6: repne scasb (%esi)
db> t
kprintf(c03e8150,8,cca458d8,cca458fe,cca459ac) at netbsd:kprintf+0x8a6
vsnprintf(cca458fe,96,c03e8150,cca459a8,39647830) at netbsd:vsnprintf+0x38
lock_printf(c03e8150,deadbeef,ffffbeef,d,c) at netbsd:lock_printf+0x43
_simple_lock(d918f57c ,c03e9007,,b8,0,460) at netbsd:_simple_lock:+0x7b
ltsleep(d918f57c,14,c03ebd71,0,d918f57c) at netbsd:lpsleep+0x164
acquire(0,600,c01df4b6,5207,10012) at netbsd:acquire+0x104
_lockmgr(d918f57c,10002,d918f4ec,c041290c,8fd) at netbsd:_lockmgr+0x737
ufs_lock(cca45b00,cf5a740c,cca45b1bc,10012,d918f4ec) at netbsd:ufs_lock+0x3a
VOP_LOCK(d918f4ec,10002,0,d918f4ec,d918f4ec) at netbsd:VOP_LOCK+0x23
vn_lock(d918f4ec,10002,50b,d918f544,10) at netbsd_v n_lock+0x96
vrele(d918f4ec,10012,4ac,0,d918f4ec) at netbsd:vrele+0x107
vget(d918f4ec,10012,544,0,c1f33b00) at netbsd:vget+0x86
ffs_sync(c1f35000,3,cb7e0ee0,cb7f5a80,ccb14e3c) at netbsd:ffs_sync+0xbc
sync_fsync(cca45c08,46aba353,cca45c1c,c028f71b,cca45c10) at
VOP_FSYNC(ccb14e3c,cb7e0ee0,8,0,0) at netbsd:VOP_FSYNC+0x47
sched_sync(cb7f5a80,0,c01002ac,fbff,c01002ac) at netbsd:sched_sync+0xcf

Do anyone have any explanations ?

- Erik