Subject: kern/12607: NFS panic in __stat13: "panic: lockmgr: locking against myself"
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 04/10/2001 23:49:55
>Number:         12607
>Category:       kern
>Synopsis:       NFS panic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 10 20:53:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        NetBSD-1.5T 2001/03/24
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:

System: NetBSD sometimes 1.5T NetBSD 1.5T (GENERIC) #0: Mon Mar 26 01:38:17 EST 2001     woods@sometimes:/proven/work/woods/NetBSD-src/sys/arch/sparc/compile/GENERIC sparc
Architecture: sparc
Machine: sparc

>Description:

I was hoping that many of the NFS problems had been fixed recently, but
it seems not quite yet.  I see there are also still open PRs on this
too, such as kern/9944, but that one was slightly different and in 1.4.2.

nfs_timer: ignoring error 55
nfs_timer: ignoring error 55

[[ ... thousands of these occur during any heavy NFS usage ... ]]

nfs_timer: ignoring error 55
nfs_timer: ignoring error 55
panic: lockmgr: locking against myself
Stopped in pid 6632 (make) at   cpu_Debugger+0x4:       jmpl            [%o7 + 0x8], %g0
db> trace
lockmgr(0xf6c8b35c, 0x10002, 0xf6c8b2d8, 0xf0090cb8, 0x0, 0x100e2470) at lockmgr+0x774
genfs_lock(0xf6fb4a30, 0xf0095dc4, 0x7c, 0xf086ce00, 0x0, 0x1004c000) at genfs_lock+0x10
vn_lock(0xf6c8b2d8, 0x10002, 0x0, 0x0, 0x0, 0x3bd50) at vn_lock+0x74
vget(0xf6c8b2d8, 0x2, 0x0, 0x70a8c8, 0xf02ba800, 0xf70b3250) at vget+0x108
cache_lookup(0xf6ba2cf0, 0xf6fb4e18, 0xf6fb4e2c, 0xffefffff, 0x8000, 0xffeffc00) at cache_lookup+0x2cc
nfs_lookup(0x14, 0xf086ce00, 0xf6fb4e18, 0xf0165a0c, 0xf023dc00, 0xffeffc00) at nfs_lookup+0x8c
lookup(0x0, 0x20, 0x0, 0x0, 0xf6fb3000, 0xf6544c00) at lookup+0x360
namei(0xf6f53250, 0x56540, 0x1010f6f0, 0x100ee128, 0x1010f740, 0x10000) at namei+0x3a4
sys___stat13(0xf6c3a3d0, 0xf6fb4f28, 0xf6fb4f20, 0xf0090cb8, 0x0, 0x100e2470) at sys___stat13+0x24
syscall(0x116, 0xf6fb4fb0, 0x0, 0x1e, 0x0, 0x1004c000) at syscall+0x1f4
_syscall(0x56540, 0xefffd548, 0x3c400, 0x6c000, 0x297cd, 0x3bd50) at _syscall+0x120
db> sync

[[ now here at this point I did a stupid thing and lost my console
   terminal window temporarily & there was a bunch of interesting output
   before it started counting blocks ]]

42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 pv_link: proc make, va=0xf0370000: unexpected uncached mapping at 0xf5d1c000
pv_link: proc make, va=0xf0369000: unexpected uncached mapping at 0xf5d1d000
pv_link: proc make, va=0xf036a000: unexpected uncached mapping at 0xf5d1e000
pv_link: proc make, va=0xf036b000: unexpected uncached mapping at 0xf5d1f000
pv_link: proc make, va=0xf036c000: unexpected uncached mapping at 0xf5d20000
pv_link: proc make, va=0xf036d000: unexpected uncached mapping at 0xf5d21000
pv_link: proc make, va=0xf036e000: unexpected uncached mapping at 0xf5d22000
pv_link: proc make, va=0xf036f000: unexpected uncached mapping at 0xf5d23000
pv_link: proc make, va=0xf0370000: unexpected uncached mapping at 0xf5d24000
pv_link: proc make, va=0xf0369000: unexpected uncached mapping at 0xf5d25000
pv_link: proc make, va=0xf036a000: unexpected uncached mapping at 0xf5d26000
pv_link: proc make, va=0xf036b000: unexpected uncached mapping at 0xf5d27000
pv_link: proc make, va=0xf036c000: unexpected uncached mapping at 0xf5d28000
pv_link: proc make, va=0xf036d000: unexpected uncached mapping at 0xf5d29000
pv_link: proc make, va=0xf036e000: unexpected uncached mapping at 0xf5d2a000
pv_link: proc make, va=0xf036f000: unexpected uncached mapping at 0xf5d2b000
succeeded
rebooting

[[ note the weird page counting above, starting over after 127, and
   again after 15 ]]

[[ save core was happy, though, but gdb doesn't seem so happy... ]]

# gdb netbsd 
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc--netbsd"...(no debugging symbols found)...
(gdb) target kcore /var/crash/netbsd.1.core
panic: lockmgr: locking against myself
#0  0xf00624f8 in mi_switch ()
(gdb) where
#0  0xf00624f8 in mi_switch ()
#1  0xf0061bbc in bpendtsleep ()
#2  0xf01a4598 in uvm_scheduler ()
#3  0xf0051b80 in check_console ()
#4  0xf0009e2c in cpu_hatch ()
can not access 0x390368, invalid address (390368)
can not access 0x390368, invalid address (390368)
can not access 0x390368, invalid address (390368)
can not access 0x390368, invalid address (390368)
can not access 0xefffffd8, invalid address (efffffd8)
can not access 0xefffffd8, invalid address (efffffd8)
Cannot access memory at address 0xefffffd8.
(gdb) 


>How-To-Repeat:

	mabye try building xsrc in an NFS-mounted partition

	# mount server:/usr/xsrc /usr/xsrc
	# cd /usr/xsrc
	# make all

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: