[Bug remote/24825] New: find_inferior_pid(int): Assertion `pid != 0' failed for valrgind target

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug remote/24825] New: find_inferior_pid(int): Assertion `pid != 0' failed for valrgind target

Martin.Jansa at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24825

            Bug ID: 24825
           Summary: find_inferior_pid(int): Assertion `pid != 0' failed
                    for valrgind target
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: remote
          Assignee: unassigned at sourceware dot org
          Reporter: keiths at redhat dot com
  Target Milestone: ---

$ cat > ~/tmp/exited.c << EOF

> #include <stdlib.h>
>
> void
> foo ()
> {
>    exit (0);
> }
>
> int
> main (void)
> {
>    foo ();
>    return 1;
> }
> EOF
$ gcc -g -o ~/tmp/exited ~/tmp/exited.c
$ valgrind --vgdb-error=0 ~/tmp/exited

<!-- in other terminal -->

GNU gdb (GDB) 8.3.50.20190716-git
Copyright (C) 2019 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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/keiths/tmp/exited...
(gdb) target remote | /usr/libexec/valgrind/../../bin/vgdb
Remote debugging using | /usr/libexec/valgrind/../../bin/vgdb
relaying data between gdb and process 24045
warning: remote target does not support file transfer, attempting to access
files from local filesystem.
Reading symbols from /lib64/ld-linux-x86-64.so.2...
(No debugging symbols found in /lib64/ld-linux-x86-64.so.2)
0x0000000004001110 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) b main
Breakpoint 1 at 0x401138: file exited.c, line 12.
(gdb) c
Continuing.

Breakpoint 1, main () at exited.c:12
12         foo ();
(gdb) s
foo () at exited.c:6
6          exit (0);
(gdb) n
[Inferior 1 (Remote target) exited normally]
You can't do that without a process to debug.
(gdb) quit
../../src/gdb/inferior.c:291: internal-error: inferior* find_inferior_pid(int):
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

I believe this is the same issue (different assertion) as rhbz#1729277.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug remote/24825] find_inferior_pid(int): Assertion `pid != 0' failed for valrgind target

Martin.Jansa at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24825

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|HEAD                        |8.3

--- Comment #1 from Keith Seitz <keiths at redhat dot com> ---
Verified in 8.3 release as well.

--
You are receiving this mail because:
You are on the CC list for the bug.