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.bugs Subject: bug#51110: Native-comp leaks fds open on /dev/ptmx Date: Sat, 09 Oct 2021 20:15:26 +0300 Message-ID: <83k0imw24x.fsf@gnu.org> References: <1222487.1633798903@pental> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26575"; mail-complaints-to="usenet@ciao.gmane.io" Cc: akrl@sdf.org, 51110@debbugs.gnu.org To: Stephen Gildea Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 09 19:16:11 2021 Return-path: Envelope-to: geb-bug-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 1mZFxC-0006js-P3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Oct 2021 19:16:10 +0200 Original-Received: from localhost ([::1]:51750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZFxB-0006yC-Dz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Oct 2021 13:16:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZFx4-0006y2-EG for bug-gnu-emacs@gnu.org; Sat, 09 Oct 2021 13:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42551) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZFx4-0008Ly-1f for bug-gnu-emacs@gnu.org; Sat, 09 Oct 2021 13:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZFx3-0005Ey-Rq for bug-gnu-emacs@gnu.org; Sat, 09 Oct 2021 13:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Oct 2021 17:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51110 X-GNU-PR-Package: emacs Original-Received: via spool by 51110-submit@debbugs.gnu.org id=B51110.163379975520130 (code B ref 51110); Sat, 09 Oct 2021 17:16:01 +0000 Original-Received: (at 51110) by debbugs.gnu.org; 9 Oct 2021 17:15:55 +0000 Original-Received: from localhost ([127.0.0.1]:54097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZFwx-0005Ec-Kx for submit@debbugs.gnu.org; Sat, 09 Oct 2021 13:15:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZFww-0005EQ-J7 for 51110@debbugs.gnu.org; Sat, 09 Oct 2021 13:15:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59826) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZFwn-0008HF-Ec; Sat, 09 Oct 2021 13:15:46 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2763 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 1mZFwl-0004se-Eb; Sat, 09 Oct 2021 13:15:45 -0400 In-Reply-To: <1222487.1633798903@pental> (message from Stephen Gildea on Sat, 09 Oct 2021 10:01:43 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216783 Archived-At: > From: Stephen Gildea > cc: Andrea Corallo , 51110@debbugs.gnu.org > Date: Sat, 09 Oct 2021 10:01:43 -0700 > > Apparently what's happening is that Emacs forks off a child Emacs to do > the compile and allocates a pty to the child. These ptys are not > closed until the compile completes. It seems Emacs needs to better > manage the number of simultaneous open ptys. Or at least be able to > wait and retry if an open fails. Emacs limits the number of these background processes, see native-comp-async-jobs-number. (The value zero means use half of the number of execution units available in the system's processor.) So we generally shouldn't have more than that number of open pipes at any given time. For the obvious reasons they cannot be closed until the sub-process exits.