From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: What does the error "Process not running" mean? Date: Sun, 06 Feb 2022 18:54:08 +0200 Message-ID: <83zgn4x7f3.fsf@gnu.org> References: <8735l0o518.fsf@gnu.org> <5Opci81-9PcO6g1ljSQMCeDxh03cTnw4IEQWRzc2QInT4V52Ph2nB2WyyrBkSR11O8A9W4Coh1Wz_J9v-JeqnFC3melWsBOK2-hU9f2tyWQ=@protonmail.com> <87sfszu2ls.fsf@gnu.org> <3qySp5xSA2V0n9C8vwql9UbGKia8POa7OZcDnXg6e8jvW59uKuICMg8MMi5o-drq2sIcWWOejQJhal9aBXZaZM09a6oyenNylYnn5Qjp-H8=@protonmail.com> <6Ox0QxOSiVddeNsCaACeldkV9F-Nh9dM-rRERWveYqhG8t126cIm2MGmadX7Uy8YL-IQX9-Y__ZjAwEKArVB5v81UoZWZ7U4_1R70ywhZZY=@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11548"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 06 17:56:35 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nGkq3-0002lG-ES for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 06 Feb 2022 17:56:35 +0100 Original-Received: from localhost ([::1]:45516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGkq1-0003dX-PA for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 06 Feb 2022 11:56:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGknw-0003dA-Ia for help-gnu-emacs@gnu.org; Sun, 06 Feb 2022 11:54:24 -0500 Original-Received: from [2001:470:142:3::e] (port=60282 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGknw-0000ZO-9Z for help-gnu-emacs@gnu.org; Sun, 06 Feb 2022 11:54:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Aml6ldao2wmb9D/0xAAfXhKGGBbI05FHV59EuS/E+jY=; b=kTS+ojX6W8vs BgElR2TNm1SGTN5uUI/YIEC64zPB2OujT1j3D9Ke3uzItkr7mzOcmM8V89i7viqPUZL/mzDsj0L8B pTzLrsPm40pYdZxbLapbX71FLymBIrHlZtbgSTh3pNMnPnptgDacz4d1LRr2+5gXQE3+aest0Lk+r fg0Cf6wTklK40g+s7fa2oKDOiFmbplDVfVxai4Bn2AS5Yluf98YEGTtb/9//8TeYyKOyufrNJI81s y9Gf4DCpRHXtYSWTh1ydDH36G3S5CZQ/Byvu8VzS3TE/OkJjlpsnfAtV/P/YjvtgH/BxCU7tfjrVF dgnnNBuDAyn5SnF7m8qkAQ==; Original-Received: from [87.69.77.57] (port=3320 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGknv-0005RM-Q8 for help-gnu-emacs@gnu.org; Sun, 06 Feb 2022 11:54:24 -0500 In-Reply-To: (message from emacsq on Sun, 06 Feb 2022 16:24:15 +0000) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:135789 Archived-At: > Date: Sun, 06 Feb 2022 16:24:15 +0000 > From: emacsq > Cc: help-gnu-emacs@gnu.org > > > > Just an idea. I'll check it when I have the time. > > Apparently, it's too many open files: > > ("make client process failed" "Too many open files" :name "example.com" ...) > > Which is curious, because it's the same with url-queue-retrieve > which allows 6 parallel processes by default. > > I checked and on windows (where I tried) the default file > handle limit is 512 for a process. (which can be increased with > _setmaxstdio) I don't think _setmaxstdio is relevant here: it only affects the number of FILE objects a process can have at any given time (hence the "stdio" part: it alludes to the stdio.h header). IOW, it only affects stream I/O functions: fscanf, fprintf, fread, fwrite, etc. And we don't use those in networking implementation in Emacs, we use low-level functions that go through file descriptors and even lower-level handles. It is much more probable that you are hitting here the 32 subprocesses limit we impose on MS-Windows (for boring technical reasons related to how we emulate 'pselect' and SIGCHLD there). If a Lisp program attempts to create more than 32 sub-processes/network connections at the same time, it will indeed get "Too many open files" (EMFILE). That limit cannot be lifted unless we reimplement core parts of subprocess support on MS-Windows. (If you are interested, read the large comment around line 850 in w32proc.c.) > 512 is not much, but if only 6 network calls are going on at the > same time then it should be enough. Unless, the emacs windows' > networking code does not close file handles in a timely manner. > > Emacs letting the open handles lingering for a while or not > closing them for some reason (handle leaking) could explain > why fetching many urls can run into the handle limit even if > there are not many parallel fetches at the same time. I don't think that's the case: we close the handles as soon as the network connection is closed.