Re: [PATCH] fhandler_pipe: add sanity limit to handle loops

2021-12-26 Thread Ken Brown
On 12/26/2021 6:23 PM, Jeremy Drake wrote: On Sun, 26 Dec 2021, Ken Brown wrote: On 12/26/2021 5:43 PM, Jeremy Drake wrote: My loops are still going after an hour. I know that ARM64 would have hit the assert before now. Well, ARM64 hung up, but didn't hit the assert, so maybe there's some

Re: [PATCH] fhandler_pipe: add sanity limit to handle loops

2021-12-26 Thread Jeremy Drake via Cygwin-patches
On Sun, 26 Dec 2021, Ken Brown wrote: > On 12/26/2021 5:43 PM, Jeremy Drake wrote: > > My loops are still going after an hour. I know that ARM64 would have hit > > the assert before now. Well, ARM64 hung up, but didn't hit the assert, so maybe there's some *other* issue running around.

Re: [PATCH] fhandler_pipe: add sanity limit to handle loops

2021-12-26 Thread Ken Brown
On 12/26/2021 5:43 PM, Jeremy Drake wrote: On Sun, 26 Dec 2021, Ken Brown wrote: + /* NtQueryInformationProcess can return STATUS_SUCCESS with +invalid handle data for certain processes. See +

Re: [PATCH] fhandler_pipe: add sanity limit to handle loops

2021-12-26 Thread Jeremy Drake via Cygwin-patches
On Sun, 26 Dec 2021, Ken Brown wrote: > + /* NtQueryInformationProcess can return STATUS_SUCCESS with > + invalid handle data for certain processes. See > + > https://github.com/processhacker/processhacker/blob/master/phlib/native.c#L5754. I would recommend using the

Re: [PATCH] fhandler_pipe: add sanity limit to handle loops

2021-12-26 Thread Ken Brown
On 12/26/2021 4:35 PM, Jeremy Drake wrote: On Sun, 26 Dec 2021, Ken Brown wrote: On 12/26/2021 11:04 AM, Ken Brown wrote: On 12/26/2021 10:09 AM, Ken Brown wrote: 1. For some processes, NtQueryInformationProcess(ProcessHandleInformation) can return STATUS_SUCCESS with invalid handle

Re: [PATCH] fhandler_pipe: add sanity limit to handle loops

2021-12-26 Thread Jeremy Drake via Cygwin-patches
On Sun, 26 Dec 2021, Ken Brown wrote: > On 12/26/2021 11:04 AM, Ken Brown wrote: > > On 12/26/2021 10:09 AM, Ken Brown wrote: > > > 1. For some processes, NtQueryInformationProcess(ProcessHandleInformation) > > > can return STATUS_SUCCESS with invalid handle information.  See the > > > comment

Re: [PATCH] fhandler_pipe: add sanity limit to handle loops

2021-12-26 Thread Ken Brown
On 12/26/2021 11:04 AM, Ken Brown wrote: On 12/26/2021 10:09 AM, Ken Brown wrote: 1. For some processes, NtQueryInformationProcess(ProcessHandleInformation) can return STATUS_SUCCESS with invalid handle information.  See the comment starting at line 5754, where it is shown how to detect this.

Re: [PATCH] fhandler_pipe: add sanity limit to handle loops

2021-12-26 Thread Ken Brown
On 12/26/2021 10:09 AM, Ken Brown wrote: 1. For some processes, NtQueryInformationProcess(ProcessHandleInformation) can return STATUS_SUCCESS with invalid handle information.  See the comment starting at line 5754, where it is shown how to detect this. If I'm right, the following patch should

Re: [PATCH] fhandler_pipe: add sanity limit to handle loops

2021-12-26 Thread Ken Brown
On 12/25/2021 11:56 PM, Jeremy Drake wrote: I set up a windows server 2022 VM last night and went nuts stressing pacman/GPGME. I was able to reproduce the issue there: status = 0x, phi->NumberOfHandles = 8261392, n_handle = 256 [#--] 14% assertion