Re: FPU exception, kernel panic
Valentin Nechayev <[EMAIL PROTECTED]> writes: > (I cannot even guarantree 50% this is the same problem, but...) > There were some reports in current@ about incorrect usage of i586_bzero() > which uses FPU for zero-filling. It generated random kernel panics mainly > on K6-2, also on P5-MMX and similars. You can try to disable such bzero, > but IMHO it is reasonable to upgrade to 4.3-RELEASE (RELENG_4_3) first. 1) this bug only occurs on -CURRENT systems that have interrupt preemption enabled (i.e. anything newer than february) 2) the symptoms are nowhere near what's described here anyway - you'd see the kernel stack getting smashed, not an FPU exception. DES -- Dag-Erling Smorgrav - [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FPU exception, kernel panic
On Mon, May 07, 2001 at 08:32:06AM +0300, Valentin Nechayev wrote: > Sun, May 06, 2001 at 17:14:08, rakshe (Rohit Rakshe) wrote about "Re: FPU >exception, kernel panic": > > (I cannot even guarantree 50% this is the same problem, but...) > There were some reports in current@ about incorrect usage of i586_bzero() > which uses FPU for zero-filling. It generated random kernel panics mainly > on K6-2, also on P5-MMX and similars. You can try to disable such bzero, > but IMHO it is reasonable to upgrade to 4.3-RELEASE (RELENG_4_3) first. This problem should not happen in 4.X as it is a side effect of the SMP-NG stuff in -current. David. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FPU exception, kernel panic
Sun, May 06, 2001 at 17:14:08, rakshe (Rohit Rakshe) wrote about "Re: FPU exception, kernel panic": (I cannot even guarantree 50% this is the same problem, but...) There were some reports in current@ about incorrect usage of i586_bzero() which uses FPU for zero-filling. It generated random kernel panics mainly on K6-2, also on P5-MMX and similars. You can try to disable such bzero, but IMHO it is reasonable to upgrade to 4.3-RELEASE (RELENG_4_3) first. > 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 ?" > > > > 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 > > eax0x12 18 > > ecx0xc03a60a0 -1069916000 > > edx0x40 4194304 > > ebx0xcbc56540 -876255936 > > esp0xc0361354 0xc0361354 > > ebp0xc0361410 0xc0361410 > > esi0x40 4194304 > > edi0x40 4194304 > > eip0xc019824d 0xc019824d > > eflags 0x346838 > > 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 08179a802825 Denormal (0 as a double) > > %st(6)valid 71a42824c316 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 003200010001 Denormal (0 as a double) > > %st(0) => valid 00240818f800 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 ? /netch To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FPU exception, kernel panic
Rohit Rakshe <[EMAIL PROTECTED]> writes: > 1. The code which I added in kernel does not use any floats. So I am > wondering why this problem should happen at all. The kernel uses the FPU to optimize certain bcopy- or bzero-like operations. > 2. pc register in FPU should give address of the instruction which caused > this exception, right ? Possibly. I'm not very familiar with the FPU. > 3. If yes, how do I translate this 48 bit address in a linear address > which gdb can understand ? You don't. FreeBSD uses a flat address space, you can disregard the segment descriptor. DES -- Dag-Erling Smorgrav - [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: FPU exception, kernel panic
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 > eax0x12 18 > ecx0xc03a60a0 -1069916000 > edx0x40 4194304 > ebx0xcbc56540 -876255936 > esp0xc0361354 0xc0361354 > ebp0xc0361410 0xc0361410 > esi0x40 4194304 > edi0x40 4194304 > eip0xc019824d 0xc019824d > eflags 0x346838 > 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 08179a802825 Denormal (0 as a double) > %st(6)valid 71a42824c316 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 003200010001 Denormal (0 as a double) > %st(0) => valid 00240818f800 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 [EMAIL PROTECTED] > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
FPU exception, kernel panic
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 eax0x12 18 ecx0xc03a60a0 -1069916000 edx0x40 4194304 ebx0xcbc56540 -876255936 esp0xc0361354 0xc0361354 ebp0xc0361410 0xc0361410 esi0x40 4194304 edi0x40 4194304 eip0xc019824d 0xc019824d eflags 0x346838 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 08179a802825 Denormal (0 as a double) %st(6)valid 71a42824c316 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 003200010001 Denormal (0 as a double) %st(0) => valid 00240818f800 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 [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message