NetBSD Problem Report #49979

From darrenr@netbsd.org  Tue Jun 16 11:57:17 2015
Return-Path: <darrenr@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 804F3A6551
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 16 Jun 2015 11:57:17 +0000 (UTC)
Message-Id: <20150616115717.1403414A217@mail.netbsd.org>
Date: Tue, 16 Jun 2015 11:57:17 +0000 (UTC)
From: darrenr@netbsd.org
Reply-To: darrenr@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: gdb does not work properly on NetBSD-6.1.1/i386
X-Send-Pr-Version: 3.95

>Number:         49979
>Category:       bin
>Synopsis:       gdb does not work properly on NetBSD-6.1.1/i386
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kamil
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 16 12:00:00 +0000 2015
>Closed-Date:    Tue Jun 04 22:57:27 +0000 2019
>Last-Modified:  Tue Jun 04 22:57:27 +0000 2019
>Originator:     Darren Reed
>Release:        NetBSD 6.1_STABLE
>Organization:

>Environment:
Architecture: x86_64
Machine: amd64
>Description:
Whilst using gdb to step through a problem and debug an application,
it randomly stops working. e.g.:
(gdb) run -O -d -r test.cap ip
Starting program: /home/darrenr/tcpdump-4.7.4/tcpdump -O -d -r test.cap ip
reading from file test.cap, link-type EN10MB (Ethernet)

Breakpoint 1, flatten_bpfprog (start=0xbfbfebe4) at ./optimize.c:2276
2276            flen = start->bf_len;
(gdb) n
2277            for (slen = 0, fp = start->bf_insns; flen > 0; flen--, fp++)
(gdb)
2278                    slen += BPFX_WORDS(fp->code);
(gdb)
0x081d17f3 in ?? ()
netbsd: {790} file tcpdump
tcpdump: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for NetBSD 6.1.1, not stripped
>How-To-Repeat:
Use gdb to debug program.
>Fix:


>Release-Note:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/49979: gdb does not work properly on NetBSD-6.1.1/i386
Date: Wed, 17 Jun 2015 06:38:01 +0000

 On Tue, Jun 16, 2015 at 12:00:01PM +0000, darrenr@netbsd.org wrote:
  > >Synopsis:       gdb does not work properly on NetBSD-6.1.1/i386
                                                                ^^^^
  > Architecture: x86_64
  > Machine: amd64
             ^^^^^^^^^^^

 to confirm, you do mean 32-bit i386 and the amd64 is just because you
 filed the PR from another machine?

  > Whilst using gdb to step through a problem and debug an application,
  > it randomly stops working. e.g.:
  > (gdb) run -O -d -r test.cap ip
  > Starting program: /home/darrenr/tcpdump-4.7.4/tcpdump -O -d -r test.cap ip
  > reading from file test.cap, link-type EN10MB (Ethernet)
  > 
  > Breakpoint 1, flatten_bpfprog (start=0xbfbfebe4) at ./optimize.c:2276
  > 2276            flen = start->bf_len;
  > (gdb) n
  > 2277            for (slen = 0, fp = start->bf_insns; flen > 0; flen--, fp++)
  > (gdb)
  > 2278                    slen += BPFX_WORDS(fp->code);
  > (gdb)
  > 0x081d17f3 in ?? ()
  > netbsd: {790} file tcpdump
  > tcpdump: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for NetBSD 6.1.1, not stripped
  > >How-To-Repeat:
  > Use gdb to debug program.

 I take it it's not repeatable in the ordinary sense? How often does it
 happen? Are the symptoms more or less the same each time? Is it
 correlated with anything that you've observed?

 -- 
 David A. Holland
 dholland@netbsd.org

From: Darren Reed <darrenr@netbsd.org>
To: gnats-bugs@NetBSD.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: bin/49979: gdb does not work properly on NetBSD-6.1.1/i386
Date: Tue, 30 Jun 2015 22:02:09 +1000

 On 17/06/2015 4:40 PM, David Holland wrote:
 > The following reply was made to PR bin/49979; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: bin/49979: gdb does not work properly on NetBSD-6.1.1/i386
 > Date: Wed, 17 Jun 2015 06:38:01 +0000
 > 
 >  On Tue, Jun 16, 2015 at 12:00:01PM +0000, darrenr@netbsd.org wrote:
 >   > >Synopsis:       gdb does not work properly on NetBSD-6.1.1/i386
 >                                                                 ^^^^
 >   > Architecture: x86_64
 >   > Machine: amd64
 >              ^^^^^^^^^^^
 >  
 >  to confirm, you do mean 32-bit i386 and the amd64 is just because you
 >  filed the PR from another machine?

 Correct.

 >   > Whilst using gdb to step through a problem and debug an application,
 >   > it randomly stops working. e.g.:
 >   > (gdb) run -O -d -r test.cap ip
 >   > Starting program: /home/darrenr/tcpdump-4.7.4/tcpdump -O -d -r test.cap ip
 >   > reading from file test.cap, link-type EN10MB (Ethernet)
 >   > 
 >   > Breakpoint 1, flatten_bpfprog (start=0xbfbfebe4) at ./optimize.c:2276
 >   > 2276            flen = start->bf_len;
 >   > (gdb) n
 >   > 2277            for (slen = 0, fp = start->bf_insns; flen > 0; flen--, fp++)
 >   > (gdb)
 >   > 2278                    slen += BPFX_WORDS(fp->code);
 >   > (gdb)
 >   > 0x081d17f3 in ?? ()
 >   > netbsd: {790} file tcpdump
 >   > tcpdump: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for NetBSD 6.1.1, not stripped
 >   > >How-To-Repeat:
 >   > Use gdb to debug program.
 >  
 >  I take it it's not repeatable in the ordinary sense? How often does it
 >  happen? Are the symptoms more or less the same each time? Is it
 >  correlated with anything that you've observed?

 100% repeatable.


From: Martin Husemann <martin@duskware.de>
To: Darren Reed <darrenr@netbsd.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: bin/49979: gdb does not work properly on NetBSD-6.1.1/i386
Date: Tue, 30 Jun 2015 14:11:45 +0200

 On Tue, Jun 30, 2015 at 10:02:09PM +1000, Darren Reed wrote:
 > >  I take it it's not repeatable in the ordinary sense? How often does it
 > >  happen? Are the symptoms more or less the same each time? Is it
 > >  correlated with anything that you've observed?
 > 
 > 100% repeatable.

 What do you mean? You originaly said:

 Whilst using gdb to step through a problem and debug an application,
 it randomly stops working.

 At least I can't reproduce it in a simple test program, so there must be
 something more to it. How many "next" do you have to issue before it
 happens? Is it always the same count?

 Martin

Responsible-Changed-From-To: bin-bug-people->kamil
Responsible-Changed-By: kamil@NetBSD.org
Responsible-Changed-When: Sat, 07 Oct 2017 00:07:18 +0200
Responsible-Changed-Why:
Take.

Can you reproduce it on 8.0(beta)?
There were many fixes for debuggers and they won't be backported to 6.x and 7.x. There are even more bugs to be fixed in HEAD.


State-Changed-From-To: open->feedback
State-Changed-By: kamil@NetBSD.org
State-Changed-When: Sat, 07 Oct 2017 00:07:18 +0200
State-Changed-Why:
.


State-Changed-From-To: feedback->closed
State-Changed-By: kamil@NetBSD.org
State-Changed-When: Wed, 05 Jun 2019 00:57:27 +0200
State-Changed-Why:
Single stepping through tcpdump(1) works for me. I can single step until program termination for the same program arguments.

If there are still any issues, please report a new bug.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.