Subject: kern/32260: kernel page fault trap when mounting nfs
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <rjgrace@fastmail.fm>
List: netbsd-bugs
Date: 12/06/2005 08:55:00
>Number: 32260
>Category: kern
>Synopsis: kernel page fault trap when mounting nfs
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 06 08:55:00 +0000 2005
>Originator: Richard Grace
>Release: 3.0_RC5
>Organization:
>Environment:
NetBSD Cubit 3.0_RC5 NetBSD 3.0_RC5 (GENERIC) #8: Sat Dec 3 00:02:47 EST 2005 root@Cubit:/usr/obj/sys/arch/i386/compile/GENERIC i386
>Description:
A kernel page fault occurs every time amd tries to mount a non-existent directory.
On rebooting, the lockmgr also panics the kernel.
This is strange, as I have type=linx defined, so there should be no call to nfs mount anyway. The problem also manifests itself on any other non-existent directory within any other amd map - eg, /cdrom/nonexistent and /home/nonexistent
>How-To-Repeat:
Here it is, step by step, along with config files below:
Cubit# cd /home/crashme
uvm_fault(0xc0824d60, 0xfffff000, 0, 1) -> 0xe
kernel: page fault trap, code=0
Stopped in pid 947.1 (ksh) at netbsd:memmove+0x6a: movb 0x2(%esi),%al
db> trace
memmove(cb55acb4,cb55acb8,44,3548fbfb,cb55abfc) at netbsd:memmove+0x6a
nfsm_loadattrcache(cb55aca8,cb55acb4,cb55acb8,0,0) at netbsd:nfsm_loadattrcache+
0x44
nfs_lookup(cb55add4,cb55af08,cb55adec,c03be93a,c0611340) at netbsd:nfs_lookup+0x
525
VOP_LOOKUP(cbbe4498,cb55aef4,cb55af08,20,0) at netbsd:VOP_LOOKUP+0x2e
lookup(cb55aee4,cab70400,400,cb55aefc,0) at netbsd:lookup+0x1fd
namei(cb55aee4,cbba6480,cbba6490,cbba64a0,cbba64b0) at netbsd:namei+0xfc
change_dir(cb55aee4,cab6cb2c,1,cab6cb2c,807e808) at netbsd:change_dir+0x15
sys_chdir(cab6b8c4,cb55af64,cb55af5c,0,c128c800) at netbsd:sys_chdir+0x42
syscall_plain() at netbsd:syscall_plain+0x7e
--- syscall (number 12) ---
0xbdb77fcb:
db> reboot
syncing disks... 12 12 12 12 12 12 done
unmounting file systems...panic: lockmgr: locking against myself
Stopped in pid 792.1 (ksh) at netbsd:cpu_Debugger+0x4: leave
db> trace
cpu_Debugger(c0611740,cbdc0400,ffffffff,10002,0) at netbsd:cpu_Debugger+0x4
panic(c07784a0,0,1b,0,1) at netbsd:panic+0x11d
lockmgr(cbbe45b0,10002,cbbe4540,cbdc0400,c0611a40) at netbsd:lockmgr+0x189
genfs_lock(cb55a850,0,cb55a898,c03bfe1c,c0611a80) at netbsd:genfs_lock+0x1b
VOP_LOCK(cbbe4540,10002,0,cbbe4540,cbbe4540) at netbsd:VOP_LOCK+0x28
vn_lock(cbbe4540,30002,cb55a8ac,c03c0287,1) at netbsd:vn_lock+0x6e
vget(cbbe4540,20002,cb55a8d8,246,c083fc60) at netbsd:vget+0x93
nfs_unmount(c1334000,80000,cab6cb2c,0,1) at netbsd:nfs_unmount+0x3f
dounmount(c1334000,80000,cab6cb2c,0,cb55a944) at netbsd:dounmount+0xb0
vfs_unmountall(cab6cb2c,0,0,0,0) at netbsd:vfs_unmountall+0xb1
vfs_shutdown(0,0,cb55a988,c0350c95,0) at netbsd:vfs_shutdown+0xa6
cpu_reboot(0,0,cb55a988,c0350c6b,cb55a9a8) at netbsd:cpu_reboot+0x103
db_reboot_cmd(1,0,c0270cf1,cb55a9b0,0) at netbsd:db_reboot_cmd+0x4d
db_command(c07beaa4,c060dfe0,cb55aaa8,c03504bd,c0720937) at netbsd:db_command+0x
e3
db_command_loop(c02fefa7,318,1,cab6cc85,0) at netbsd:db_command_loop+0x8e
db_trap(6,0,cb55ab08,c0379323,c1136000) at netbsd:db_trap+0xd4
kdb_trap(6,0,cb55abf4,0,286) at netbsd:kdb_trap+0x132
trap() at netbsd:trap+0xc3
--- trap (number 6) ---
nfs_lookup(cb55add4,cb55af08,cb55adec,c03be93a,c0611340) at netbsd:nfs_lookup+0x
4cb
VOP_LOOKUP(cbbe4540,cb55aef4,cb55af08,20,2) at netbsd:VOP_LOOKUP+0x2e
lookup(cb55aee4,cab70400,400,cb55aefc,cbe1d324) at netbsd:lookup+0x1fd
namei(cb55aee4,3,8b00,200005cb,7fffff04) at netbsd:namei+0xfc
change_dir(cb55aee4,cab6cb2c,1,cab6cb2c,807e808) at netbsd:change_dir+0x15
sys_chdir(cab6b8c4,cb55af64,cb55af5c,0,cb55afa4) at netbsd:sys_chdir+0x42
syscall_plain() at netbsd:syscall_plain+0x7e
--- syscall (number 12) ---
0xbdb77fcb:
db> reboot
rebooting...
--
Cubit# cat /etc/amd.conf
[ global ]
auto_dir = /.amd
dismount_interval = 900
map_type = file
restart_mounts = yes
search_path = /etc/amd
log_file = syslog
log_options = error,noinfo,nostats
[ /home ]
map_name = home
[ /net ]
map_name = net
[ /cdrom ]
map_name = cdrom
browsable_dirs = yes
Cubit# cat /etc/amd/master
/cdrom /etc/amd/cdrom
/home /etc/amd/home
/net /etc/amd/net
Cubit# cat /etc/amd/home
/defaults opts:=soft,intr
* rhost:=cubit;type:=linkx;fs:=/export/home/${key}
Cubit# ps -axw
PID TTY STAT TIME COMMAND
0 ? DKs 0:00.00 [swapper]
1 ? Is 0:00.01 init
2 ? DK 0:00.00 [cryptoret]
3 ? DK 0:00.00 [usb0]
4 ? DK 0:00.00 [usbtask]
5 ? DK 0:00.00 [usb1]
6 ? DK 0:00.00 [usb2]
7 ? DK 0:00.00 [usb3]
8 ? DK 0:00.00 [atabus0]
9 ? DK 0:00.00 [atabus1]
10 ? DK 0:00.00 [cardslot0]
11 ? DK 0:00.00 [cardslot1]
12 ? DK 0:00.00 [pms0]
13 ? DK 0:00.00 [atapibus0]
14 ? DK 0:00.00 [pagedaemon]
15 ? DK 0:00.01 [ioflush]
16 ? DK 0:00.00 [aiodoned]
96 ? IL 0:00.00 nfsd: server
177 ? Is 0:00.19 /usr/sbin/sshd
283 ? Ss 0:00.01 /usr/sbin/rpcbind -l
292 ? S 0:00.10 /usr/sbin/sendmail -FCronDaemon -odi -oem -oi -or0s -t
338 ? Ss 0:00.01 /usr/sbin/syslogd
360 ? S 0:00.08 /usr/sbin/sendmail -FCronDaemon -odi -oem -oi -or0s -t
406 ? IK 0:00.00 [nfsio]
436 ? Is 0:00.10 /usr/sbin/amd -p -a /.amd -F /etc/amd.conf
474 ? IK 0:00.00 [nfsio]
501 ? IK 0:00.00 [nfsio]
505 ? IK 0:00.00 [nfsio]
575 ? Ss 0:00.01 /usr/sbin/mountd
604 ? IL 0:00.00 nfsd: server
631 ? Is 0:00.02 nfsd: master
632 ? IL 0:00.00 nfsd: server
659 ? IL 0:00.00 nfsd: server
694 ? I 0:00.00 cron: running job
702 ? Ss 0:00.04 /usr/sbin/ntpd
725 ? I 0:00.00 cron: running job
856 ? Is 0:00.00 /usr/sbin/cron
367 tty00 R+ 0:00.00 ps -axw
855 tty00 Is 0:00.35 login
947 tty00 S 0:00.02 -ksh
Cubit# ls /export/home
books emul netlogon www.archive.tar.gz
cap ftp rich
carl kitiara webmin
cricket linda www
--
>Fix:
No known fix, though the problem has existed since upgrading from NetBSD 2.1 release.