Gdb assertion failure when using core dumps: "find_inferior_pid: Assertion `pid != 0' failed"

Bug #906876 reported by Alexandros
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdb
Confirmed
Medium
gdb (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Under Natty, I experience an odd issue when trying to use a core dump with gdb. In particular, when exiting gdb, I can see the following error message:

/build/buildd/gdb-7.2/gdb/inferior.c:362: internal-error: find_inferior_pid: Assertion `pid != 0' failed.

Steps to reproduce:
1) Start bash and type "ulimit -c unlimited" to enable core dumps.
2) Compile any C or C++ source file that causes a segfault. (One has already been attached)
3) Run the executable and then type "gdb progname dump", where progname is the name of the program and dump is the core dump.
4) Type "run" in gdb, wait for the program to crash and type "quit", "y".
5) The following is displayed:

/build/buildd/gdb-7.2/gdb/inferior.c:362: internal-error: find_inferior_pid: Assertion `pid != 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

/build/buildd/gdb-7.2/gdb/inferior.c:362: internal-error: find_inferior_pid: Assertion `pid != 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
---
Architecture: i386
CheckboxSubmission: c8e668fe14ff2a447d87d27acf9e150b
CheckboxSystem: b845c366ea09c60efa3a45c1b5b21525
DistroRelease: Ubuntu 11.04
InstallationMedia: Ubuntu-Netbook 10.04 "Lucid Lynx" - Release i386 (20100429.4)
NonfreeKernelModules: wl
Package: gdb 7.2-1ubuntu11
PackageArchitecture: i386
ProcEnviron:
 LANGUAGE=el_GR:en
 LANG=el_GR.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.38-13.52-generic 2.6.38.8
Tags: natty running-unity
Uname: Linux 2.6.38-13-generic i686
UpgradeStatus: Upgraded to natty on 2011-10-15 (65 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Alexandros (alexandros-t) wrote :
Revision history for this message
Alexandros (alexandros-t) wrote : Dependencies.txt

apport information

tags: added: apport-collected natty running-unity
description: updated
Revision history for this message
Alexandros (alexandros-t) wrote :

I also found a similar bug report:

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

Changed in gdb:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

works for me in 14.04 LTS

Changed in gdb (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.