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 AIX thread NULL assertion failure during fork
Date: Wed, 22 Nov 2023 15:33:26 +0000 [thread overview]
Message-ID: <127fc56eb46c35fda4aa20365dc0905d23247488.camel@de.ibm.com> (raw)
In-Reply-To: <CH2PR15MB35443BE24D90A9242DC7B8E0D6BAA@CH2PR15MB3544.namprd15.prod.outlook.com>
Aditya Kamath1 <Aditya.Kamath1@ibm.com> wrote:
>>Yes. So we have a little more to understand here. So once pd_enable ()
>>was called and then pd_activate () was called it looks like either
>>the libraries were not fully loaded though the pthdb_session_pthreaded
>>successful or the create thread event breakpoint was not successful.
>>So the code execution did not reach >>pd_activate (). Therefore our
>>child process was still ptid_t (pid, 0 ,0). When I used the pd_activate ()
>>inside the update_threadlist () it succeeded to initialise a session
>>later on when it was called and then we were able to set pd_active
>>and get to sync_threadlists ().
>
>I can confirm that this condition
>/* When attaching / handling fork child, don't try activating
> thread debugging until we know about all shared libraries. */
> if (inf->in_initial_library_scan)
> return;
>
>is what is the reason we fail to reach pd_activate ().. Sorry for not being clear in my previous email..
OK, so this raises two questions:
- I think we never should call pd_activate twice on a process
where pd_active is already true. This can now happen when
you call pd_activate from update_thread_list.
- Do we even need the in_initial_library_scan check at all
anymore? I seem to recall we added that as the
sync_threadlists call could cause confusion during early
startup. But now that we don't call sync_threadlists
from pd_activate any more, maybe we can simply remove that
check completely? And then, maybe we no longer need to
call pd_active from update_thread_list.
Minor issues I noticed in the patch:
- Variable "data" in update_thread_list looks unused?
- Some whitespace issues - please watch the TAB settings,
in the GDB sources a TAB should be 8 spaces.
Bye,
Ulrich
next prev parent reply other threads:[~2023-11-22 15:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 7:25 Aditya Kamath1
2023-11-20 11:27 ` Ulrich Weigand
2023-11-21 7:30 ` Aditya Kamath1
2023-11-21 12:17 ` Ulrich Weigand
2023-11-22 10:48 ` Aditya Kamath1
2023-11-22 11:30 ` Ulrich Weigand
2023-11-22 13:58 ` Aditya Kamath1
2023-11-22 14:14 ` Aditya Kamath1
2023-11-22 15:33 ` Ulrich Weigand [this message]
2023-11-22 16:22 ` Aditya Kamath1
2023-11-22 18:30 ` Ulrich Weigand
2023-11-23 6:06 ` Aditya Kamath1
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=127fc56eb46c35fda4aa20365dc0905d23247488.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).