NetBSD Problem Report #54268

From martin@aprisoft.de  Mon Jun  3 15:39:50 2019
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 13B8C7A182
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  3 Jun 2019 15:39:50 +0000 (UTC)
Message-Id: <20190603153939.C915D5CC7A5@emmas.aprisoft.de>
Date: Mon,  3 Jun 2019 17:39:39 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: (old) gdb has issues after recent ptrace changes
X-Send-Pr-Version: 3.95

>Number:         54268
>Category:       kern
>Synopsis:       (old) gdb has issues after recent ptrace changes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 03 15:40:02 +0000 2019
>Last-Modified:  Fri Nov 20 10:24:05 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.42
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 8.99.42 NetBSD 8.99.42 (WHOEVER) #278: Sun Jun 2 12:42:20 CEST 2019 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/sparc64/compile/WHOEVER sparc64
Architecture: sparc64
Machine: sparc64
>Description:

*old* gdb works mostly on sparc64, but on complex threaded programs
like firefox it fails:

GNU gdb (GDB) 8.0.1
[..]
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./firefox...done.
.gdbinit:189: Error in sourced command file:
gdbpp:5: Error in sourced command file:
Scripting in the "Python" language is not supported in this copy of GDB.
(gdb) run https://pgsnake.blogspot.com/2019/05/avoiding-gmails-confidential-mode.html
Starting program: /pkgbuild/usr/pkgobj/www/firefox52/work/build/dist/bin/firefox https://pgsnake.blogspot.com/2019/05/avoiding-gmails-confidential-mode.html
[New process 18083]
[New LWP 2 of process 18083]
[New LWP 3 of process 18083]
[New LWP 4 of process 18083]
[New LWP 5 of process 18083]
[New LWP 7 of process 18083]
[New LWP 13 of process 18083]
/work/src/external/gpl3/gdb.old/lib/libgdb/../../dist/gdb/infrun.c:7146: internal-error: [LWP 1 of process 18083] has inconsistent state: trap_expected=1

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 


>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/54268: (old) gdb has issues after recent ptrace changes
Date: Mon, 3 Jun 2019 17:41:26 +0200

 When telling gdb to create a core in this state, the core is unusable:

 [New process 1]
 Core was generated by `gdb'.
 Program terminated with signal SIGABRT, Aborted.
 #0  0x00000000422ff264 in ?? ()
 .gdbinit:189: Error in sourced command file:
 gdbpp:5: Error in sourced command file:
 Scripting in the "Python" language is not supported in this copy of GDB.
 (gdb) bt
 #0  0x00000000422ff264 in ?? ()
 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

 Martin

From: Kamil Rytarowski <n54@gmx.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/54268: (old) gdb has issues after recent ptrace changes
Date: Tue, 4 Jun 2019 15:59:41 +0200

 On 03.06.2019 17:45, Martin Husemann wrote:
 > The following reply was made to PR kern/54268; it has been noted by GNAT=
 S.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: kern/54268: (old) gdb has issues after recent ptrace change=
 s
 > Date: Mon, 3 Jun 2019 17:41:26 +0200
 >
 >  When telling gdb to create a core in this state, the core is unusable:
 >
 >  [New process 1]
 >  Core was generated by `gdb'.
 >  Program terminated with signal SIGABRT, Aborted.
 >  #0  0x00000000422ff264 in ?? ()
 >  .gdbinit:189: Error in sourced command file:
 >  gdbpp:5: Error in sourced command file:
 >  Scripting in the "Python" language is not supported in this copy of GDB=
 .
 >  (gdb) bt
 >  #0  0x00000000422ff264 in ?? ()
 >  Backtrace stopped: previous frame identical to this frame (corrupt stac=
 k?)
 >
 >  Martin
 >
 >

 Is this old GDB the one just before 8.3 upgrade and with my changes
 included? If not and this is a older version of GDB without my patches
 included (committed on May 3rd), then I would recommend closing it.

 There are still races in the kernel and firefox is one of my test
 targets for multiprocess and multithreaded applications.

 There are few problems identified (at least 3) that still make LWPs
 racy, but it should work better than ever for non-complex applications.

 Once I will sort out them (with an intermediate work on vfork(2)), I
 will be back to this thread.

Responsible-Changed-From-To: kern-bug-people->kamil
Responsible-Changed-By: kamil@NetBSD.org
Responsible-Changed-When: Tue, 04 Jun 2019 16:03:59 +0200
Responsible-Changed-Why:
Take.


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/54268: (old) gdb has issues after recent ptrace changes
Date: Tue, 4 Jun 2019 16:04:14 +0200

 On Tue, Jun 04, 2019 at 02:00:04PM +0000, Kamil Rytarowski wrote:
 >  Is this old GDB the one just before 8.3 upgrade and with my changes
 >  included? If not and this is a older version of GDB without my patches
 >  included (committed on May 3rd), then I would recommend closing it.

 It was kernel and userland from -current as early June 3, but with
 HAVE_GDB=801 to force old gdb.

 Martin

From: Kamil Rytarowski <n54@gmx.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/54268: (old) gdb has issues after recent ptrace changes
Date: Tue, 4 Jun 2019 16:07:23 +0200

 On 04.06.2019 16:05, Martin Husemann wrote:
 > The following reply was made to PR kern/54268; it has been noted by GNAT=
 S.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: kern/54268: (old) gdb has issues after recent ptrace change=
 s
 > Date: Tue, 4 Jun 2019 16:04:14 +0200
 >
 >  On Tue, Jun 04, 2019 at 02:00:04PM +0000, Kamil Rytarowski wrote:
 >  >  Is this old GDB the one just before 8.3 upgrade and with my changes
 >  >  included? If not and this is a older version of GDB without my patch=
 es
 >  >  included (committed on May 3rd), then I would recommend closing it.
 >
 >  It was kernel and userland from -current as early June 3, but with
 >  HAVE_GDB=3D801 to force old gdb.
 >
 >  Martin
 >
 >

 OK, so this is still valid regardless of GDB version.

Responsible-Changed-From-To: kamil->kern-bug-people
Responsible-Changed-By: kamil@NetBSD.org
Responsible-Changed-When: Fri, 20 Nov 2020 11:24:05 +0100
Responsible-Changed-Why:
Reassign to kern-bug-people.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.