From sam@FreeBSD.org  Fri Oct 31 14:33:56 2003
Return-Path: <sam@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E9F7A16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Oct 2003 14:33:56 -0800 (PST)
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 258C843F3F
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Oct 2003 14:33:56 -0800 (PST)
	(envelope-from sam@FreeBSD.org)
Received: from freefall.freebsd.org (sam@localhost [127.0.0.1])
	by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9VMXuFY089357
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 Oct 2003 14:33:56 -0800 (PST)
	(envelope-from sam@freefall.freebsd.org)
Received: (from sam@localhost)
	by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9VMXujk089356;
	Fri, 31 Oct 2003 14:33:56 -0800 (PST)
	(envelope-from sam)
Message-Id: <200310312233.h9VMXujk089356@freefall.freebsd.org>
Date: Fri, 31 Oct 2003 14:33:56 -0800 (PST)
From: Sam Leffler <sam@FreeBSD.org>
Reply-To: Sam Leffler <sam@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: panic: pmap_enter: attemped pmap_enter on 4MB page
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58787
>Category:       kern
>Synopsis:       [panic] pmap_enter: attemped pmap_enter on 4MB page
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 31 14:40:17 PST 2003
>Closed-Date:    Mon Nov 19 17:06:52 UTC 2007
>Last-Modified:  Mon Nov 19 17:06:52 UTC 2007
>Originator:     Sam Leffler
>Release:        FreeBSD 5.1-CURRENT
>Organization:
>Environment:
System: FreeBSD tubby 5.1-CURRENT FreeBSD 5.1-CURRENT #19: Thu Oct 30 12:55:55 PST 2003     sam@tubby:/data/devel/netperf/i386/compile/TUBBY  i386

I'm getting frequent panics.  The machine is primarly an NFS server.

pmap_enter: vm 0xc869e00, pte 0xbff21a78, origpte 0xefa0 
panic: pmap_enter: attemped pmap_enter on 4MB page
 
pmap_enter(c07bf6a0,c869e00,c18e0cc8,7,1) at pmap_enter+0xd6
kmem_malloc(c0550b0,1000,103,df669978,c067ad93) at kmem_malloc+0x536
page_alloc(c0c4c789,1000,df669978,103,c0712fe9) at page_alloc+0x27
slab_zalloc
uma_zone_slab
uma_zalloc_bucket
uma_zalloc
getnewvnode
ffs_vget
ufs_fhtovp
nfsrv_fhtovp
nfsrv3_access
nfssv_nfsd
nfssvc

kernel config:

machine		i386
cpu		I686_CPU
ident		TUBBY
maxusers	0

options 	DISABLE_PSE		# XXX temporary
options 	DISABLE_PG_G		# XXX temporary

#To statically compile in device wiring instead of /boot/device.hints
#hints		"GENERIC.hints"		#Default places to look for devices.

makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols

options		SCHED_4BSD		#4BSD scheduler

options 	INET			#InterNETworking
options 	INET6			#IPv6 communications protocols
#options		FAST_IPSEC
#options		IPSEC_FILTERGIF
#options 	ZERO_COPY_SOCKETS
options 	FFS			#Berkeley Fast Filesystem
options 	SOFTUPDATES		#Enable FFS soft updates support
options 	UFS_ACL			#Support for access control lists
options 	UFS_DIRHASH		#Improve performance on big directories
options 	NFSCLIENT		#Network Filesystem Client
options 	NFSSERVER		#Network Filesystem Server
options 	MSDOSFS			#MSDOS Filesystem
options 	CD9660			#ISO 9660 Filesystem
options 	PROCFS			#Process filesystem (requires PSEUDOFS)
options 	PSEUDOFS		#Pseudo-filesystem framework
options 	COMPAT_43		#Compatible with BSD 4.3 [KEEP THIS!]
options 	COMPAT_FREEBSD4		#Compatible with FreeBSD4
options 	KTRACE			#ktrace(1) support
options 	SYSVSHM			#SYSV-style shared memory
options 	SYSVMSG			#SYSV-style message queues
options 	SYSVSEM			#SYSV-style semaphores
options 	_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions

