Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: John Baldwin <jhb@freebsd.org>, vd@freebsd.org
Cc: Luis Machado <lgustavo@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] PR threads/20743: Don't attempt to suspend or resume exited threads.
Date: Thu, 19 Jan 2017 11:56:00 -0000	[thread overview]
Message-ID: <9eab9ae5-2ca4-6370-cfb1-33a3970f598d@redhat.com> (raw)
In-Reply-To: <2893581.89CAWbS1EM@ralph.baldwin.cx>

On 12/27/2016 09:03 PM, John Baldwin wrote:
> I added the assertion for my own sanity.  I suspect gdb should never try to
> invoke target_resume() with a ptid of an exited thread, but if for some
> reason it did the effect on FreeBSD would be a hang since we would suspend
> all the other threads and when the process was continued via PT_CONTINUE it
> would have nothing to do and would never return from wait().  I'd rather have
> gdb fail an assertion in that case rather than hang.

OOC, what happens on FreeBSD on the gdb.threads/no-unwaited-for-left.exp test?

That test:

 - spawns a thread
 - gdb switches to that thread, and,
 - enables "set scheduler-locking on", and "continue"s.
 - the child thread exits
 - gdb should not hang.

It used to hang on Linux, until TARGET_WAITKIND_NO_RESUMED was added.

Thanks,
Pedro Alves


      parent reply	other threads:[~2017-01-19 11:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23 21:30 John Baldwin
2016-12-23 21:43 ` Luis Machado
2016-12-27 16:43   ` Vasil Dimov
2016-12-27 21:03     ` John Baldwin
2016-12-28  8:07       ` Vasil Dimov
2016-12-28 17:37         ` John Baldwin
2017-01-12 16:29           ` Luis Machado
2017-01-12 19:17             ` John Baldwin
2017-01-13  1:27               ` Luis Machado
2017-01-13  1:53                 ` John Baldwin
2017-01-19 11:54                   ` Pedro Alves
2017-01-06 19:35       ` John Baldwin
2017-01-19 11:56       ` Pedro Alves [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=9eab9ae5-2ca4-6370-cfb1-33a3970f598d@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@freebsd.org \
    --cc=lgustavo@codesourcery.com \
    --cc=vd@freebsd.org \
    /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