public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Petr Sumbera <petr.sumbera@oracle.com>
To: Pedro Alves <palves@redhat.com>, gdb@sourceware.org
Subject: Re: Solaris - procfs: couldn't find pid 32748 (kernel thread 21) in procinfo list
Date: Tue, 2 Jun 2020 09:32:08 +0200	[thread overview]
Message-ID: <51ff2398-4a7d-eb07-be98-0ae92673e152@oracle.com> (raw)
In-Reply-To: <0570473c-1181-2269-06a0-0f6d4fc6b178@redhat.com>

On 01.06.2020 21:12, Pedro Alves wrote:
> On 6/1/20 12:39 PM, Petr Sumbera via Gdb wrote:
>> The issue seems to be that the LWP exits and the status->kind is set to TARGET_WAITKIND_SPURIOUS:
>>
>> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/procfs.c;h=f6c6b0e71c16224d3e7345ca09e011cdcf06349a;hb=HEAD#l2214
>>
>> But instantly it's added into the list again here:
>>
>> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/infrun.c;h=95fc3bfe45930b53c33cb4de165db9c070449ad8;hb=HEAD#l5200
>>
>> But there is no longer such LWP in /proc.
>>
>> Any suggestion?

Thanks for looking at it!

> Either:
> 
> - replace TARGET_WAITKIND_SPURIOUS with TARGET_WAITKIND_THREAD_EXITED, or,

With this I'm getting:

[LWP    21         exited]
[LWP    21         exited]
/builds/psumbera/userland-gdb-procinfo/components/gdb/gdb-9.2/gdb/thread.c:459: 
internal-error: void delete_thread_1(thread_info*, bool): Assertion `thr 
!= nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

> - replace
>      status->kind = TARGET_WAITKIND_SPURIOUS;
>      return retval;
>    with
>      goto wait_again;
>    instead.

and with this:

[LWP    20         exited]
[LWP    20         exited]
/builds/psumbera/userland-gdb-procinfo/components/gdb/gdb-9.2/gdb/thread.c:459: 
internal-error: void delete_thread_1(thread_info*, bool): Assertion `thr 
!= nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

--

Note that in both cases there are TWO exits for one LWP. But LWP numbers 
differ.

Any other comment?

Thanks!

Petr

  reply	other threads:[~2020-06-02  7:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 15:29 Petr Sumbera
2020-05-28 16:01 ` Rainer Orth
2020-06-01 12:47   ` Petr Sumbera
2020-06-01 11:39 ` Petr Sumbera
2020-06-01 19:12   ` Pedro Alves
2020-06-02  7:32     ` Petr Sumbera [this message]
2020-06-02 14:53       ` Pedro Alves
2020-06-02 16:30         ` Petr Sumbera
2020-06-02 17:14           ` Pedro Alves
2020-06-03 13:09             ` Petr Sumbera
2020-06-08  9:51               ` Petr Sumbera
2020-06-08 13:47                 ` Pedro Alves

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=51ff2398-4a7d-eb07-be98-0ae92673e152@oracle.com \
    --to=petr.sumbera@oracle.com \
    --cc=gdb@sourceware.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).