public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/17051] New: GDB crash when disconnecting from and reconnecting to gdbserver
@ 2014-06-12 20:20 simon.marchi at ericsson dot com
  2014-10-19 21:50 ` [Bug gdb/17051] " xdje42 at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: simon.marchi at ericsson dot com @ 2014-06-12 20:20 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17051

            Bug ID: 17051
           Summary: GDB crash when disconnecting from and reconnecting to
                    gdbserver
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: simon.marchi at ericsson dot com

I can make GDB crash reliably using these steps:

1- Start gdbserver with --multi
2- Connect to gdbserver
3- Specify the executable with set remote exec-file
4- Run
5- Disconnect
[inferior continues running under gdbserver...]
6- Reconnect to gdbserver
7- Witness crash

Here is a transcript from my terminal:

$ gdb a.out
Reading symbols from a.out...done.
(gdb) target extended-remote :1234
Remote debugging using :1234
(gdb) set remote exec-file /home/simark/a.out
(gdb) run &
Starting program: /home/simark/a.out 
(gdb) disconnect 
Ending remote debugging.
(gdb) target extended-remote :1234
Remote debugging using :1234
(gdb) 
[Thread 15182.15182] #1 stopped.
0x00007ffff7ad5d60 in ?? ()
../../../src/binutils-gdb/gdb/inline-frame.c:340: internal-error:
skip_inline_frames: Assertion `find_inline_frame_state (ptid) == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug gdb/17051] GDB crash when disconnecting from and reconnecting to gdbserver
  2014-06-12 20:20 [Bug gdb/17051] New: GDB crash when disconnecting from and reconnecting to gdbserver simon.marchi at ericsson dot com
@ 2014-10-19 21:50 ` xdje42 at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: xdje42 at gmail dot com @ 2014-10-19 21:50 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17051

Doug Evans <xdje42 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xdje42 at gmail dot com

--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
A similar failure:

bash2$ gdbserver --multi :1234
bash1$ gdb ~/foo
(gdb) set remote exec-file ~/foo # doesn't work, but it triggers gdbserver to
exit
(gdb) tar ext :1234
(gdb) start
Temporary breakpoint 1 at 0x4007ae: main.
Starting program: /home/dje/foo
Running "~/foo" on the remote target failed

--> gdbserver exits with:
Cannot exec ~/foo: No such file or directory.

Back in gdb:

(gdb) i thr
[New Thread 10659.10659]
Remote connection closed
(gdb) set remote exec-file /home/dje/foo  # fix path (though IWBN to support ~
here)
(gdb) tar ext :1234
Remote debugging using :1234

Breakpoint 1, internal_error (
    file=0x8d5150 "../../binutils-gdb/gdb/thread.c", line=703,
    fmt=0x8d5130 "%s: Assertion `%s' failed.")
    at ../../binutils-gdb/gdb/common/errors.c:54

which is here:

static int
is_thread_state (ptid_t ptid, enum thread_state state)
{
  struct thread_info *tp;

  tp = find_thread_ptid (ptid);
=>gdb_assert (tp);
  return tp->state == state;
}

(top-gdb) bt
#0  internal_error (file=0x8d5150 "../../binutils-gdb/gdb/thread.c",
    line=703, fmt=0x8d5130 "%s: Assertion `%s' failed.")
    at ../../binutils-gdb/gdb/common/errors.c:54
#1  0x0000000000628c40 in is_thread_state (ptid=..., state=THREAD_EXITED)
    at ../../binutils-gdb/gdb/thread.c:703
#2  0x0000000000628cac in is_exited (ptid=...)
    at ../../binutils-gdb/gdb/thread.c:716
#3  0x000000000074d0f4 in has_stack_frames ()
    at ../../binutils-gdb/gdb/frame.c:1516
#4  0x000000000074d1db in deprecated_safe_get_selected_frame ()
    at ../../binutils-gdb/gdb/frame.c:1563
#5  0x0000000000740f43 in check_frame_language_change ()
    at ../../binutils-gdb/gdb/top.c:344
#6  0x00000000007412a3 in execute_command (p=0xd1317c "4", from_tty=1)
    at ../../binutils-gdb/gdb/top.c:485
#7  0x0000000000638988 in command_handler (command=0xd13170 "")
    at ../../binutils-gdb/gdb/event-top.c:432
#8  0x0000000000638f41 in command_line_handler (rl=0x17870f0 "") at
../../binutils-gdb/gdb/event-top.c:629
...

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-19 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12 20:20 [Bug gdb/17051] New: GDB crash when disconnecting from and reconnecting to gdbserver simon.marchi at ericsson dot com
2014-10-19 21:50 ` [Bug gdb/17051] " xdje42 at gmail dot com

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).