From owner-freebsd-stable@FreeBSD.ORG Sat Jul 30 19:26:51 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02CE31065670; Sat, 30 Jul 2011 19:26:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5348FC15; Sat, 30 Jul 2011 19:26:50 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p6UJQklw073439 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Jul 2011 22:26:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p6UJQksJ032832; Sat, 30 Jul 2011 22:26:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p6UJQkMU032831; Sat, 30 Jul 2011 22:26:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Jul 2011 22:26:46 +0300 From: Kostik Belousov To: maestro something Message-ID: <20110730192646.GC17489@deviant.kiev.zoral.com.ua> References: <4E2E9F60.1060808@FreeBSD.org> <4E33B7CF.90200@FreeBSD.org> <4E344D15.1040508@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zKUU1INf9EXO6DqP" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-stable@freebsd.org, Andriy Gapon Subject: Re: dtrace ustack kernel panic X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2011 19:26:51 -0000 --zKUU1INf9EXO6DqP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 30, 2011 at 12:05:33PM -0700, maestro something wrote: > Hi, >=20 >=20 > >> Have you started kgdb with the correct kernel and core file? > >> If yes, then I am out of ideas. > >> > > > > I hope so, I only recompiled the kernel once according to the DTRACE wi= ki > > instructions and I certainly only have one /var/crash/vmcore.* file. > > > > I'll try recompiling the kernel with -O1 and try again. In the meantime, > > I'm wondering whether I'm really the only/first one that ran into this > > problem or if there are people that actually successfully used the usta= ck() > > target on freebsd-8.2? > > >=20 > I could not get the information even after recompiling the kernel here is > the relevant (I think information). >=20 > fb82i386# cat /etc/make.conf > CFLAGS=3D -O >=20 > (accodring to man make.conf only -O and -O2 is supported for CFLAGS anywa= ys) >=20 > kernel.debug is the newly compiled kernel (according to the timestamp) >=20 > fb82i386# kgdb kernel.debug /var/crash/vmcore.0 > 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 detail= s. > This GDB was configured as "i386-marcel-freebsd"... >=20 > Unread portion of the kernel message buffer: > kernel trap 12 with interrupts disabled >=20 >=20 > Fatal trap 12: page fault while in kernel mode > cpuid =3D 0; apic id =3D 00 > fault virtual address =3D 0x108 > fault code =3D supervisor write, page not present > instruction pointer =3D 0x20:0xc1100847 > stack pointer =3D 0x28:0xcd39a9e4 > frame pointer =3D 0x28:0xcd39a9fc > 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 1060 (nc) > trap number =3D 12 > panic: page fault > cpuid =3D 0 > KDB: stack backtrace: > #0 0xc09036a7 at kdb_backtrace+0x47 > #1 0xc08d1a07 at panic+0x117 > #2 0xc0c158c3 at trap_fatal+0x323 > #3 0xc0c15bc0 at trap_pfault+0x2f0 > #4 0xc0c1612a at trap+0x48a > #5 0xc0bfc97c at calltrap+0x6 > #6 0xc10e99db at dtrace_panic+0x1b > #7 0xc10e9a0d at dtrace_assfail+0x2d > #8 0xc10fa6a6 at dtrace_probe+0xfd6 > #9 0xc1237ce4 at systrace_probe+0x84 > #10 0xc090f63f at syscallenter+0x47f > #11 0xc0c15c14 at syscall+0x34 > #12 0xc0bfca11 at Xint0x80_syscall+0x21 > Uptime: 2m39s > Physical memory: 239 MB > Dumping 78 MB: 63 47 31 15 >=20 >=20 >=20 > (kgdb) where > #0 doadump () at pcpu.h:231 > #1 0xc08d17a3 in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c= :419 > #2 0xc08d1a40 in panic (fmt=3DVariable "fmt" is not available. > ) at /usr/src/sys/kern/kern_shutdown.c:592 > #3 0xc0c158c3 in trap_fatal (frame=3D0xcd39a9a4, eva=3D264) at > /usr/src/sys/i386/i386/trap.c:946 > #4 0xc0c15bc0 in trap_pfault (frame=3D0xcd39a9a4, usermode=3D0, eva=3D26= 4) at > /usr/src/sys/i386/i386/trap.c:859 > #5 0xc0c1612a in trap (frame=3D0xcd39a9a4) at > /usr/src/sys/i386/i386/trap.c:532 > #6 0xc0bfc97c in calltrap () at /usr/src/sys/i386/i386/exception.s:166 > #7 0xc1100847 in dtrace_panic_trigger () from /boot/kernel/dtrace.ko > Previous frame inner to this frame (corrupt stack?) > (kgdb) list *dtrace_probe+0xfd6 > No source file for address 0xc10fa6a6. >=20 > So I'm stuck at the same point. >=20 > any other ideas? This is i386, right ? I think the cause is that assembler routine panic_trigger does not establish the standard i386 frame. Basically, you need either this, or dwarf annotations, for gdb to be able to walk over the frame. You need to add the standard prologue pushl %ebp movl %esp,%ebp and standard epilogue leave to the function. No idea whether it will continue to operate correctly after. --zKUU1INf9EXO6DqP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk40WvYACgkQC3+MBN1Mb4i2kgCfVqaQufsgM0TTwXxtLQFRhXQf Z7YAnispHHCwi5nf3Gn7iPxOcl4oDY+4 =Gmmb -----END PGP SIGNATURE----- --zKUU1INf9EXO6DqP--