Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jul 2005 22:56:33 +0200
From:      =?ISO-8859-1?Q?C=E9dric?= Jonas <cedric@virtual-globe.net>
To:        freebsd-stable@freebsd.org, freebsd-hackers@freebsd.org
Subject:   Panic in bus_dmamap_load_mbuf (pmap.h:201)
Message-ID:  <20050703225633.077566f4@ganymed.decemplex.loc>

next in thread | raw e-mail | index | archive | help
Hello,

Since 1 or 2 months, I experienced panics when I use the ath interface of o=
ur server (configured as hostap). Also, the system hangs often (without pan=
ic) during the boot process at the "Setting hostname: icarus." level. Becau=
se I had absolutely no time, I couldn't learn to use the kernel debugger be=
fore.=20



	icarus# uname -a
	FreeBSD icarus 5.4-STABLE FreeBSD 5.4-STABLE #0: Sun Jul  3 15:14:13 CEST =
2005     cedric@icarus:/usr/obj/usr/src/sys/ICARUS  i386

Sources are from July, 1


	debug.mpsafenet: 1



After compiling the kernel with debug options, I get the following during t=
he boot process:

	Setting hostname: icarus.
	lock order reversal
	 1st 0xc2cd4c6c ath0 (network driver) @ /usr/src/sys/dev/ath/if_ath.c:893
	 2nd 0xc30583c8 user map (user map) @ /usr/src/sys/vm/vm_map.c:2998

I suppose this explains the occasional hangups during the boot process?


The following was obtained after a panic (which occured only when I use the=
 ath interface):

	icarus# kgdb kernel.debug /var/crash/vmcore.86
	[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so=
: Undefined symbol "ps_pglobal_lookup"]
	GNU gdb 6.1.1 [FreeBSD]
	Copyright 2004 Free Software Foundation, Inc.
	GDB is free software, covered by the GNU General Public License, and you a=
re
	welcome to change it and/or distribute copies of it under certain conditio=
ns.
	Type "show copying" to see the conditions.
	There is absolutely no warranty for GDB.  Type "show warranty" for details.
	This GDB was configured as "i386-marcel-freebsd".
	#0  doadump () at pcpu.h:160
	160             __asm __volatile("movl %%fs:0,%0" : "=3Dr" (td));
	(kgdb) list *0xc0695dfd
	0xc0695dfd is in bus_dmamap_load_mbuf (pmap.h:201).
	196
	197             if ((pa =3D PTD[va >> PDRSHIFT]) & PG_PS) {
	198                     pa =3D (pa & ~(NBPDR - 1)) | (va & (NBPDR - 1));
	199             } else {
	200                     pa =3D *vtopte(va);
	201                     pa =3D (pa & PG_FRAME) | (va & PAGE_MASK);
	202             }
	203             return pa;
	204     }
	205
	(kgdb) backtrace
	#0  doadump () at pcpu.h:160
	#1  0xc05241dc in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:=
410
	#2  0xc05244f1 in panic (fmt=3D0xc06f0b1f "%s") at /usr/src/sys/kern/kern_=
shutdown.c:566
	#3  0xc06a96ec in trap_fatal (frame=3D0xe5ba3b80, eva=3D3221110944) at /us=
r/src/sys/i386/i386/trap.c:817
	#4  0xc06a941f in trap_pfault (frame=3D0xe5ba3b80, usermode=3D0, eva=3D322=
1110944) at /usr/src/sys/i386/i386/trap.c:735
	#5  0xc06a9085 in trap (frame=3D
      {tf_fs =3D -440795112, tf_es =3D -1068433392, tf_ds =3D -1027473392, =
tf_edi =3D -1026674344, tf_esi =3D -1026496768, tf_ebp =3D -440779748, tf_i=
sp =3D -440779860, tf_ebx =3D 0, tf_edx =3D 0, tf_ecx =3D -117273402, tf_ea=
x =3D 1019944, tf_trapno =3D 12, tf_err =3D 0, tf_eip =3D -1066836483, tf_c=
s =3D 8, tf_eflags =3D 66055, tf_esp =3D -440779804, tf_ss =3D -1068382496}=
) at /usr/src/sys/i386/i386/trap.c:425
	#6  0xc069796a in calltrap () at /usr/src/sys/i386/i386/exception.s:140
	#7  0xe5ba0018 in ?? ()
	#8  0xc0510010 in exit1 (td=3D0xc2cba680, rv=3D-440779764) at /usr/src/sys=