# Debugging for use in -current
options 	DDB			#Enable the kernel debugger
options 	INVARIANTS		#Enable calls of extra sanity checking
options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
options 	WITNESS			#Enable checks to detect deadlocks and cycles
options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed

#options 	IPFIREWALL		#firewall
#options 	IPFIREWALL_VERBOSE	#enable logging to syslogd(8)
#options 	IPFIREWALL_FORWARD	#enable transparent proxy support
#options 	IPFIREWALL_DEFAULT_TO_ACCEPT	#allow everything by default
#options 	IPV6FIREWALL		#firewall for IPv6
#options 	IPV6FIREWALL_VERBOSE
#options 	IPV6FIREWALL_DEFAULT_TO_ACCEPT
#options 	IPDIVERT		#divert sockets

#options 	DUMMYNET
#options 	BRIDGE
options		HZ=1000

#options 	NETGRAPH		#netgraph(4) system

device		crypto
device		cryptodev
device		ubsec
#options		UBSEC_DEBUG
device		hifn
#options		HIFN_DEBUG
#device		safe
#options		SAFE_DEBUG

device		rndtest
options		UBSEC_RNDTEST
options		HIFN_RNDTEST
#options		SAFE_RNDTEST

device		isa
device		eisa
device		pci

# Floppy drives
device		fdc

# ATA and ATAPI devices
device		ata
device		atadisk			# ATA disk drives
device		atapicd			# ATAPI CDROM drives
device		atapifd			# ATAPI floppy drives
options 	ATA_STATIC_ID		#Static device numbering

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc		# AT keyboard controller
device		atkbd		# AT keyboard
device		psm		# PS/2 mouse
device		vga		# VGA video card driver
device		agp		# support several AGP chipsets
device		sc		# syscons is the default console driver

# Floating point support - do not disable.
device		npx

device		acpi
device		pmtimer

# PCCARD (PCMCIA) support
# Pcmcia and cardbus bridge support
device		cbb			# cardbus (yenta) bridge
#device		pcic			# ExCA ISA and PCI bridges
device		pccard			# PC Card (16-bit) bus
device		cardbus			# CardBus (32-bit) bus

# Serial (COM) ports
device		sio		# 8250, 16[45]50 based serial ports

# Parallel port
device		ppc
device		ppbus		# Parallel port bus (required)
device		lpt		# Printer

device		em		# Intel PRO/1000 adapter Gigabit Ethernet Card

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device		miibus		# MII bus support
device		bge		# Broadcom
device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
device		tx		# SMC EtherPower II (83c170 ``EPIC'')
device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')

# Wireless NIC cards
#device		wlan		# 802.11 common support
#device		ath		# Atheros
#device		wi		# WaveLAN/Intersil/Symbol 802.11 wireless NICs.

# Pseudo devices - the number indicates how many units to allocate.
device		random		# Entropy device
device		loop		# Network loopback
device		ether		# Ethernet support
device		pty		# Pseudo-ttys (telnet etc)
device		md		# Memory "disks"
device		gif		# IPv6 and IPv4 tunneling
device		faith		# IPv6-to-IPv4 relaying (translation)
device		vlan		# VLAN network interface

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
device		bpf		# Berkeley packet filter

# USB support
device		uhci		# UHCI PCI->USB interface
device		ohci		# OHCI PCI->USB interface
device		usb		# USB Bus (required)
#device		udbp		# USB Double Bulk Pipe devices
device		ugen		# Generic
device		uhid		# "Human Interface Devices"
device		ukbd		# Keyboard
device		ulpt		# Printer
device		ums		# Mouse

device		umass		# Disks/Mass storage - Requires scbus and da
device		scbus		# SCSI bus (required for SCSI)
device		da		# Direct Access (disks)

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.
FreeBSD 5.1-CURRENT #19: Thu Oct 30 12:55:55 PST 2003
    sam@tubby:/data/devel/netperf/i386/compile/TUBBY
