[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master reporting "creating pipe: too many open files"
From: |
Stephen Leake |
Subject: |
Re: master reporting "creating pipe: too many open files" |
Date: |
Sat, 16 Jul 2022 14:58:37 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Stephen Leake <stephen_leake@stephe-leake.org>
>> Date: Sat, 16 Jul 2022 09:58:18 -0700
>>
>> I have a custom git front-end that works fine in emacs 28, but in
>> current emacs master it always reports "creating pipe: too many open
>> files" after a commands. Then any subsequent command in emacs that
>> requires a file (such as saving a buffer) also fails.
>>
>> This is on Windows 8.1, emacs built with mingw64.
>>
>> I'm guessing there is some file/process handle that is opened and not
>> closed.
>>
>> I update my local copy of emacs master rarely, so this change happened
>> sometime since Dec 2021; I have not tried to bisect.
>>
>> Attached is some simplified code that shows the problem; it runs a
>> subprocess the same way the git front-end does. To run, load the file,
>> then run M-x dd-test. On my system, master is ok with 10 processes,
>> fails with 100 (I did not bisect further). Emacs 28 is ok forever.
>
> AFAICT, this loop in deactivate_process:
>
> /* Beware SIGCHLD hereabouts. */
>
> for (i = 0; i < PROCESS_OPEN_FDS; i++)
> close_process_fd (&p->open_fd[i]);
>
> doesn't close the last of the 4 descriptors opened by the 2 emacs_pipe
> calls in make-pipe-process. It calls 'close' with the right value,
> and close returns zero, but the pipe stays open. In Emacs 28, this
> same loop successfully closes the descriptor. I don't know why.
>
> Perhaps bisecting could help.
I'll do that.
I reported this as bug#56606
--
-- Stephe