/kern/kern_exit.c:394
	#9  0xc0494122 in ath_rxbuf_init (sc=3D0xc2cd4000, bf=3D0xc2ce3158) at /us=
r/src/sys/dev/ath/if_ath.c:1601
	#10 0xc0494560 in ath_rx_proc (arg=3D0xc2cd4000, npending=3D1) at /usr/src=
/sys/dev/ath/if_ath.c:1818
	#11 0xc0540c57 in taskqueue_run (queue=3D0xc2c94dc0) at /usr/src/sys/kern/=
subr_taskqueue.c:191
	#12 0xc0540cbe in taskqueue_swi_run (dummy=3D0x0) at /usr/src/sys/kern/sub=
r_taskqueue.c:213
	#13 0xc0512ad8 in ithread_loop (arg=3D0xc2c28300) at /usr/src/sys/kern/ker=
n_intr.c:547
	#14 0xc0511ed4 in fork_exit (callout=3D0xc05129b4 <ithread_loop>, arg=3D0x=
c2c28300, frame=3D0xe5ba3d38) at /usr/src/sys/kern/kern_fork.c:791
	#15 0xc06979cc in fork_trampoline () at /usr/src/sys/i386/i386/exception.s=
:209
	(kgdb)=20



My kernel config:

	machine		i386
	cpu			I686_CPU
	ident		ICARUS
=09
	# To statically compile in device wiring instead of /boot/device.hints
	#hints		"GENERIC.hints"		# Default places to look for devices.
=09
	makeoptions	DEBUG=3D-g		# Build kernel with gdb(1) debug symbols
=09
	options 	KDB			# Enable kernel debugger support.
	options 	GDB			# Support remote GDB.
	options 	INVARIANTS		# Enable calls of extra sanity checking
	options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, r=
equired by INVARIANTS
	options 	WITNESS			# Enable checks to detect deadlocks and cycles
	options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
=09
	options 	SCHED_4BSD		# 4BSD scheduler
	options 	INET			# InterNETworking
	options 	INET6			# IPv6 communications protocols
	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 	MD_ROOT			# MD is a potential root device
	options 	NFSCLIENT		# Network Filesystem Client
	options 	NFSSERVER		# Network Filesystem Server
	options 	CD9660			# ISO 9660 Filesystem
	options 	PROCFS			# Process filesystem (requires PSEUDOFS)
	options 	PSEUDOFS		# Pseudo-filesystem framework
	options 	GEOM_GPT		# GUID Partition Tables.
	options 	COMPAT_43		# Compatible with BSD 4.3 [KEEP THIS!]
	options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
	options 	SCSI_DELAY=3D15000	# Delay (in ms) before probing SCSI
	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
	options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
	options 	AHC_REG_PRETTY_PRINT	# Print register bitfields in debug
						# output.  Adds ~128k to driver.
	options 	AHD_REG_PRETTY_PRINT	# Print register bitfields in debug
						# output.  Adds ~215k to driver.
	options 	ADAPTIVE_GIANT		# Giant mutex is adaptive.
=09
	device		apic		# I/O APIC
=09
	# Bus support.  Do not remove isa, even if you have no isa slots
	device		isa
	device		pci
=09
	# Floppy drives
	device		fdc
=09
	# ATA and ATAPI devices
	device		ata
	device		atadisk		# ATA disk drives
	device		ataraid		# ATA RAID drives
	device		atapicd		# ATAPI CDROM drives
	device		atapifd		# ATAPI floppy drives
	device		atapist		# ATAPI tape drives
	options 	ATA_STATIC_ID	# Static device numbering
=09
	# SCSI peripherals
	device		scbus		# SCSI bus (required for SCSI)
	device		ch		# SCSI media changers
	device		da		# Direct Access (disks)
	device		sa		# Sequential Access (tape etc)
	device		cd		# CD
	device		pass		# Passthrough device (direct SCSI access)
	device		ses		# SCSI Environmental Services (and SAF-TE)
=09
	# SCSI controller
	device		sym
