Subject: panic: locking against myself
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 07/14/1995 11:52:09
I just crashed with panic: locking against myself. This is on a sparc,
but I suspect a problem in nullfs or union filesystems, which is why
it's going to current-users instead of port-sparc.
The call stack from the crash, not guaranteed because it's based on a
ten-finger copy, is thus:
_ufs_lock+0x80: call _panic
_null_bypass+0xec: jmpl %o1, %o7
_vclean+0x3c: jmpl %o1, %o7
_vgone+0x38: call _vclean
_getnewvnode+0x114: call _vgone
_ffs_vget+0x40: call _getnewvnode
_ufs_lookup+0xcc0: jmpl %o3, %o7
_null_bypass+0xec: jmpl %o1, %o7
_union_lookup1+0xc8: jmpl %o1, %o7
_union_lookup+0x1bc: call _union_lookup1
_lookup+0x330: jmpl %o1, %o7
_namei+0x1c8: call _lookup
_vn_open+0x18c: call _namei
_open+0x6c: call _vn_open
_syscall+0x1ec: jmpl %o3, %o7
softtrap+0x154: call _syscall
The mounts in effect at the time were as follows.
/dev/sd0a on / type ufs (local)
/dev/sd0d on /usr type ufs (local)
/dev/sd0e on /sources type ufs (local)
/dev/sd0h on /local type ufs (local)
/sources/working-usr-src on /usr/src type null (local)
/var/dev on /wdev type null (local)
fdesc on /var/dev type fdesc (local, union)
procfs on /proc type procfs (local)
kernfs on /kern type kernfs (local)
/sources/working-usr-src/sys on /sys type null (local, read-only)
<above>:/sources/sys-top on /sys type union (local)
and I had just typed "mcgrep LIST_ENTRY /sys/sys/*.h" or "mcgrep
LIST_ENTRY ../sys/*.h" or some such - I don't remember the exact path,
but it was doing a grep for LIST_ENTRY over *.h from /sys/sys. It
found a couple of hits and then croaked with the above panic.
Now, there was a make running in
/usr/src/sys/arch/sparc/compile/CALLISTO at the time, and it's
reasonably likely it was accessing stuff from /usr/src/sys/sys, which
would have been coming from the same underlying directory on /sources
as /sys/sys. I don't know whether this is relevant; last time I saw
"locking against myself" panics, it was a straightforward bug in the
filesystem code, not a race....
der Mouse
mouse@collatz.mcrcim.mcgill.edu