Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Stephen Roberts <Stephen.Roberts@arm.com>
Cc: Pedro Alves <palves@redhat.com>,
	 "gdb\@sourceware.org" <gdb@sourceware.org>,  nd <nd@arm.com>
Subject: Re: GDB hangs when calling inferior functions
Date: Wed, 18 Oct 2017 09:17:00 -0000	[thread overview]
Message-ID: <86tvywvmqg.fsf@gmail.com> (raw)
In-Reply-To: <AM3PR08MB062540B81F08F16ECE6B00B2FB4B0@AM3PR08MB0625.eurprd08.prod.outlook.com>	(Stephen Roberts's message of "Thu, 12 Oct 2017 13:33:13 +0000")

Stephen Roberts <Stephen.Roberts@arm.com> writes:

> I've included a gdb testcase below - hopefully this format is acceptable. This testcase reproduces the issue around 99% of the time on my ubuntu 16.04 machine. This figure drops closer to 50% when under heavy load, which suggested a race condition. I dug deeper into this and found that the threads which hang  are always ones which did not hit the breakpoint but were stopped when another thread did hit a breakpoint. Threads which are stopped at breakpoints are immune to this issue. Loading the system allows more threads to reach the breakpoint before they are stopped by gdb. 

I can reproduce the hang with your test case.  Looks
inferior_event_handler (INF_EXEC_COMPLETE, ) should be called somewhere,
may be in infrun or the thread finite-state machine is in a wrong state
for inferior call.

-- 
Yao (齐尧)


      reply	other threads:[~2017-10-18  9:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 13:02 Stephen Roberts
     [not found] ` <3b857cc7-e722-f10f-7fea-c3928cc0ac36@redhat.com>
2017-10-12 13:33   ` Stephen Roberts
2017-10-18  9:17     ` Yao Qi [this message]

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=86tvywvmqg.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=Stephen.Roberts@arm.com \
    --cc=gdb@sourceware.org \
    --cc=nd@arm.com \
    --cc=palves@redhat.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