public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "wei_si.a.xiao@alcatel-lucent.com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug threads/15520] New: GDB step command crashed on non-stop mode
Date: Thu, 23 May 2013 04:41:00 -0000	[thread overview]
Message-ID: <bug-15520-4717@http.sourceware.org/bugzilla/> (raw)

http://sourceware.org/bugzilla/show_bug.cgi?id=15520

             Bug #: 15520
           Summary: GDB step command crashed on non-stop mode
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: critical
          Priority: P2
         Component: threads
        AssignedTo: unassigned@sourceware.org
        ReportedBy: wei_si.a.xiao@alcatel-lucent.com
    Classification: Unclassified


I am using GDB non-stop mode to debug a multi-thread application. But it always
crashed when I use “step” command. I have tried version 7.4/7.5.1/7.6, the
result are same. The issue does not exist if we don’t use non-stop mode.
I have written a small program to test, easy to reproduce each time. The code
as below:

// test.cc
#include <string>
using namespace std;
void fun(string &str1, string &str2)
{
    str1 += str2;
}

int main(void)
{
   string str1 = "abc";
   string str2 = "def";
   fun(str1,str2);

   return 0;
}


Compile:
g++ -g test.cc -o test


The procedure for reproduce as below:
vm10-0-0-1:/root-# gdb ./test
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/test...done.
(gdb) set target-async 1
(gdb) set non-stop on
(gdb) break fun Breakpoint 1 at 0x4007b4: file test.cc, line 5.
(gdb) run
Starting program: /root/test 

Breakpoint 1, fun (str1=..., str2=...) at test.cc:5
5           str1 += str2;
(gdb) step
6       }
(gdb) step

Program received signal SIGSEGV, Segmentation fault.
fun (str1=<error reading variable: Cannot access memory at address
0xfffffffffffffff8>, str1@entry=<error reading variable: Cannot access memory
at address 0x8>,
    str2=<error reading variable: Cannot access memory at address
0xfffffffffffffff0>, str2@entry=<error reading variable: Cannot access memory
at address 0x8>) at test.cc:6
6       }
(gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
>From gdb-prs-return-13727-listarch-gdb-prs=sources.redhat.com@sourceware.org Thu May 23 07:09:32 2013
Return-Path: <gdb-prs-return-13727-listarch-gdb-prs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-prs@sources.redhat.com
Received: (qmail 29353 invoked by alias); 23 May 2013 07:09:32 -0000
Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-prs.sourceware.org>
List-Subscribe: <mailto:gdb-prs-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-prs/>
List-Post: <mailto:gdb-prs@sourceware.org>
List-Help: <mailto:gdb-prs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: gdb-prs-owner@sourceware.org
Delivered-To: mailing list gdb-prs@sourceware.org
Received: (qmail 29326 invoked by uid 48); 23 May 2013 07:09:32 -0000
From: "pmuldoon at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/15519] GDB 7.6 is 94x slower than GDB 7.5.1 using a certain
 core file
Date: Thu, 23 May 2013 07:09:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gdb
X-Bugzilla-Component: c++
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pmuldoon at redhat dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-15519-4717-PJIvW1ehJl@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-15519-4717@http.sourceware.org/bugzilla/>
References: <bug-15519-4717@http.sourceware.org/bugzilla/>
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-q2/txt/msg00316.txt.bz2
Content-length: 690

http://sourceware.org/bugzilla/show_bug.cgi?id\x15519

--- Comment #3 from Phil Muldoon <pmuldoon at redhat dot com> 2013-05-23 07:09:30 UTC ---
Created attachment 7039
  --> http://sourceware.org/bugzilla/attachment.cgi?idp39
pdf summary of call graph

Sometimes I find the summary graph produced by dot -Tpdf from the output
provided by gprof2dot handy as a visual overview.  Was just looking at the
output this morning out of curiosity and am attaching this file to see if it is
useful for others looking at this bug

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


             reply	other threads:[~2013-05-23  4:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23  4:41 wei_si.a.xiao@alcatel-lucent.com [this message]
2013-08-23 11:21 ` [Bug threads/15520] " mbilal at codesourcery dot com
2013-09-16 11:29 ` mwaqas at codesourcery dot com
2014-10-26 23:18 ` palves at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15520-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).