=09
	# atkbdc0 controls both the keyboard and the PS/2 mouse
	device		atkbdc		# AT keyboard controller
	device		atkbd		# AT keyboard
	device		psm		# PS/2 mouse
=09
	device		vga		# VGA video card driver
=09
	device		splash
	device		green_saver
=09
	# syscons is the default console driver, resembling an SCO console
	device		sc
=09
	device		agp		# support several AGP chipsets
=09
	# Floating point support - do not disable.
	device		npx
=09
	# Power management support (see NOTES for more options)
	device		apm
	# Add suspend/resume support for the i8254.
	device		pmtimer
=09
	# Serial (COM) ports
	#device		sio		# 8250, 16[45]50 based serial ports
=09
	# Parallel port
	device		ppc
	device		ppbus		# Parallel port bus (required)
	device		lpt		# Printer
	device		plip		# TCP/IP over parallel
	device		ppi		# Parallel port interface device
	device		vpo		# Requires scbus and da
=09
	# 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 NIC=
s!
	device		miibus		# MII bus support
	device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
	device		rl		# RealTek 8129/8139
=09
	# 'device ed' requires 'device miibus'
	device		ed		# NE[12]000, SMC Ultra, 3c503, DS8390 cards
=09
	# Wireless NIC cards
	device		wlan		# 802.11 support
	device		ath
	device		ath_hal		# Atheros HAL (includes binary component)
=09
	# Pseudo devices.
	device		loop		# Network loopback
	device		mem		# Memory and kernel memory devices
	device		io		# I/O device
	device		random		# Entropy device
	device		ether		# Ethernet support
	device		sl		# Kernel SLIP
	device		ppp		# Kernel PPP
	device		tun		# Packet tunnel.
	device		pty		# Pseudo-ttys (telnet etc)
	device		md		# Memory "disks"
	device		gif		# IPv6 and IPv4 tunneling
	device		faith		# IPv6-to-IPv4 relaying (translation)
=09
	# The `bpf' device enables the Berkeley Packet Filter.
	# Be aware of the administrative consequences of enabling this!
	device		bpf		# Berkeley packet filter
=09
	# 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		umass		# Disks/Mass storage - Requires scbus and da
	device		ums		# Mouse
	device		urio		# Diamond Rio 500 MP3 player
	device		uscanner	# Scanners
=09
	# PF
	device		pf			#PF OpenBSD packet-filter firewall
	device		pflog			#logging support interface for PF
	device		pfsync			#synchronization interface for PF
	options 	ALTQ
	options 	ALTQ_PRIQ	# Priority Queueing
	options 	ALTQ_NOPCC	# Required for SMP build
=09
	# PPPoE DSL
	options		NETGRAPH
	options		NETGRAPH_SOCKET
	options		NETGRAPH_PPPOE
	options		NETGRAPH_ETHER
=09
	# SMP
	options 	SMP			# Symmetric MultiProcessor Kernel
	options		MPTABLE_FORCE_HTT	# Enable HTT CPUs with the MP Table
	options		PREEMPTION
=09
	options 	CPU_ENABLE_TCC
	options 	CPU_FASTER_5X86_FPU
	options 	CPU_SUSP_HLT
=09
	# Save kernel config in binary's
	options 	INCLUDE_CONFIG_FILE
=09
	# Disks
	options 	QUOTA			#enable disk quotas
=09
	# Posix 1003.1b
	options 	P1003_1B_SEMAPHORES
=09
	# Sound
	# device		sound
	# device		snd_ich
	# device		speaker		#Play IBM BASIC-style noises out your speaker
=09
	# SMBus
	device		smbus		# Bus support, required for smb below.
	device		ichsmb
	device		smb
=09
	# Reboot after panic
	options 	PANIC_REBOOT_WAIT_TIME=3D60
=09
	# Emulation
	options 	COMPAT_LINUX
	options 	COMPAT_AOUT
	options 	LINPROCFS
=09
	# Filesystems
	options 	NULLFS			#NULL filesystem



Another important detail could be that I use a dual Xeon box, which HT enab=
led, which results in 4 logical CPU's and explain why anybody reported this=
 problem before?!

I hope somebody could help, if you need additional informations, let me kno=
w.
Thank you.

--=20
Best regards,=20
 C=E9dric Jonas



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050703225633.077566f4>