public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: Jeremy Drake <cygwin@jdrake.com>,
	Takashi Yano <takashi.yano@nifty.ne.jp>
Cc: cygwin-patches@cygwin.com
Subject: Re: [PATCH] fhandler_pipe: add sanity limit to handle loops
Date: Sat, 25 Dec 2021 17:18:05 -0500	[thread overview]
Message-ID: <c5a383f1-59b9-d925-b686-ed36e7753ebb@cornell.edu> (raw)
In-Reply-To: <alpine.BSO.2.21.2112251111580.11760@resin.csoft.net>

On 12/25/2021 2:20 PM, Jeremy Drake via Cygwin-patches wrote:
> On Sun, 26 Dec 2021, Takashi Yano wrote:
> 
>> Could you please check the result of the following test case
>> in that ARM64 platform?
>>
> 
> I will probably not be able to get to this until tomorrow at the earliest.
> But keep in mind the issue I'm seeing is not deterministic - I have to run
> pacman in a loop validating files via GPGME and eventually it will hang
> (or hit the assert I added in that version).  Most of the time, it's
> perfectly fine.

The results you've already posted seem to indicate that, on your platform, 
NtQueryInformationProcess(ProcessHandleInformation) returns STATUS_SUCCESS even 
if the buffer it's passed is too small.  [That won't necessarily cause a problem 
in every one of your pacman runs, so it might appear non-deterministic.] 
Takashi's test case is designed to verify that that's what's going on.

And I think he also wants to see if phi->NumberOfHandles is reliable on your 
platform even when the buffer is too small.  If so, then (on your platform), the 
do-while loop could be replaced by two calls to NtQueryInformationProcess.  The 
first call would determine how big a buffer is needed, and the second call would 
use a buffer of that size.

But we don't know any of that for sure yet.  We also don't know (or at least I 
don't know) what aspects of your platform are relevant.  For example, does this 
always happen on Windows 11?  or on ARM64?

Ken

  reply	other threads:[~2021-12-25 22:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 23:10 Jeremy Drake
2021-12-24  0:06 ` Ken Brown
2021-12-24  0:29   ` Jeremy Drake
2021-12-24 17:17     ` Ken Brown
2021-12-24 19:42       ` Jeremy Drake
2021-12-24 22:46         ` Ken Brown
2021-12-24 23:42           ` Jeremy Drake
2021-12-25  0:39           ` Jeremy Drake
2021-12-25  3:19             ` Takashi Yano
2021-12-25  3:47               ` Jeremy Drake
2021-12-25  4:12                 ` Takashi Yano
2021-12-25  5:40                   ` Jeremy Drake
2021-12-25 17:10                     ` Takashi Yano
2021-12-25 17:16                       ` Takashi Yano
2021-12-25 19:00                         ` Marco Atzeri
2021-12-25 19:20                       ` Jeremy Drake
2021-12-25 22:18                         ` Ken Brown [this message]
2021-12-25 23:00                         ` Jeremy Drake
2021-12-26  3:04                           ` Ken Brown
2021-12-26  4:56                             ` Jeremy Drake
2021-12-26 15:09                               ` Ken Brown
2021-12-26 16:04                                 ` Ken Brown
2021-12-26 16:24                                   ` Ken Brown
2021-12-26 21:35                                     ` Jeremy Drake
2021-12-26 22:18                                       ` Ken Brown
2021-12-26 22:43                                         ` Jeremy Drake
2021-12-26 23:12                                           ` Ken Brown
2021-12-26 23:23                                             ` Jeremy Drake
2021-12-27  2:42                                               ` Ken Brown
2021-12-27 21:12                                                 ` Jeremy Drake
2021-12-29 21:59                                             ` Ken Brown
2021-12-29 23:29                                               ` Jeremy Drake
2021-12-27 20:01     ` Jon Turney
2021-12-29  5:45       ` Jeremy Drake
2021-12-30 15:44         ` Jon Turney

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=c5a383f1-59b9-d925-b686-ed36e7753ebb@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin-patches@cygwin.com \
    --cc=cygwin@jdrake.com \
    --cc=takashi.yano@nifty.ne.jp \
    /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).