From owner-freebsd-current@FreeBSD.ORG Mon Sep 6 08:10:08 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBA4916A4D0 for ; Mon, 6 Sep 2004 08:10:08 +0000 (GMT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5156043D46 for ; Mon, 6 Sep 2004 08:10:08 +0000 (GMT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 2F3892BDB7 for ; Mon, 6 Sep 2004 18:10:04 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id F3E2A511FA; Mon, 6 Sep 2004 17:40:01 +0930 (CST) Date: Mon, 6 Sep 2004 17:40:01 +0930 From: Greg 'groggy' Lehey To: "Boris B. Samorodov" Message-ID: <20040906081001.GJ26744@wantadilla.lemis.com> References: <20040906063136.GA32825@ipt.ru> <20040906063152.GC72089@funkthat.com> <20040906064643.GB32825@ipt.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8tZVdKiiYitVG083" Content-Disposition: inline In-Reply-To: <20040906064643.GB32825@ipt.ru> User-Agent: Mutt/1.4.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: freebsd-current@freebsd.org Subject: Re: gdb-6 in 5.3-BETA3 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2004 08:10:09 -0000 --8tZVdKiiYitVG083 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Monday, 6 September 2004 at 10:46:43 +0400, Boris B. Samorodov wrote: > On Sun, Sep 05, 2004 at 11:31:52PM -0700, John-Mark Gurney wrote: > >> Boris B. Samorodov wrote this message on Mon, Sep 06, 2004 at 10:31 +040= 0: >>> New gdb V.6 in base system doesn't have option '-k', while the ports's >>> version has. Is it planned to be fixed till 5.3-RELEASE? >> >> but there is kgdb.... > > OK. kgdb works fine. > > But it is not clear from "man gdb", that if option "gdb -k" is not > working, one should use "kgdb". Indeed. I thought that kgdb was deprecated, and that we should be using gdb -k. It would be nice to come to an agreement on that. Note also that most recent versions of gdb seem to be broken when trying to access userland. On a machine built in May: GNU gdb 5.2.1 (FreeBSD) (kgdb) f 16 #16 0xc0621df8 in namei (ndp=3D0xd7c05c30) at /usr/src/sys/kern/vfs_looku= p.c:179 179 error =3D lookup(ndp); (kgdb) p *ndp $1 =3D { ni_dirp =3D 0x805f8a8---Can't read userspace from dump, or kernel proce= ss--- Same dump with recently ported gdb6. Backtrace contains many spurious "stack frames": GNU gdb 20040803 [GDB v6.x for FreeBSD] (partial bt) #6 0xc074c67c in trap (frame=3D {tf_fs =3D 0x18, tf_es =3D 0x10, tf_ds =3D 0x10, tf_edi =3D 0xc07ba= 264, tf_esi =3D 0x1, tf_ebp =3D 0xd7c05964, tf_isp =3D 0xd7c0594c, tf_ebx = =3D 0x0, tf_edx =3D 0x0, tf_ecx =3D 0xc1014000, tf_eax =3D 0x12, tf_trapno = =3D 0x3, tf_err =3D 0x0, tf_eip =3D 0xc073a4de, tf_cs =3D 0x8, tf_eflags = =3D 0x296, tf_esp =3D 0xd7c05998, tf_ss =3D 0xd7c05984}) at /usr/src/sys/i3= 86/i386/trap.c:579 #7 0xc073b7ca in calltrap () at {standard input}:94 #8 0x00000018 in ?? () #9 0x00000010 in ?? () #10 0x00000010 in ?? () #11 0xc07ba264 in ?? () #12 0x00000001 in ?? () #13 0xd7c05964 in ?? () #14 0xd7c0594c in ?? () #15 0x00000000 in ?? () #16 0x00000000 in ?? () #17 0xc1014000 in ?? () #18 0x00000012 in ?? () #19 0x00000003 in ?? () #20 0x00000000 in ?? () #21 0xc073a4de in Debugger (msg=3D0xc07b390c "panic") at machine/cpufunc.= h:56 #22 0xc05ddc85 in __panic (file=3D0xc07ba1fb "/usr/src/sys/kern/vfs_subr.= c", line=3D0x2f3,=20 fmt=3D0xc07ba264 "cleaned vnode isn't") at /usr/src/sys/kern/kern_shu= tdown.c:532 #23 0xc06259b0 in getnewvnode (tag=3D0xc07bdc45 "ufs", mp=3D0xc399d000, v= ops=3D0x0, vpp=3D0x0) at /usr/src/sys/kern/vfs_subr.c:785 #24 0xc06f7cb0 in ffs_vget (mp=3D0xc399d000, ino=3D0x3944d1, flags=3D0x2,= vpp=3D0xd7c05a84) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:1252 #25 0xc06fe9da in ufs_lookup (ap=3D0xd7c05b40) at /usr/src/sys/ufs/ufs/uf= s_lookup.c:599 #26 0xc0704ae7 in ufs_vnoperate (ap=3D0x0) at /usr/src/sys/ufs/ufs/ufs_vn= ops.c:2819 #27 0xc061deb1 in vfs_cache_lookup (ap=3D0x0) at vnode_if.h:82 #28 0xc0704ae7 in ufs_vnoperate (ap=3D0x0) at /usr/src/sys/ufs/ufs/ufs_vn= ops.c:2819 #29 0xc0622377 in lookup (ndp=3D0xd7c05c30) at vnode_if.h:52 (kgdb) f 30 #30 0xc0621df8 in namei (ndp=3D0xd7c05c30) at /usr/src/sys/kern/vfs_looku= p.c:179 179 error =3D lookup(ndp); (kgdb) p *ndp Bus error (core dumped) I'd be happy to try other versions if people can give me some reason to expect that they might do better. The data in question is accessible: I can get at it with ddb, and it used to be possible with gdb. I suspect that the problem might be in a library, since older gdbs from other machines have the same problem, but they don't on the older machines. Greg -- Note: I discard all HTML mail unseen. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. --8tZVdKiiYitVG083 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQFBPBtZIubykFB6QiMRAhgyAKCnF8Z4DagbCI9+ZlCbZFQMdy+FogCglEJf nwTP9rSJmLYtYhJfXsbk6vM= =Db4p -----END PGP SIGNATURE----- --8tZVdKiiYitVG083--