Bug #1543

Panic in vkernel with NFS as root mount

Added by rumcic almost 5 years ago. Updated almost 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

After applying the patch from issue1192, NFS can be used as a root mount, but
not long after another panic occurs, just after start_init it seems.
Just before the KKASERT in sys/vfs/nfs/nfs_bio.c on line 1608 I
added 'kprintf("%d %d\n", tsiz, nmp->nm_rsize);' and got the following output:
Using memory file: /var/vkernel/memimg.000000
KVM mapped at 0x40000000-0x80000000
Locking CPU0 to real cpu 1
TAP UNIT 0
Copyright (c) 2003-2009 The DragonFly Project.
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
Slab ZoneSize set to 64KB
Leaving critical section, allowing interrupts
DragonFly v2.5.0.57.g6028d-DEVELOPMENT #51: Thu Oct 1 09:43:49 CEST 2009
:/usr/obj/usr/src/sys/MYVKERNEL
real memory = 134217728 (131072K bytes)
avail memory = 127180800 (124200K bytes)
Locking CPU1 to real cpu 1
DragonFly/MP: Multiprocessor
cpu0 (BSP)
cpu1 (AP)
initclocks
Finish MP startup
SMP: AP CPU #1 Launched!
Active CPU Mask: 00000003
objcache(exec-args): too small for ncpus, adjusting cluster_limit 16->32
start scheduler helpers on cpus: 0 1
start dummy scheduler helpers on cpus: 0 1
vkd0: type 0xa5, start 32, end = 20971519, size 20971488 : OK
vkd1: type 0xa5, start 32, end = 4194303, size 4194272 : OK
vke0: bpf attached
vke0: MAC address: 00:be:0e:1d:00:00
fildesc_drvinit() building stdin, stdout, stderr:
md0: Malloc disk
Device configuration finished.
lo0: bpf attached
ip: MPSAFE
arp: MPSAFE
PXE: Warning, no NFS handle passed from loader
Mounting root from nfs:
nfs_mountroot: interface vke0 ip 192.168.250.235 bcast 192.168.250.255 mask
255.255.255.0
NFS_ROOT: 192.168.250.1:/var/vkernel/vkernel_root
NFS_ROOT: No FH passed from loader, attempting mount rpc...success!
Mounting devfs
start_init: trying /sbin/init
16384 8192
panic: assertion: tsiz <= nmp->nm_rsize in nfs_readrpc_bio
mp_lock = 00000001; cpuid = 1
Trace beginning at frame 0x58019d08
panic(58019d2c,548cfc00,4000,580f3a00,58019d44) at 0x80a4b8a
panic(81cfc82,81e8430,81e85df,508c0428,508c0428) at 0x80a4b8a
nfs_readrpc_bio(5773f490,508c0494,549a8a18,508c0494,548cfc00) at 0x814d449
nfs_startio(5773f490,508c0494,0,5773f490,414003cc) at 0x814e7ce
nfssvc_iod_writer(548cfc00,0,0,0,0) at 0x8166165
--
Regards,
Rumko

History

#1 Updated by dillon almost 5 years ago

:After applying the patch from issue1192, NFS can be used as a root mount, but
:not long after another panic occurs, just after start_init it seems.
:Just before the KKASERT in sys/vfs/nfs/nfs_bio.c on line 1608 I
:added 'kprintf("%d %d\n", tsiz, nmp->nm_rsize);' and got the following output:
:Using memory file: /var/vkernel/memimg.000000
:KVM mapped at 0x40000000-0x80000000
:Locking CPU0 to real cpu 1
:16384 8192
:panic: assertion: tsiz <= nmp->nm_rsize in nfs_readrpc_bio
:mp_lock = 00000001; cpuid = 1
:...
:Regards,
:Rumko

Ok, please try this patch:

fetch http://apollo.backplane.com/DFlyMisc/nfs01.patch

-Matt
Matthew Dillon
<>

#2 Updated by rumcic almost 5 years ago

<snip>
>
> Ok, please try this patch:
>
> fetch http://apollo.backplane.com/DFlyMisc/nfs01.patch
>
> -Matt
> Matthew Dillon
> <>

Better, but not perfect. Also the part about the nfs server (it's running on
the host machine) not responding is bothering me, but that's a different
issue.

KVM mapped at 0x40000000-0x80000000
Locking CPU0 to real cpu 1
TAP UNIT 0
Copyright (c) 2003-2009 The DragonFly Project.
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
Slab ZoneSize set to 64KB
Leaving critical section, allowing interrupts
DragonFly v2.5.0.135.gda5ac-DEVELOPMENT #54: Fri Oct 2 23:23:26 CEST 2009
:/usr/obj/usr/src/sys/MYVKERNEL
real memory = 134217728 (131072K bytes)
avail memory = 127180800 (124200K bytes)
Locking CPU1 to real cpu 1
DragonFly/MP: Multiprocessor
cpu0 (BSP)
cpu1 (AP)
initclocks
Finish MP startup
SMP: AP CPU #1 Launched!
Active CPU Mask: 00000003
objcache(exec-args): too small for ncpus, adjusting cluster_limit 16->32
start scheduler helpers on cpus: 0 1
start dummy scheduler helpers on cpus: 0 1
vkd0: type 0xa5, start 32, end = 20971519, size 20971488 : OK
vkd1: type 0xa5, start 32, end = 4194303, size 4194272 : OK
vke0: bpf attached
vke0: MAC address: 00:be:0e:1d:00:00
md0: Malloc disk
Device configuration finished.
lo0: bpf attached
ip: MPSAFE
arp: MPSAFE
PXE: Warning, no NFS handle passed from loader
Mounting root from nfs:
nfs_mountroot: interface vke0 ip 192.168.250.235 bcast 192.168.250.255 mask
255.255.255.0
NFS_ROOT: 192.168.250.1:/var/vkernel/vkernel_root
NFS_ROOT: No FH passed from loader, attempting mount rpc...success!
Mounting devfs
start_init: trying /sbin/init
Interface vke0 IP-Address 192.168.250.235 Broadcast 192.168.250.255
mount_nfs: can't update /var/db/mounttab for
192.168.250.1:/var/vkernel/vkernel_root/etc
nfs server 192.168.250.1:/var/vkernel/vkernel_root/etc: not responding
nfs server 192.168.250.1:/var/vkernel/vkernel_root/etc: is alive again
Loading configuration files.
Loading devfs rules: /etc/defaults/devfs.conf.
kern.seedenable: 0 -> 1
panic: assertion: tsiz <= nmp->nm_rsize in nfs_readrpc_bio
mp_lock = 00000001; cpuid = 1
Trace beginning at frame 0x58019d00
panic(58019d24,4000,580f3eb0,5094c674,58019d44) at 0x80a4d86
panic(81d0522,81e8d5b,81e8f1f,2000,0) at 0x80a4d86
nfs_readrpc_bio(5a6a32d0,5094c6e0,549a8a18,5094c6e0,548cfc00) at 0x814d7d2
nfs_startio(5a6a32d0,5094c6e0,0,5a6a32d0,414003cc) at 0x814f038
nfssvc_iod_writer(548cfc00,0,0,0,0) at 0x8166999
Debugger("panic")

CPU1 stopping CPUs: 0x00000001
stopped
Stopped at 0x81c45d9: movb $0,0x8302834
--
Regards,
Rumko

#3 Updated by dillon almost 5 years ago

Ok, this is fixed now!

-Matt

Also available in: Atom PDF