Subject: kern/35098: Kernel diag panic: "(vp->v_flag & VONWORKLST) != 0 || (vp->v_flag & VWRITEMAPDIRTY) == 0" failed: file "../../../../miscfs/genfs/genfs_vnops.c",
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <jam@pobox.com>
List: netbsd-bugs
Date: 11/23/2006 04:25:00
>Number:         35098
>Category:       kern
>Synopsis:       Kernel diag panic: "(vp->v_flag & VONWORKLST) != 0 || (vp->v_flag & VWR ITEMAPDIRTY) == 0" failed: file "../../../../miscfs/genfs/genfs_vnops.c",
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 23 04:25:00 +0000 2006
>Originator:     Jam
>Release:        NetBSD 4.99.4
>Organization:
personal
>Environment:
System: NetBSD fs 4.99.4 NetBSD 4.99.4 (XEN3_DOM0) #0: Wed Nov 22 00:55:52 JST 2006 jam@sou:/usr/src/sys/arch/i386/compile/XEN3_DOM0 i386
Architecture: i386
Machine: i386
>Description:
	I am running NetBSD as DomU using LFS.  I was compiling NetBSD
	userland source codes dated "2006-11-21 02:00 UTC".  It crashed
	like below.

	Maybe this is related to kern/35052 and
	http://mail-index.netbsd.org/source-changes/2006/09/30/0035.html
	Problem on LFS seems not fixed yet.

	Crash log:

Starting smbd.
postfix/postfix-script: starting the Postfix mail system
Starting inetd.
Starting cron.
Wed Nov 22 19:58:47 JST 2006

NetBSD/i386 (sou) (console)

