Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH/7.10 2/2] gdbserver: Fix non-stop / fork / step-over issues
Date: Mon, 03 Aug 2015 16:20:00 -0000	[thread overview]
Message-ID: <55BF94BC.6090904@redhat.com> (raw)
In-Reply-To: <86a8u8e754.fsf@gmail.com>

On 08/03/2015 04:14 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
> 
>>    I fixed some of these issues recently, but there's a lot more to
>>    do.  Fixing that one just exposes other similar problems elsewhere.
>>    Meanwhile, I've filed PR18749 and kfailed the test for native.
> 
> This test case also exposes the issue on arm-linux with gdbserver,
> 
> (gdb) PASS: gdb.threads/fork-plus-threads-2.exp: detach-on-fork=on: continue &
> [New Thread 29905]^M
> [New Thread 29900]^M
> [New Thread 29895]^M
> [New Thread 29898]^M
> [New Thread 29902]^M
> [New Thread 29896]^M
> [New Thread 29903]^M
> [New Thread 29901]^M
> [New Thread 29899]^M
> [New Thread 29904]^M
> [New Thread 29897]^M
> Error in testing breakpoint condition:^M
> Cannot access memory at address 0x11094^M
> FAIL: gdb.threads/fork-plus-threads-2.exp: detach-on-fork=on: inferior 1 exited

Ah, OK, so I guess it'll fail on all targets where gdbserver
does not handle the breakpoint condition server-side.

> Remote debugging from host 127.0.0.1^M
> ^M
> Child exited with status 0^M
> GDBserver exiting^M
> ../../binutils-gdb/gdb/thread.c:936: internal-error: finish_thread_state: Assertion `tp' failed.^M
> A problem internal to GDB has been detected,^M
> further debugging may prove unreliable.^M
> Quit this debugging session? (y or n) monitor exit^M
> Please answer y or n.^M
> ../../binutils-gdb/gdb/thread.c:936: internal-error: finish_thread_state: Assertion `tp' failed.^

I've seem this too while developing the patch.  I saw it happen when the
connection is abruptly closed while there's a finish_thread_state cleanup
installed (while gdb is handling an event, within fetch_inferior_event).  The
connection-close deletes all threads, and the cleanup wants to finish the
state of a now-nonexisting thread.  See [palves/fork_stale_running] on my github.

Thanks,
Pedro Alves


  reply	other threads:[~2015-08-03 16:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 17:03 [PATCH/7.10 0/2] gdbserver: Fix several fork support (& co) issues Pedro Alves
2015-07-31 17:04 ` [PATCH/7.10 2/2] gdbserver: Fix non-stop / fork / step-over issues Pedro Alves
2015-07-31 18:04   ` Don Breazeal
2015-07-31 19:02     ` Pedro Alves
2015-08-05 22:19       ` Don Breazeal
2015-08-06 10:09         ` Pedro Alves
2015-08-03 15:14   ` Yao Qi
2015-08-03 16:20     ` Pedro Alves [this message]
2015-08-04 16:40       ` Pedro Alves
2015-08-05 11:41         ` Yao Qi
2015-08-05 15:10           ` Pedro Alves
2015-08-06  9:44             ` [pushed] " Pedro Alves
2015-07-31 17:04 ` [PATCH/7.10 1/2] Linux gdbserver confused when event randomization returns a process exit event Pedro Alves
2015-08-03 10:59   ` Yao Qi
2015-08-06  9:34     ` [pushed][PATCH 1/3] Linux gdbserver fork event debug output (Re: [PATCH/7.10 1/2] Linux gdbserver confused when event randomization returns a process exit event) Pedro Alves
2015-08-06  9:43     ` [pushed]Re: [PATCH/7.10 1/2] Linux gdbserver confused when event randomization returns a process exit event Pedro Alves

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=55BF94BC.6090904@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /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