From unknown Fri Aug 15 15:35:02 2025
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.509 (Entity 5.509)
Content-Type: text/plain; charset=utf-8
From: bug#24869 <24869@debbugs.gnu.org>
To: bug#24869 <24869@debbugs.gnu.org>
Subject: Status: 26.0.50; Emacs should not force lower FD limit on
subprocesses
Reply-To: bug#24869 <24869@debbugs.gnu.org>
Date: Fri, 15 Aug 2025 22:35:02 +0000
retitle 24869 26.0.50; Emacs should not force lower FD limit on subprocesses
reassign 24869 emacs
submitter 24869 Philipp Stephani
severity 24869 normal
thanks
From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 03 14:11:00 2016
Received: (at submit) by debbugs.gnu.org; 3 Nov 2016 18:11:00 +0000
Received: from localhost ([127.0.0.1]:41828 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1c2MTc-0000qU-AN
for submit@debbugs.gnu.org; Thu, 03 Nov 2016 14:11:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52300)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1c2MTa-0000qB-Fu
for submit@debbugs.gnu.org; Thu, 03 Nov 2016 14:10:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1c2MTU-0004c8-40
for submit@debbugs.gnu.org; Thu, 03 Nov 2016 14:10:53 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,
FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled
version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49801)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.71) (envelope-from )
id 1c2MTT-0004bm-R5
for submit@debbugs.gnu.org; Thu, 03 Nov 2016 14:10:52 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43269)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1c2MTS-0001Fw-Hx
for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2016 14:10:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1c2MTO-0004XM-C6
for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2016 14:10:50 -0400
Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:38472)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1c2MTO-0004Wy-3Y
for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2016 14:10:46 -0400
Received: by mail-wm0-x22a.google.com with SMTP id n67so3358564wme.1
for ; Thu, 03 Nov 2016 11:10:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=CvfZHJJt/LwQaiUPdpafygh/L+jZyiwFs0dk86lHu20=;
b=0S0Aa6qO5pFTwMOOctXjxrJy7PpHFtIx1Hdwbk6P88GIpPmMQH48o7klQLnKkL1y48
TgZFKZi4O9ygJIE8hNrqi6+c4B63h9dfn0W1YBh4MqFIHG3MoSdBSODqG2tMYLCmg7UQ
GbmrKUgeWfSQrD6K3RWTq+mEqYYQC15BN/Q3aHBH7bVyXvSH03QLKEr9PpeydktZU59B
mKV5r+GbiiNE0TkTBw/64y0atzDYWEiyeKQn4mCuf/Lqv3egDe1mvoPkhBy3Ir7INdBd
+kLckdA5gr5TtAkXtG7q5eNQMItvLVRdEnp6qB1lURYQ0FSXhc7aZa80Va9+QgAQEmYR
9STg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:from:to:subject:date:message-id:mime-version
:content-transfer-encoding;
bh=CvfZHJJt/LwQaiUPdpafygh/L+jZyiwFs0dk86lHu20=;
b=hPDsO5+q5ctNxXR6wPb8D6mjeO4UANrrgUxEUoluHmciU5HDxvRNIzU+oEvwQ6Whqn
pp7qiFYCRJdimB5Z3Gh4Tqs53L8t89SiEk9LTcTLsgaPz6FHnOTp/aPbTtW1bgYS2SDZ
QIba3s9GzyQ4xpHCazrAm/9HzLw+KaEB6rpdA+etX6zNy0oVrakrZsjpRsOq7dddlGTl
QM9kDJpw3r+we5w2Hy6wrFXPnZ5GMRB1h3dVsPB3BgV5gBq12Jbi+1PgMKqBLmLF26a0
1OZn8K/oNyoBpNR2+XRFvJxKPCA5/H/J6FPDpTJe4douhby/atJdoH0lGDobwytm7vpv
OQDg==
X-Gm-Message-State: ABUngvcVthtRGgJ+G3ZPJsgAQKq3oABaDJOzARd56oye4kUGW7SLg/trjYZtJkk5s0zNkw==
X-Received: by 10.28.149.79 with SMTP id x76mr10235500wmd.27.1478196644193;
Thu, 03 Nov 2016 11:10:44 -0700 (PDT)
Received: from a.muc.corp.google.com ([2a00:79e0:15:4:d92c:1ae7:b1b1:9902])
by smtp.gmail.com with ESMTPSA id b184sm278291wma.0.2016.11.03.11.10.43
for
(version=TLS1_2 cipher=AES128-SHA bits=128/128);
Thu, 03 Nov 2016 11:10:43 -0700 (PDT)
From: Philipp Stephani
To: bug-gnu-emacs@gnu.org
Subject: 26.0.50; Emacs should not force lower FD limit on subprocesses
Date: Thu, 03 Nov 2016 19:10:40 +0100
Message-ID:
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.8 (---)
$ ulimit -n
32768
$ emacs -Q -f shell
In the Emacs Shell buffer, run 'ulimit -n' again, the limit will be
1024.
Internally this limit is required because Emacs uses fd_sets, but it
shouldn't be inherited to subprocesses. Probably Emacs should reset
RLIMIT_NOFILE in subprocesses to the original value.
In GNU Emacs 26.0.50.14 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
of 2016-10-31 built on localhost
Repository revision: 8e7b1af1d708dcf41695cf3fbeff9d35cdb8e5b6
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04 LTS
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Source file =E2=80=98/usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus=
/message.el=E2=80=99 newer than byte-compiled file
Configured using:
'configure --with-modules --enable-checking
--enable-check-lisp-object-type 'CFLAGS=3D-ggdb3 -O0''
Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
shell-dirtrack-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cl-extra help-mode cconv cl-loaddefs pcase cl-lib
dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils shell pcomplete comint ansi-color ring time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)
Memory information:
((conses 16 102563 7574)
(symbols 48 20890 0)
(miscs 40 346 170)
(strings 32 19886 5441)
(string-bytes 1 653021)
(vectors 16 15180)
(vector-slots 8 463908 4318)
(floats 8 189 38)
(intervals 56 213 0)
(buffers 976 13)
(heap 1024 35980 993))
--=20
Google Germany GmbH
Erika-Mann-Stra=C3=9Fe 33
80636 M=C3=BCnchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Gesch=C3=A4ftsf=C3=BChrer: Matthew Scott Sucherman, Paul Terence Manicle
Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und l=C3=
=B6schen
Sie die E-Mail und alle Anh=C3=A4nge. Vielen Dank.
This e-mail is confidential. If you are not the right addressee please do =
not
forward it, please inform the sender, and please erase this e-mail including
any attachments. Thanks.
From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 00:58:48 2016
Received: (at 24869) by debbugs.gnu.org; 7 Nov 2016 05:58:49 +0000
Received: from localhost ([127.0.0.1]:47401 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1c3cxE-0003ZA-Oz
for submit@debbugs.gnu.org; Mon, 07 Nov 2016 00:58:48 -0500
Received: from mail-pf0-f175.google.com ([209.85.192.175]:33629)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1c3cxD-0003Yx-Ap
for 24869@debbugs.gnu.org; Mon, 07 Nov 2016 00:58:47 -0500
Received: by mail-pf0-f175.google.com with SMTP id d2so85969941pfd.0
for <24869@debbugs.gnu.org>; Sun, 06 Nov 2016 21:58:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=c47-org.20150623.gappssmtp.com; s=20150623;
h=date:from:to:cc:subject:message-id:references:mime-version
:content-disposition:in-reply-to:user-agent;
bh=RUU5SRgzfQLWXUvK9JBqk1M9U05YksIiWLxkezHEtdk=;
b=DxWVn1f2fbF4K1CFA2XVZQYg+ijBlSCeJ21vnXtV2fT+MigiEL9VKKYJNbP97v4y6t
MRDyyXmi8IH8fZZzZdI3SO2EtC5/Ez/TUQcm9D6Ez7B0T9Cmq0O1Fs5ACO4GMWn4sucp
ve6teIf9WWhs9Y4/+uqLLVITSjKI7LdV4cmBr9POYj44eEUm9tgNq8xlmH3YotyswLiw
c75gVBEa3hxskmW4DwM10ZSWFRWBJAvBOPZvEDgplQP/Sipx52wmyshYVdGmkGthLNNc
ACFhHuMqqG6ka9li14rC8YD7wk5m97pEJErGNkz4vAjT/lxDmlGcYcnj4vCrDgpXQ3Zq
XQMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:date:from:to:cc:subject:message-id:references
:mime-version:content-disposition:in-reply-to:user-agent;
bh=RUU5SRgzfQLWXUvK9JBqk1M9U05YksIiWLxkezHEtdk=;
b=CW5Rl6d+R/g+DOYjskU/YjhwjukalsvOE3l0FiHrh0noHdx73Hdm7DOEDgHUUiWjL5
mPM+a6FpQ2U82lKyhrfoBSUAvuYTvMPVytNQg1SB3jM6/Qm+pl4MXFeX2lFFEavmVppF
8wOA2nqysBPnHN2wu+BZMJMBhxLfbVQI4ttuvZZbB7RELicKhnajsAGIxPI79SSCEN7+
TqVsESHIjpd6R79iaNOfGQ/quaEsr0KP0h4dn+FQNAf6JLkZ6UYoU+npCmzDQoFrShNt
p1bfC7HEaKtVW8C6/0DEiss3053wBG0y6OW2QVy9YCgcnz7rdIBaBOvwdeBYKo8n6WPe
xJUw==
X-Gm-Message-State: ABUngveWf0dlqPyTFL78BN3A1oaYDCWAFpAQNttYeFZR9pgnairP5m1XdZRj7QJzkyQ9dA==
X-Received: by 10.98.81.70 with SMTP id f67mr10250759pfb.179.1478496637414;
Sun, 06 Nov 2016 21:30:37 -0800 (PST)
Received: from sid.c47.org ([172.30.82.32])
by smtp.gmail.com with ESMTPSA id x20sm8544899pfa.84.2016.11.06.21.30.35
(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
Sun, 06 Nov 2016 21:30:36 -0800 (PST)
Date: Mon, 7 Nov 2016 16:30:31 +1100
From: Brendan O'Dea
To: Philipp Stephani
Subject: Re: bug#24869: 26.0.50; Emacs should not force lower FD limit on
subprocesses
Message-ID: <20161107053031.qoaubm3c5h47tarj@sid.c47.org>
References:
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To:
User-Agent: NeoMutt/20161014 (1.7.1)
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 24869
Cc: 24869@debbugs.gnu.org, Paul Eggert
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.6 (-)
On Thu, Nov 03, 2016 at 07:10:40PM +0100, Philipp Stephani wrote:
>$ ulimit -n
>32768
>$ emacs -Q -f shell
>
>In the Emacs Shell buffer, run 'ulimit -n' again, the limit will be
>1024.
>Internally this limit is required because Emacs uses fd_sets, but it
>shouldn't be inherited to subprocesses. Probably Emacs should reset
>RLIMIT_NOFILE in subprocesses to the original value.
This behaviour was introduced by the fix to Bug#24325:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=a5509099484e0762842bc2c9e914779397b91469
Given that child processes will inherit that limit, this causes unnecessary
problems for forked processes (think: M-x compile RET make -j).
A potential fix would be to stash the initial limit before changing it, and
then restore that limit in child_setup().
My inclination however would just be to revert that entire change: AFAICT it
merely moves the problem from emacs crashing under some aberrant behaviour, to
emacs no longer working under that same behaviour due to system calls randomly
failing with EMFILE.
--bod
From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 01:58:42 2016
Received: (at 24869-done) by debbugs.gnu.org; 7 Nov 2016 06:58:42 +0000
Received: from localhost ([127.0.0.1]:47418 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1c3dtB-000559-UJ
for submit@debbugs.gnu.org; Mon, 07 Nov 2016 01:58:42 -0500
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40348)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1c3dt9-00054w-Iu
for 24869-done@debbugs.gnu.org; Mon, 07 Nov 2016 01:58:40 -0500
Received: from localhost (localhost [127.0.0.1])
by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9D8A5161110;
Sun, 6 Nov 2016 22:58:33 -0800 (PST)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
with ESMTP id DWjFoFK-s0zL; Sun, 6 Nov 2016 22:58:32 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
by zimbra.cs.ucla.edu (Postfix) with ESMTP id E47F4161325;
Sun, 6 Nov 2016 22:58:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
with ESMTP id 3CFCG2CBGMWa; Sun, 6 Nov 2016 22:58:32 -0800 (PST)
Received: from [192.168.1.9] (unknown [47.153.178.162])
by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C54B3161110;
Sun, 6 Nov 2016 22:58:32 -0800 (PST)
Subject: Re: bug#24869: 26.0.50; Emacs should not force lower FD limit on
subprocesses
To: Brendan O'Dea , Philipp Stephani
References:
<20161107053031.qoaubm3c5h47tarj@sid.c47.org>
From: Paul Eggert
Organization: UCLA Computer Science Department
Message-ID:
Date: Sun, 6 Nov 2016 22:58:32 -0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <20161107053031.qoaubm3c5h47tarj@sid.c47.org>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 24869-done
Cc: 24869-done@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -2.0 (--)
Brendan O'Dea wrote:
> A potential fix would be to stash the initial limit before changing it, and
> then restore that limit in child_setup().
Thanks, I did that, and am closing the bug.
> My inclination however would just be to revert that entire change: AFAICT it
> merely moves the problem from emacs crashing under some aberrant behaviour, to
> emacs no longer working under that same behaviour due to system calls randomly
> failing with EMFILE.
Crashing is quite bad. I'd rather have Emacs report a reasonable diagnostic
instead. If Emacs is not doing that, we should fix it.
From unknown Fri Aug 15 15:35:02 2025
Received: (at fakecontrol) by fakecontrolmessage;
To: internal_control@debbugs.gnu.org
From: Debbugs Internal Request
Subject: Internal Control
Message-Id: bug archived.
Date: Mon, 05 Dec 2016 12:24:04 +0000
User-Agent: Fakemail v42.6.9
# This is a fake control message.
#
# The action:
# bug archived.
thanks
# This fakemail brought to you by your local debbugs
# administrator