public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	Aditya Kamath1 <Aditya.Kamath1@ibm.com>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: Re: [Patch] Fix Assertion pid 0 failure in AIX while running gdb.threads/foll-fork-other-thread
Date: Thu, 27 Apr 2023 12:20:31 +0000	[thread overview]
Message-ID: <7397ecb838f4a65cbdde67a869d5ac4788ced334.camel@de.ibm.com> (raw)
In-Reply-To: <CH2PR15MB35443DC1D9D5A5C88F9DEAF7D66A9@CH2PR15MB3544.namprd15.prod.outlook.com>

Aditya Kamath1 <Aditya.Kamath1@ibm.com> wrote:

>Once the thread completes execution and goes to pd_disable () in
>aix-thread.c , since the process exits, the inferior_ptid.pid () is 0.
>Hence in pd_disable () when GDB goes to fetch the aix thread data for
>process 0, this assertion failure occurs. 

I'm not sure this is quite right.  Can this now cause leaks e.g.
because we did not properly call pthdb_session_destroy?

Also, I'm starting to wonder if using inferior_ptid is right here
in the first place.  For example, aix_thread_target::detach
actually gets an "inferior *" argument, which it then completely
ignores and instead tries to re-create an inferior from
inferior_ptid - this doesn't look right.

I guess pd_enable and pd_disable should be getting inferior *
arguments and use those, whenever available.

Bye,
Ulrich


  reply	other threads:[~2023-04-27 12:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27  9:45 Aditya Kamath1
2023-04-27 12:20 ` Ulrich Weigand [this message]
2023-05-02 11:49   ` Aditya Kamath1
2023-05-02 12:53     ` Ulrich Weigand
2023-05-02 13:55       ` Aditya Kamath1
2023-05-02 14:06         ` Ulrich Weigand
2023-05-02 14:40           ` Aditya Kamath1
2023-05-02 14:52             ` Ulrich Weigand
2023-05-02 15:22               ` Aditya Kamath1
2023-05-02 15:33                 ` Ulrich Weigand

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=7397ecb838f4a65cbdde67a869d5ac4788ced334.camel@de.ibm.com \
    --to=ulrich.weigand@de.ibm.com \
    --cc=Aditya.Kamath1@ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).