Subject: -current amd64 kernel diagnostic assertion in sys/uvm/uvm_page.c
To: NetBSD current <>
From: Nicolas Joly <>
List: current-users
Date: 10/11/2006 13:52:36
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


I'm getting a `kernel diagnostic assertion' panic on an -current
4.99.3 NetBSD/amd64 machine.

panic: kernel diagnostic assertion "pg->wire_count != 0 || uvmpdpol_pageisqueued_p(pg)" failed: file "/local/src/NetBSD/src/sys/uvm/uvm_page.c", line 1716
Stopped in pid 1655.1 (bozohttpd) at    netbsd:cpu_Debugger+0x5:        leave
db{0}> bt
cpu_Debugger() at netbsd:cpu_Debugger+0x5
panic() at netbsd:panic+0x1fc
__assert() at netbsd:__assert+0x21
uvm_pagedeactivate() at netbsd:uvm_pagedeactivate+0x5c
genfs_putpages() at netbsd:genfs_putpages+0x911
uvn_put() at netbsd:uvn_put+0x41
uvm_fault_internal() at netbsd:uvm_fault_internal+0x3b2
trap() at netbsd:trap+0x842
--- trap (number 1820140231) ---

I'm able to reproduce it at will ... Just try, from another machine,
to get an JPEG image (37B) in an HTML page (2KB) using bozohttpd (from
pkgsrc/www) launched from inetd.

Unfortunately, gdb is unable to handle this situation :-(

root@lanfeust [/var/crash]# gdb /local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/LANFEUST/netbsd.gdb 
GNU gdb 5.3nb1
Copyright 2002 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 "x86_64--netbsd"...
(gdb) target kcore netbsd.2.core
panic: kernel %sassertion "%s" failed: file "%s", line %d
zsh: bus error (core dumped)  gdb /local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/LANFEUST/netbsd.gdb

njoly@lanfeust [~]> uname -a
NetBSD 4.99.3 NetBSD 4.99.3 (LANFEUST) #5: Tue Oct 10 18:25:48 CEST 2006 amd64

This is mostly a GENERIC.MP+DIAGNOSTIC+LOCKDEBUG kernel, with a few
additions (config attached).

Thanks in advance,

Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=LANFEUST

include "arch/amd64/conf/GENERIC"

# Multiprocessor

# Diagnostic/debugging support options
options 	DIAGNOSTIC      # expensive kernel consistency checks
options 	LOCKDEBUG

makeoptions 	COPTS="-O2 -fno-omit-frame-pointer"
options 	DDB             # in-kernel debugger
options 	DDB_TEE_MSGBUF=1
makeoptions 	DEBUG="-g"      # compile full symbol table

# Compatibility options
options 	COMPAT_LINUX    # binary compatibility with Linux

# LM7[89] and compatible hardware monitors
lm0	at isa? port 0x290		# other common ports: 0x280, 0x310

# AMD 768 and 8111 power/ACPI controllers
amdpm*  at pci? dev ? function ?        # RNG and SMBus 1.0 interface
iic* 	at amdpm?			# sensors below are on this bus
adt7463c* at iic? addr 0x2E		# Tyan S2882-D/S2885