Bug 151568 - gdb breaks valgrind
Summary: gdb breaks valgrind
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb   
(Show other bugs)
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-19 22:50 UTC by Robin Green
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-20 14:53:30 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
.gdbinit script configuring SIGSEGV handling for gdb(1) (169 bytes, text/plain)
2006-06-23 14:41 UTC, Jan Kratochvil
no flags Details

Description Robin Green 2005-03-19 22:50:24 UTC
Description of problem:
When valgrind is run under gdb, it does not work

Version-Release number of selected component (if applicable):
gdb-6.3.0.0-0.29

How reproducible:
Every time

Steps to Reproduce:
1. gdb --args /usr/bin/valgrind --tool=memcheck ls
2. run
3.
  
Actual results:
==10187== Memcheck, a memory error detector for x86-linux.
==10187== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==10187== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==10187== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==10187== For more details, rerun with: -v
==10187==

Program received signal SIGSEGV, Segmentation fault.
0xb0892c03 in ?? ()


Expected results:
Should work as normal
Additional info: valgrind-2.2.0-8

Comment 1 Robin Green 2005-03-22 15:24:47 UTC
This issue also occurs on a fresh install on FC3 with all updates applied.

Comment 2 Rob Sherwood 2005-07-04 17:28:09 UTC
The same thing happens to me.  I bounced a message about this to the
valgrind-users list, and no one had any ideas.  I was able to work around it by
compiling my own gdb (v 6.3) from the original gnu source, and then forcing
valgrind to use that (which you probably already thought of, but it was worth
mentioning just in case).  So, presumably the problem lies in redhat's patches
to gdb.

Comment 3 Rob Sherwood 2005-07-04 17:31:11 UTC
Also, when you run `valgrind --attach-db=yes --tool=memcheck ./foo`, when
valgrind hits a fault and attaches gdb, then the debugging symbols are all
trashed.  Presumably these are symptoms to the same problem.

Comment 4 Jan Kratochvil 2006-06-23 14:41:29 UTC
Created attachment 131436 [details]
.gdbinit script configuring SIGSEGV handling for gdb(1)

Tested on Fedora Core 5 gdb-6.3.0.0-1.122 and valgrind-3.1.0-2.
While I do not find much useful to debug the whole valgrind(1) wrapper you need
to configure SIGSEGV handling for gdb as it is used internally by valgrind.
Attached script (non)reproducibility by: gdb -nx
--command=/tmp/pr151568.gdbinit

Comment 5 Robin Green 2006-08-20 14:53:30 UTC
You're right - I just didn't configure SIGSEGV handling.


Note You need to log in before you can comment on or make changes to this bug.