Preloaded elf kernel "/boot/kernel/kernel" at 0xc0853000.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 1.80GHz (1794.19-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf24  Stepping = 4
  Features=0x3febfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM>
real memory  = 805240832 (767 MB)
avail memory = 772485120 (736 MB)
Pentium Pro MTRR support enabled
    ACPI-0660: *** Warning: Type override - [DEB_] had invalid type (Integer) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [MLIB] had invalid type (Integer) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [IO__] had invalid type (Integer) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [DATA] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [SIO_] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [SB__] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [PM__] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [ICNT] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [ACPI] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [IORG] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [SB__] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [PM__] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [SIO_] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [PM__] had invalid type (String) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [BIOS] had invalid type (Integer) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [CMOS] had invalid type (Integer) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [KBC_] had invalid type (Integer) for Scope operator, changed to (Scope)
    ACPI-0660: *** Warning: Type override - [OEM_] had invalid type (Integer) for Scope operator, changed to (Scope)
acpi0: <RCC    GCSL    > on motherboard
acpi0: Power Button (fixed)
acpi0: Sleep Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000
pcibios: BIOS version 2.10
Using $PIR table, 16 entries at 0xc00f4f50
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x508-0x50b on acpi0
acpi_cpu0: <CPU> on acpi0
acpi_cpu1: <CPU> on acpi0
acpi_cpu2: <CPU> on acpi0
acpi_cpu3: <CPU> on acpi0
acpi_cpu4: <CPU> on acpi0
acpi_cpu5: <CPU> on acpi0
acpi_cpu6: <CPU> on acpi0
acpi_cpu7: <CPU> on acpi0
acpi_button0: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib0: device has too many interrupts (3)
pcib0: device has too many interrupts (2)
pcib0: device has too many interrupts (2)
pci0: <display, VGA> at device 7.0 (no driver attached)
em0: <Intel(R) PRO/1000 Network Connection, Version - 1.7.16> port 0xa400-0xa43f mem 0xfe7e0000-0xfe7effff,0xfe7a0000-0xfe7bffff irq 9 at device 8.0 on pci0
em0: [MPSAFE]
em0:  Speed:N/A  Duplex:N/A
isab0: <PCI-ISA bridge> at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <ServerWorks CSB5 UDMA100 controller> port 0xffa0-0xffaf,0x374-0x377,0x170-0x177,0x3f4-0x3f7,0x1f0-0x1f7 at device 15.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata0: [MPSAFE]
ata1: at 0x170 irq 15 on atapci0
ata1: [MPSAFE]
ohci0: <OHCI (generic) USB controller> mem 0xfe7fe000-0xfe7fefff irq 10 at device 15.2 on pci0
usb0: OHCI version 1.0, legacy support
usb0: SMM does not respond, resetting
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: (0x1166) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
pcib1: <ACPI Host-PCI bridge> on acpi0
pci1: <ACPI PCI bus> on pcib1
pcib1: device has too many interrupts (2)
ubsec0 mem 0xfe8f0000-0xfe8fffff irq 5 at device 3.0 on pci1
ubsec0: [MPSAFE]
ubsec0: Broadcom 5822
pcib2: <ACPI Host-PCI bridge> on acpi0
pci2: <ACPI PCI bus> on pcib2
pcib2: device has too many interrupts (3)
em1: <Intel(R) PRO/1000 Network Connection, Version - 1.7.16> port 0xc800-0xc83f mem 0xfe9e0000-0xfe9fffff irq 11 at device 7.0 on pci2
em1: [MPSAFE]
em1:  Speed:N/A  Duplex:N/A
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model IntelliMouse, device ID 3
fdc0: cmd 3 failed at out byte 1 of 3
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
sio1 port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
ppc0 port 0x778-0x77f,0x378-0x37f irq 7 drq 3 on acpi0
ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
ppbus0: <Parallel port bus> on ppc0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
fdc0: cmd 3 failed at out byte 1 of 3
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
orm0: <Option ROMs> at iomem 0xc8000-0xc97ff,0xc0000-0xc7fff on isa0
pmtimer0 on isa0
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> at port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 1794193756 Hz quality 800
Timecounters tick every 1.000 msec
acpi_cpu: throttling enabled, 16 steps (100% to 6.2%), currently 100.0%
GEOM: create disk ad0 dp=0xc5e95a70
ad0: 76319MB <WDC WD800JB-00CRA1> [155061/16/63] at ata0-master UDMA100
GEOM: create disk ad1 dp=0xc5e95870
ad1: 4112MB <WDC AC14300R> [8912/15/63] at ata0-slave UDMA66
acd0: CDRW <TOSHIBA DVD-ROM SD-R1312> at ata1-master PIO4
Mounting root from ufs:/dev/ad0s3a
WARNING: / was not properly dismounted
WARNING: /usr was not properly dismounted
/usr: mount pending error: blocks 4 files 1
/usr: superblock summary recomputed
WARNING: /data was not properly dismounted
/data: superblock summary recomputed
em0: Link is up 1000 Mbps Full Duplex
em0: Link is up 1000 Mbps Full Duplex
em0: Link is up 1000 Mbps Full Duplex
>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->peter 
Responsible-Changed-By: sam 
Responsible-Changed-When: Fri Oct 31 15:08:15 PST 2003 
Responsible-Changed-Why:  
assign to peter since he's going to look at it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58787 

From: "Alan L. Cox" <alc@imimic.com>
To: freebsd-gnats-submit@FreeBSD.org, sam@FreeBSD.org
Cc:  
Subject: Re: kern/58787: [panic] pmap_enter: attemped pmap_enter on 4MB page
Date: Thu, 23 Sep 2004 23:18:44 -0500

 Since we never call _pmap_unwire_pte_hold() on kernel page table pages, 
 I don't think this particular panic is resolved by:
 
 alc         2004-09-22 05:01:48 UTC
 
    FreeBSD src repository
 
    Modified files:
      sys/amd64/amd64      pmap.c
      sys/i386/i386        pmap.c
    Log:
    Correct a long-standing error in _pmap_unwire_pte_hold() affecting
    multiprocessors.  Specifically, the error is conditioning the call to
    pmap_invalidate_page() on whether the pmap is active on the current CPU.
    This call must be unconditional.  Regardless of whether the pmap is 
 active
    on the CPU performing _pmap_unwire_pte_hold(), it could be active on 
 another
    CPU.  For example, a call to pmap_remove_all() by the page daemon could
    result in a call to _pmap_unwire_pte_hold() with the pmap inactive on the
    current CPU and active on another CPU.  In such circumstances, failing to
    call pmap_invalidate_page() results in a stale TLB entry on the other CPU
    that still maps the now deallocated page table page.  What happens 
 next is
    typically a mysterious panic in pmap_enter() by the other CPU, either
    "pmap_enter: attempted pmap_enter on 4MB page" or "pmap_enter: pte 
 vanished,
    va: 0x%lx".  Both occur because the former page table page has been 
 recycled
    and allocated to a new purpose.  Consequently, it no longer contains 
 zeroes.
 
    See also Peter's i386/i386/pmap.c revision 1.448 and the related 
 e-mail
    thread last year.
 
    Many thanks to the engineers at Sandvine for providing clear and concise
    information until all of the pieces of the puzzle fell into place and
    for testing an earlier patch.
 
    MT5 Candidate
 
    Revision  Changes    Path
    1.502     +6 -7      src/sys/amd64/amd64/pmap.c
    1.508     +5 -10     src/sys/i386/i386/pmap.c
Responsible-Changed-From-To: peter->freebsd-bugs 
Responsible-Changed-By: peter 
Responsible-Changed-When: Tue Dec 13 04:19:24 UTC 2005 
Responsible-Changed-Why:  
Send back to the general pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58787 
State-Changed-From-To: open->feedback 
State-Changed-By: kmacy 
State-Changed-When: Mon Nov 19 07:56:53 UTC 2007 
State-Changed-Why:  

I've never seen this, does this still occur? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58787 
State-Changed-From-To: feedback->closed 
State-Changed-By: sam 
State-Changed-When: Mon Nov 19 17:05:59 UTC 2007 
State-Changed-Why:  
this hasn't been observed in a long time and was for ancient code 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58787 
>Unformatted:
