Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: guitton@adacore.com
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/hpux] acknowledging TTEVT_LWP_EXIT
Date: Tue, 18 Sep 2007 10:20:00 -0000	[thread overview]
Message-ID: <200709181020.l8IAKKtL021625@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <20070918094806.GA1859@adacore.com> (message from Jerome Guitton 	on Tue, 18 Sep 2007 11:48:06 +0200)

> Date: Tue, 18 Sep 2007 11:48:06 +0200
> From: Jerome Guitton <guitton@adacore.com>
> 
> In inf-ttrace, when a TTEVT_LWP_EXIT event is received (thread
> exiting), the corresponding thread is removed from the thread list
> and never resumed. Which is wrong ; the ttrace man page reads:
> 
> TTEVT_LWP_EXIT    This event flag indicates that the debugger wants to
>                   be notified when a thread is exiting via the
>                   lwp_exit() system call. The thread stops upon entry
>                   to the system call.
> 
> So the dying thread is stopped, it should be resumed one last time.
> Otherwise, any other thread waiting for its death on pthread_join
> would be blocked forever (e.g. in attachment, a simple program which
> freezes when it is run under GDB).
> 
> Also in attachement, a patch that fixes this issue. It also fixes 3
> unexpected failures of the testsuite on HPUX 11.11.
> 
> 2007-09-18  Jerome Guitton  <guitton@adacore.com>
> 
> 	* inf-ttrace.c (inf_ttrace_private_thread_info): New structure type.
>         (inf_ttrace_delete_dying_threads_callback): New function.
>         (inf_ttrace_resume): After resuming the execution, iterate over
>         the dying threads to delete them for the thread list.
>         (inf_ttrace_wait): on TTEVT_LWP_EXIT and TTEVT_LWP_TERMINATE,
>         mark the corresponding thread as dying instead of removing it
>         from the thread list.
>         (inf_ttrace_thread_alive): return 0 for dying threads.

Looks ok to me.


  reply	other threads:[~2007-09-18 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-18  9:48 Jerome Guitton
2007-09-18 10:20 ` Mark Kettenis [this message]
2007-09-18 12:44   ` Jerome Guitton

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=200709181020.l8IAKKtL021625@brahms.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=guitton@adacore.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