From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Fix instability in thread groups test
Date: Mon, 13 Aug 2018 13:38:00 -0000 [thread overview]
Message-ID: <7ab394a0-f796-4ff3-65e2-c7db9d7063e7@redhat.com> (raw)
In-Reply-To: <20180813130125.GY3155@embecosm.com>
On 08/13/2018 02:01 PM, Andrew Burgess wrote:
> * Pedro Alves <palves@redhat.com> [2018-08-13 13:03:47 +0100]:
>> I wonder whether we can prevent PID reuse by keeping a descriptor
>> for /proc/PID/ open while we open the other files. Probably not.
>
> That was my first though, I tried:
>
> - chdir /proc/PID
> - opendir for /proc/PID
>
> - Kill /proc/PID
>
> - Read from the opendir handle, find nothing there.
>
> Which didn't really surprise me, but was worth a try...
Does it return "nothing else" even if you don't kill
the process? Or does returning nothing indicate the
process is gone already?
Regardless, I don't think that proves keeping the opendir dir handle
open (or some other file under /proc/PID) does not prevent the kernel
from reusing the PID until the handle is closed, even though I
do suspect it does not.
But thinking a bit more, maybe it's useless to try to detect PID reuse,
because the process we're collecting info for can just as well exec,
which makes the info we had collected so far become invalid in pretty
much the same way...
>>> and the original patch to remove the unstable result applied?
>>> Or maybe the test updated to either PASS or KFAIL?
>>
>> I'd prefer the KFAIL option. At the very least, a comment in
>> the .exp file.
>
> I'll put something together...
Maybe it's not worth the bother. After thinking about it some more,
I'll be happy with a comment in the .exp file.
Pedro Alves
next prev parent reply other threads:[~2018-08-13 13:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 9:58 Andrew Burgess
2018-08-10 21:26 ` Simon Marchi
2018-08-13 9:51 ` Pedro Alves
2018-08-13 11:41 ` Andrew Burgess
2018-08-13 12:03 ` Pedro Alves
2018-08-13 13:01 ` Andrew Burgess
2018-08-13 13:38 ` Pedro Alves [this message]
2018-08-13 21:45 ` [PATCHv2] " Andrew Burgess
2018-08-14 11:37 ` 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=7ab394a0-f796-4ff3-65e2-c7db9d7063e7@redhat.com \
--to=palves@redhat.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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