login: Nov 22 19:59:20 sou su: jam to root on /dev/ttyp2
fs:/mnt/raid: inaccurate wcc data (mtime) detected, disabling wcc
Nov 22 22:42:17 sou /netbsd: pid 7396 (less), uid 1000: exited on signal 3 (core not dumped, err = 27)
Nov 22 23:08:58 sou su: jam to root on /dev/ttyp6
Nov 22 23:09:26 sou last message repeated 2 times
panic: kernel diagnostic assertion "(vp->v_flag & VONWORKLST) != 0 || (vp->v_flag & VWRITEMAPDIRTY) == 0" failed: file "../../../../miscfs/genfs/genfs_vnops.c", line 1088
Stopped in pid 8.1 (ioflush) at netbsd:cpu_Debugger+0x4:        popl    %ebp
db> trace
cpu_Debugger(c040e863,caff5848,caff583c,c029a26a,c14dc384) at netbsd:cpu_Debugger+0x4
panic(c04330fc,c03fd982,c042c7dc,c042c5c0,440) at netbsd:panic+0x155
__assert(c03fd982,c042c5c0,440,c042c7dc,c0e292a4) at netbsd:__assert+0x2e
genfs_putpages(caff5a60,0,ffffe000,7fffffff,2000) at netbsd:genfs_putpages+0xf1a
lfs_putpages(caff5a60,0,80,c03f3200,cb60e250) at netbsd:lfs_putpages+0x23e
VOP_PUTPAGES(cb60e250,0,0,0,0) at netbsd:VOP_PUTPAGES+0x40
lfs_writefile(c0ad1000,cb91ff74,cb60e250,c02746fe,c0ad1000) at netbsd:lfs_writefile+0x207
lfs_writevnodes(c0ad1000,c0ad7000,cb91ff74,0,caff5b6c) at netbsd:lfs_writevnodes+0x1ba
lfs_segwrite(c0ad7000,5,166694,5000,3) at netbsd:lfs_segwrite+0xc8
lfs_sync(c0ad7000,3,ca480f3c,ca48db90,40500) at netbsd:lfs_sync+0x7b
sync_fsync(caff5bf8,10012,caff5c1c,c0331a47,cb051c34) at netbsd:sync_fsync+0xb3
VOP_FSYNC(cb051c34,ca480f3c,8,0,0) at netbsd:VOP_FSYNC+0x49
sched_sync(ca48db90,0,c01001e7,c01001df,c01001e7) at netbsd:sched_sync+0x25c
db> ps
 PID           PPID     PGRP        UID S   FLAGS LWPS          COMMAND    WAIT
 26305        16482     1106       1000 2  0x4002    1 i386--netbsdelf-
 16482        15507     1106       1000 2  0x4002    1               sh    wait
 15689          851      851          0 2  0x4108    1            local  select
 2351           851      851         12 2  0x4108    1          cleanup  select
 26196          851      851         12 2  0x4108    1  trivial-rewrite  select
 6075           851      851         12 2  0x4108    1         proxymap  select
 12283          851      851         12 2  0x4108    1            smtpd  select
 15507         8829     1106       1000 2  0x4002    1           nbmake    wait
 8829         11040     1106       1000 2  0x4002    1               sh    wait
 18700          851      851         12 2  0x4108    1           pickup  select
 11040        16166     1106       1000 2  0x4002    1           nbmake    wait
 16166         6305     1106       1000 2  0x4002    1               sh    wait
 28350          103    28350       1000 2  0x4002    1              zsh   ttyin
 20845        12011    20845       1000 2  0x4002    1              top    poll
 12011          103    12011       1000 2  0x4002    1              zsh   pause
 6305          1436     1106       1000 2  0x4002    1           nbmake    wait
 1436          1106     1106       1000 2  0x4002    1               sh    wait
 1591          1410     1106       1000 2  0x4002    1              tee  piperd
 1106          1410     1106       1000 2  0x4002    1               sh    wait
 1410           103     1410       1000 2  0x4002    1              zsh   pause
 623            103      623       1000 2  0x4002    1              zsh   ttyin
 473            851      851         12 2  0x4108    1           tlsmgr  select
 278            104      278       1000 2  0x5002    1             mush   ttyin
 469              1      469       1000 2     0x8    1        fetchmail  select
 947            104      947       1000 4  0x5002    1             mush
 208            270      208       1000 2  0x4000    1             perl  select
 270            459      270       1000 2  0x4002    1            emacs  select
 459            103      459       1000 2  0x4002    1              zsh   pause
 74             105       74          0 2  0x4002    1              zsh   ttyin
 105            103      105       1000 2  0x4002    1              zsh   pause
 104            103      104       1000 2  0x4002    1              zsh   pause
 103            102      103       1000 2   0x101    1     screen-4.0.3  select
 102             96      102       1000 2  0x4102    1     screen-4.0.3   pause
 101              1      101       1000 2       0    1        ssh-agent  select
 96              42       96       1000 2  0x4002    1              zsh   pause
 42             788      788       1000 2   0x100    1             sshd  select
 788            437      788          0 2  0x4001    1             sshd   netio
 572              1      572          0 2  0x4002    1            getty   ttyin
 930              1      930          0 2       0    1             cron nanosle
 890            851      851         12 2  0x4108    1             qmgr  select
 798              1      798          0 2       0    1            inetd  kqread
 851              1      851          0 2  0x4108    1           master  select
 447            441      441          0 2   0x101    1             smbd   pause
 441              1      441          0 2   0x101    1             smbd  select
 463              1      463          0 2     0x1    1             nmbd  select
 437              1      437          0 2       0    1             sshd  select
 427              1      427          0 2       0    1           powerd  kqread
 248              0        0          0 2 0x20200    1            nfsio  nfsidl
 246              0        0          0 2 0x20200    1            nfsio  nfsidl
 242              0        0          0 2 0x20200    1            nfsio  nfsidl
 238              0        0          0 2 0x20200    1            nfsio  nfsidl
 241              1      241          0 2       0    1        mount_mfs  mfsidl
 176              1      176          0 2       0    1          syslogd  kqread
 141              1      141          0 2       0    1         dhclient  select
 44               1       44          0 2       0    1     lfs_cleanerd segment
 29               0        0          0 2 0x20200    1          physiod physiod
 9                0        0          0 2 0x20200    1         aiodoned
>8                0        0          0 2 0x20200    1          ioflush
 7                0        0          0 2 0x20200    1       pagedaemon pgdaemo
 6                0        0          0 2 0x20200    1       lfs_writer lfswrit
 5                0        0          0 2 0x20200    1           xenbus    rdst
 4                0        0          0 2 0x20200    1         xenwatch   evtsq
 3                0        0          0 2 0x20200    1        cryptoret crypto_
 1                0        1          0 2  0x4001    1             init    wait
 0               -1        0          0 2 0x20200    1          swapper schedul
db> sync
syncing disks...

	When it crashed, I guess it was compiling:

#      link  XEN3_DOM0/netbsd
/usr/src/obj/tooldir/bin/i386--netbsdelf-ld -Map netbsd.map --cref -T /mnt/raid/netbsd/current/src/sys/arch/i386/conf/kern.ldscript.Xen -Ttext c0100000 -e start -X -o netbsd ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o

>How-To-Repeat:
	I was having this problem randomely and a kind of rarely.
	Not sure how to repeat this.
>Fix:
	No idea how to fix this.  Please let me know if there are something
	I should type at next crash.  Thanks.

>Unformatted:
 	I took this kernel source by following command.
 		cvs -q update -dP -D "2006-11-21 02:00 UTC"
 	I has been using kernels compiled from above source codes using
 	XEN3_DOM0 and XEN3_DOMU configuration without modifications.