From owner-freebsd-hackers Sun May 6 15:14:35 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.cs.umn.edu (mail.cs.umn.edu [128.101.32.200]) by hub.freebsd.org (Postfix) with ESMTP id 5967137B423 for ; Sun, 6 May 2001 15:14:30 -0700 (PDT) (envelope-from rakshe@cs.umn.edu) Received: from melchizedek.cs.umn.edu (rakshe@melchizedek.cs.umn.edu [128.101.35.51]) by mail.cs.umn.edu (8.11.3/8.11.3) with ESMTP id f46MESs18604 for ; Sun, 6 May 2001 17:14:28 -0500 (CDT) Received: from localhost (rakshe@localhost) by melchizedek.cs.umn.edu (8.9.3/8.9.0) with ESMTP id RAA15922 for ; Sun, 6 May 2001 17:14:08 -0500 (CDT) X-Authentication-Warning: melchizedek.cs.umn.edu: rakshe owned process doing -bs Date: Sun, 6 May 2001 17:14:08 -0500 (CDT) From: Rohit Rakshe To: Subject: Re: FPU exception, kernel panic In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I guessed I asked too much. Can someone please tell me just this: "How do I translate 48 bit address (segment descriptor:offset) to a linear address which gdb can understand ?" Thanks - Rohit On Sat, 5 May 2001, Rohit Rakshe wrote: > Hi ! > > I modified some TCP and UDP code in FreeBSD 4.1 and suddenly started > getting (almost repeatable) kernel panics. This is how it looks like > from remote gdb: > > (kgdb) bt > #0 0xc0192e58 in panic (fmt=0xc035c076 "npxintr from nowhere") at > ../../kern/kern_shutdown.c:550 > #1 0xc0303c6c in npx_intr (dummy=0x0) at ../../i386/isa/npx.c:721 > #2 0xc02e1052 in Xfpu () > #3 0xc019824d in softclock () at ../../kern/kern_timeout.c:131 > . > . > . > (kgdb) list > 126 } else { > 127 c->c_flags = > 128 (c->c_flags & > ~CALLOUT_PENDING); > 129 } > 130 splx(s); > 131 c_func(c_arg); > 132 s = splhigh(); > 133 steps = 0; > 134 c = nextsoftcheck; > 135 } > . > . > . > (kgdb) > #1 0xc0303c6c in npx_intr (dummy=0x0) at ../../i386/isa/npx.c:721 > 721 panic("npxintr from nowhere"); > (kgdb) p npxproc > $5 = 0 > (kgdb) p npx_exists > $6 = 1 '\001' > . > . > . > (kgdb) info all-registers > eax 0x12 18 > ecx 0xc03a60a0 -1069916000 > edx 0x400000 4194304 > ebx 0xcbc56540 -876255936 > esp 0xc0361354 0xc0361354 > ebp 0xc0361410 0xc0361410 > esi 0x400000 4194304 > edi 0x400000 4194304 > eip 0xc019824d 0xc019824d > eflags 0x346 838 > cs 0x8 8 > ss 0x10 16 > ds 0x400010 4194320 > es 0x10 16 > fs 0x0 0 > gs 0x0 0 > (kgdb) info float > status 0xc8f5: exceptions: INVALID DIVZ UNDERF LOS FPSTACK; flags: 1000; > top 1 > control 0x6620: compute to 53 bits; round DOWN; mask: LOS; > warning: reserved bits on: 0x6000 > > last instruction: opcode 0x2825; pc 0x71a4:0x2824c316; operand > 0xf800:0x8176640 > regno tag msb lsb value > %st(7) valid 0000000008179a802825 Denormal (0 as a double) > %st(6) valid 71a42824c31600000000 Unnormal (NaN) > %st(5) valid 08176640282571a42824 Unnormal (NaN) > %st(4) valid c8910818f9380818f800 Unnormal (NaN) > %st(3) valid 282571a42824c316bfbf Unnormal (NaN) > %st(2) valid e82808176620089c3000 Unnormal (NaN) > %st(1) valid 00000032000000010001 Denormal (0 as a double) > %st(0) => valid 0000000000240818f800 Denormal (0 as a double) > > > So, this means that there was a FPU exception in kernel, right ? > > 1. The code which I added in kernel does not use any floats. So I am > wondering why this problem should happen at all. > > 2. pc register in FPU should give address of the instruction which caused > this exception, right ? > > 3. If yes, how do I translate this 48 bit address in a linear address > which gdb can understand ? > > > Thanks for help ! > > > - Rohit > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message