Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jun 2004 15:49:44 +0200
From:      Simon Barner <barner@in.tum.de>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@freebsd.org
Subject:   Re: Bogus signal handler causes kernel panic (5.2.1-p8/i386)
Message-ID:  <20040618134944.GC1049@zi025.glhnet.mhn.de>
In-Reply-To: <20040617215851.V1012@gamplex.bde.org>
References:  <20040616105706.GC1140@zi025.glhnet.mhn.de> <20040617134101.V1345@gamplex.bde.org> <20040617215851.V1012@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--8w3uRX/HFJGApMzv
Content-Type: multipart/mixed; boundary="ctP54qlpMx3WjD+/"
Content-Disposition: inline


--ctP54qlpMx3WjD+/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Bruce,

first of all thanks a lot for your comprehensive replys. I tried both of
your patched with the following results:

- patch 1 ("the quick & dirty one"): The panic is gone, the program is its
  infinite loop printing lots of '.'s and some '*'s, without any
  recognizable pattern and consumes 100% cpu, but nothing bad happens.

- patch 2 ("the not so quick one"): My system still panics (stack trace
  attached).
 =20
  Additionally, I see the following messages on my console (e.g. when I
  run `script' (but only as root IIRC, I can examine this further if you
  need this information):
 =20
Jun 18 14:56:09 zi025 kernel: kernel trap 22 with interrupts disabled
Jun 18 14:56:09 zi025 kernel: npxdna: fpcurthread =3D=3D curthread 1 times
                                                              ^^^
                                            this counter is increasing

For your reference, I also attached my kernel configuration.

Simon

--ctP54qlpMx3WjD+/
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename="panic-patch2.log"
Content-Transfer-Encoding: quoted-printable

GNU gdb 5.2.1 (FreeBSD)
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 condition=
s.
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-unknown-freebsd"...
panic: arithmetic trap
panic messages:
---
Fatal trap 6: arithmetic trap while in kernel mode
instruction pointer	=3D 0x8:0xc061670a
stack pointer	        =3D 0x10:0xcb4b89e4
frame pointer	        =3D 0x10:0xcb4b89e4
code segment		=3D base 0x0, limit 0xfffff, type 0x1b
			=3D DPL 0, pres 1, def32 1, gran 1
processor eflags	=3D resume, IOPL =3D 0
current process		=3D 775 (a.out)
trap number		=3D 6
panic: arithmetic trap

syncing disks, buffers remaining... 224 224 224 224 224 224 224 224 224 224=
 224 224 224 224 224 224 224 224 224 224=20
giving up on 139 buffers
Uptime: 1m46s
Dumping 192 MB
 16 32 48 64 80 96 112 128 144 160 176
---
Reading symbols from /usr/src/sys/i386/compile/KISTE/modules/usr/src/sys/mo=
dules/fdescfs/fdescfs.ko.debug...done.
Loaded symbols for /usr/src/sys/i386/compile/KISTE/modules/usr/src/sys/modu=
les/fdescfs/fdescfs.ko.debug
Reading symbols from /boot/kernel/green_saver.ko...done.
Loaded symbols for /boot/kernel/green_saver.ko
#0  doadump () at ../../../kern/kern_shutdown.c:240
240		dumping++;
(kgdb) bt
#0  doadump () at ../../../kern/kern_shutdown.c:240
#1  0xc04f0cbb in boot (howto=3D256) at ../../../kern/kern_shutdown.c:372
#2  0xc04f0f91 in panic () at ../../../kern/kern_shutdown.c:550
#3  0xc0611f68 in trap_fatal (frame=3D0xcb4b89a4, eva=3D0)
    at ../../../i386/i386/trap.c:821
#4  0xc0611ab4 in trap (frame=3D
      {tf_fs =3D 24, tf_es =3D 16, tf_ds =3D 16, tf_edi =3D 0, tf_esi =3D -=
1055699840, tf_ebp =3D -884241948, tf_isp =3D -884241968, tf_ebx =3D 514, t=
f_edx =3D -1055699840, tf_ecx =3D -884241776, tf_eax =3D -884241776, tf_tra=
pno =3D 6, tf_err =3D 0, tf_eip =3D -1067358454, tf_cs =3D 8, tf_eflags =3D=
 65606, tf_esp =3D -884241932, tf_ss =3D -1067358532})
    at ../../../i386/i386/trap.c:618
#5  0xc0605998 in calltrap () at {standard input}:94
#6  0xc06166bc in npxsetregs (td=3D0x0, addr=3D0x0) at ../../../i386/isa/np=
x.c:963
#7  0xc060bd6b in set_fpcontext (td=3D0xc1134c80, mcp=3D0x0)
    at ../../../i386/i386/machdep.c:2529
#8  0xc060a76a in sigreturn (td=3D0xc1134c80, uap=3D0x0)
    at ../../../i386/i386/machdep.c:982
#9  0xc061224b in syscall (frame=3D
      {tf_fs =3D 47, tf_es =3D 47, tf_ds =3D 47, tf_edi =3D -1077940612, tf=
_esi =3D -1077940604, tf_ebp =3D -1077940684, tf_isp =3D -884241036, tf_ebx=
 =3D 1, tf_edx =3D 672409248, tf_ecx =3D 13, tf_eax =3D 417, tf_trapno =3D =
22, tf_err =3D 2, tf_eip =3D -1077936211, tf_cs =3D 31, tf_eflags =3D 582, =
tf_esp =3D -1077941560, tf_ss =3D 47})
    at ../../../i386/i386/trap.c:1010
#10 0xc06059ed in Xint0x80_syscall () at {standard input}:136
---Can't read userspace from dump, or kernel process---

(kgdb) bt full
#0  doadump () at ../../../kern/kern_shutdown.c:240
No locals.
#1  0xc04f0cbb in boot (howto=3D256) at ../../../kern/kern_shutdown.c:372
No locals.
#2  0xc04f0f91 in panic () at ../../../kern/kern_shutdown.c:550
	td =3D (struct thread *) 0xc1134c80
	bootopt =3D 256
	newpanic =3D 0
	ap =3D 0xcb4b894c "G\001e=C0"
	buf =3D "arithmetic trap", '\0' <repeats 240 times>
#3  0xc0611f68 in trap_fatal (frame=3D0xcb4b89a4, eva=3D0)
    at ../../../i386/i386/trap.c:821
	code =3D 16
	type =3D 6
	ss =3D 16
	esp =3D 0
	softseg =3D {ssd_base =3D 0, ssd_limit =3D 1048575, ssd_type =3D 27,=20
  ssd_dpl =3D 0, ssd_p =3D 1, ssd_xx =3D 0, ssd_xx1 =3D 0, ssd_def32 =3D 1,=
 ssd_gran =3D 1}
#4  0xc0611ab4 in trap (frame=3D
      {tf_fs =3D 24, tf_es =3D 16, tf_ds =3D 16, tf_edi =3D 0, tf_esi =3D -=
1055699840, tf_ebp =3D -884241948, tf_isp =3D -884241968, tf_ebx =3D 514, t=
f_edx =3D -1055699840, tf_ecx =3D -884241776, tf_eax =3D -884241776, tf_tra=
pno =3D 6, tf_err =3D 0, tf_eip =3D -1067358454, tf_cs =3D 8, tf_eflags =3D=
 65606, tf_esp =3D -884241932, tf_ss =3D -1067358532})
    at ../../../i386/i386/trap.c:618
---Type <return> to continue, or q <return> to quit---
	td =3D (struct thread *) 0xc1134c80
	p =3D (struct proc *) 0xc226dc5c
	sticks =3D 3257326684
	i =3D 0
	ucode =3D 0
	type =3D 6
	code =3D 0
	eva =3D 0
#5  0xc0605998 in calltrap () at {standard input}:94
No locals.
#6  0xc06166bc in npxsetregs (td=3D0x0, addr=3D0x0) at ../../../i386/isa/np=
x.c:963
	s =3D 514
#7  0xc060bd6b in set_fpcontext (td=3D0xc1134c80, mcp=3D0x0)
    at ../../../i386/i386/machdep.c:2529
	addr =3D (union savefpu *) 0xcb4b8a90
#8  0xc060a76a in sigreturn (td=3D0xc1134c80, uap=3D0x0)
    at ../../../i386/i386/machdep.c:982
	uc =3D {uc_sigmask =3D {__bits =3D {0, 0, 0, 0}}, uc_mcontext =3D {
    mc_onstack =3D 0, mc_gs =3D 47, mc_fs =3D 47, mc_es =3D 47, mc_ds =3D 4=
7,=20
    mc_edi =3D -1077940612, mc_esi =3D -1077940604, mc_ebp =3D -1077940684,=
=20
    mc_isp =3D -884241036, mc_ebx =3D 1, mc_edx =3D 672409248, mc_ecx =3D 1=
3,=20
    mc_eax =3D 1, mc_trapno =3D 12, mc_err =3D 2, mc_eip =3D 671874187, mc_=
cs =3D 31,=20
    mc_eflags =3D 662, mc_esp =3D -1077940740, mc_ss =3D 47, mc_len =3D 640=
,=20
    mc_fpformat =3D 65537, mc_ownedfp =3D 131074, mc_spare1 =3D {0}, mc_fps=
tate =3D {
---Type <return> to continue, or q <return> to quit---
      -60801, -65536, -1, 0, 0, 0, -65536, -589504512, -589505316, 14764113=
90,=20
      175106046, 1073648009, -402761728, -1853289873, 1476411390, 175106046=
,=20
      1073648009, -1396195328, -1694889029, 16382, 0, 1073989632,=20
      0 <repeats 106 times>}, mc_spare2 =3D {0, 0, 0, 0, 0, 0, 0, 0}},=20
  uc_link =3D 0x0, uc_stack =3D {ss_sp =3D 0x0, ss_size =3D 0, ss_flags =3D=
 4},=20
  uc_flags =3D 0, __spare__ =3D {0, 0, 0, 0}}
	p =3D (struct proc *) 0xc226dc5c
	regs =3D (struct trapframe *) 0xcb4b8d48
	cs =3D 0
	eflags =3D 662
	error =3D 0
	ret =3D 0
#9  0xc061224b in syscall (frame=3D
      {tf_fs =3D 47, tf_es =3D 47, tf_ds =3D 47, tf_edi =3D -1077940612, tf=
_esi =3D -1077940604, tf_ebp =3D -1077940684, tf_isp =3D -884241036, tf_ebx=
 =3D 1, tf_edx =3D 672409248, tf_ecx =3D 13, tf_eax =3D 417, tf_trapno =3D =
22, tf_err =3D 2, tf_eip =3D -1077936211, tf_cs =3D 31, tf_eflags =3D 582, =
tf_esp =3D -1077941560, tf_ss =3D 47})
    at ../../../i386/i386/trap.c:1010
	params =3D 0xbfbfeacc---Can't read userspace from dump, or kernel process-=
--

(kgdb)

--ctP54qlpMx3WjD+/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=KISTE
Content-Transfer-Encoding: quoted-printable

#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
#
# For more information on this file, please read the handbook section on
# Kernel Configuration Files:
#
#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig=
-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.=20
# If you are in doubt as to the purpose or necessity of a line, check first=
=20
# in NOTES.
#
# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.394.2.3 2004/01/26 19:42:11 necta=
r Exp $
makeoptions	DEBUG=3D-g
machine		i386
cpu		I586_CPU
ident		KISTE=09

options		CPU_FASTER_5X86_FPU
options		CPU_SUSP_HLT
options		CPU_UPGRADE_HW_CACHE
options		CPU_WT_ALLOC
options		NO_F00F_HACK

options 	SCHED_4BSD		#4BSD scheduler
options 	INET			#InterNETworking
options		INET6
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 	MSDOSFS			#MSDOS Filesystem
options         SMBFS                   #SMB/CIFS 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 	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         COMPAT_LINUX
options		LINPROCFS

# 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, re=
quired by INVARIANTS
#options 	WITNESS			#Enable checks to detect deadlocks and cycles
#options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed

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		atapicam		# emulate ATAPI devices as
					# SCSI ditto via CAM=09
device          scbus           	# base SCSI code
device          pass            	# CAM passthrough driver
device          cd              	# SCSI CD-ROMs
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		splash		# Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device		sc

# Enable this for the pcvt (VT220 compatible) console driver
#device		vt
#options 	XSERVER			# support for X server on a vt console
#options 	FAT_CURSOR		# start with block cursor

# Floating point support - do not disable.
device		npx

# Power management support (see NOTES for more options)
device		apm
# Add suspend/resume support for the i8254.
device		pmtimer

# 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		ppi		# Parallel port interface device

# 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		rl		# RealTek 8129/8139
device		xl		# 3com 90x (Boomerang)

options         RANDOM_IP_ID
options		NETSMB
options		NETSMBCRYPTO
options         LIBMCHAIN
options         LIBICONV

# 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)

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

### ipfilter ###
options         IPFILTER                #ipfilter support
options         IPFILTER_LOG            #ipfilter logging
options         IPFILTER_DEFAULT_BLOCK  #block all packets by default
options         PFIL_HOOKS              #required by IPFILTER

# Sound
device pcm

--ctP54qlpMx3WjD+/--

--8w3uRX/HFJGApMzv
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFA0vL4Ckn+/eutqCoRAokqAJwKwRTpwk95lNuez5S7e+cwHKPKQgCg68rO
YF0c613GQJRLansL2WCS7Bo=
=JOE3
-----END PGP SIGNATURE-----

--8w3uRX/HFJGApMzv--



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