Re: 7.0 RC2 kernel panic with Kqemu/AMD64

From: John Marino <mfl-commissioner_at_marino.st>
Date: Sun, 17 Feb 2008 04:51:21 -0600 (CET)
Hello Juergen,

When I looked at the configuration of the GENERIC kernel of 7.0RC2, I
noticed that DEBUG=-g and the KTRACE options were already enabled.

So I configured sysctl to set minidump = 0 at boot time and also updated
rc.conf to save kernel dumps.  After rebooting, I invoked Qemu and
experienced a panic.

After the reboot, I realized that I needed the object files for kdbg to
work, so I built the kernel (make buildkernel KERNCONF=GENERIC from the
/usr/src directory)

Then I ran kdbg on the vmcore.0 file and got this:

(kgdb) backtrace
#0  doadump () at pcpu.h:194
#1  0x0000000000000004 in ?? ()
#2  0xffffffff804778b9 in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:409
#3  0xffffffff80477cbd in panic (fmt=0x104 <Address 0x104 out of bounds>)
at /usr/src/sys/kern/kern_shutdown.c:563
#4  0xffffffff80731914 in trap_fatal (frame=0xffffff00010e1680,
eva=18446742974215611496) at /usr/src/sys/amd64/amd64/trap.c:724
#5  0xffffffff8073258f in trap (frame=0xffffffffab9dac70) at
/usr/src/sys/amd64/amd64/trap.c:251
#6  0xffffffff8071828e in calltrap () at
/usr/src/sys/amd64/amd64/exception.S:169
#7  0x000000000048ce1b in ?? ()
Previous frame inner to this frame (corrupt stack?)

Does that mean anything to you?
I have not tried DDB or KDB_UNATTENDED yet.
I hope that I am helping you.  Please let me know what else I can do.  I
have included the text that the kbdg showed following my signature, it
looks like garbage to me -- I don't know why it's is spaced crazy like
that.

Regards,
John


draco-root# cd /usr/obj/usr/src/sys/GENERIC/
draco-root# kgdb kernel.debug /usr/local/crash/vmcore.0
[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 are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd".

Unread portion of the kernel message buffer:
<0>kke
rn
eFla ttarla pt rap 12 1w2i:t h inptaegrer ufpatusl td iwshaibllee din
 user
m
oFdaeta
l ctpruaipd  1=2 :1 ; appiacg ei df a=u lt w0h1i
lef aiunl tk evrinretlu amlo daed
dcrpeusisd	 ==  00x;4 8acpei1cb
idf a=u lt c0o0d
ef	a	u=l tu sveirr trueaald  aidndsrtersusc	t=i o0nx,0
pafgaeu lnto tc opdree	s	e=n ts
uipnesrtvriuscotri orne apdo idnattear,	 =p a0gxe2 bn:o0tx p4r8ecsee1nbt

stiancskt rpuocitnitoenr 	p o i n t e r 	 == 
00xx9223a:00:x0x7fffffffffffffff8b017c603
dffrca
mes tpaocikn tpeori	n t e r 	        =   0 x 2=3 :00xx1800:08x1fdf4f9faff
fcfoadbe9 dsae7gcm0e
nftr	a	m=e  bpaosien t0exr0	,   l i m i t   0=x f0fxf1f0f:,0 xt2y0p
ec o0dxe 1sbe
g	m	e	n=t 	D	P=L  b3a,s ep r0exs 41d,4 dl4odn4gd ,1 ,l idmeift3 20 x0,d
0g0rfafn,  1t
yppreo c0exsds
o	r	 	e=f lDaPgLs 	2=,  ipnrteesr r0u,p tl oennga b0l,e dd,e fr3e2s u1m,e
,g rIaOnP L0 =
 p0r
occuersrseonrt  epfrloacgess	s=	 	I=O P1L1  =( i0d
lceu:r rcepnut1 )p
rtorcaeps sn	u	m=b e1r0	3	9=  (1q2e
mu-sysptaenmi-cx:8 6p_a6g4e)
ftarualpt n
ucmpbueird	 	==  112

Uptime: 11m5s
Dumping 1983 MB (2 chunks)
  chunk 0: 1MB (156 pages) ... ok
  chunk 1: 1983MB (507568 pages) 1967 1951 1935 1919 1903 1887 1871 1855
1839 1823 1807 1791 1775 1759 1743 1727 1711
1695 1679 1663 1647 1631 1615 1599 1583 1567 1551 1535 1519 1503 1487 1471
1455 1439 1423 1407 1391 1375 1359 1343 1327
1311 1295 1279 1263 1247 1231 1215 1199 1183 1167 1151 1135 1119 1103 1087
1071 1055 1039 1023 1007 991 975 959 943 927
911 895 879 863 847 831 815 799 783 767 751 735 719 703 687 671 655 639
623 607 591 575 559 543 527 511 495 479 463 447
431 415 399 383 367 351 335 319 303 287 271 255 239 223 207 191 175 159
143 127 111 95 79 63 47 31 15

#0  doadump () at pcpu.h:194
194		__asm __volatile("movq %%gs:0,%0" : "=r" (td));




>  OK, I guess you want to start here:
> 	http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html
> and
> 	http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html
>
>  And of course you want to build a debug kernel (makeoptions
> DEBUG=-g),
> building a kernel is explained here:
> 	http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html
>
>  I also had to put DDB into the kernel so that it gets built without
> -fomit-frame-pointer (you probably want KDB_UNATTENDED then too, and
> KDB_TRACE while you're at it.)
>
>  Oh and I guess you want to disable minidumps also (sysctl
> debug.minidump=0),
> there's a race in there that might(!) cause not so useful dumps otherwise.
>
>  Then when you have a dump, post a script(1) of a `bt' in kgdb, and we'll
> see if it tells more than the backtraces I got...
>
>  Thanx,
> 	Juergen
>
Received on Sun Feb 17 2008 - 09:51:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:27 UTC