From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tom Gillespie Newsgroups: gmane.emacs.bugs Subject: bug#56002: src/process.c; make-process fails to clean up stderr process on early exit Date: Wed, 15 Jun 2022 23:11:50 -0700 Message-ID: References: <83pmj9qjgk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2027"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56002@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 16 08:13:16 2022 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 1o1ikl-0000OC-GF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Jun 2022 08:13:15 +0200 Original-Received: from localhost ([::1]:50906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1iki-00064c-QM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Jun 2022 02:13:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1ikY-00064F-UH for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2022 02:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46585) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1ikY-0008Mu-LB for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2022 02:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1ikY-0003Mg-DR for bug-gnu-emacs@gnu.org; Thu, 16 Jun 2022 02:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tom Gillespie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jun 2022 06:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56002 X-GNU-PR-Package: emacs Original-Received: via spool by 56002-submit@debbugs.gnu.org id=B56002.165535993012870 (code B ref 56002); Thu, 16 Jun 2022 06:13:02 +0000 Original-Received: (at 56002) by debbugs.gnu.org; 16 Jun 2022 06:12:10 +0000 Original-Received: from localhost ([127.0.0.1]:40482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1iji-0003LW-Jr for submit@debbugs.gnu.org; Thu, 16 Jun 2022 02:12:10 -0400 Original-Received: from mail-yw1-f172.google.com ([209.85.128.172]:42722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1ije-0003L1-TK for 56002@debbugs.gnu.org; Thu, 16 Jun 2022 02:12:09 -0400 Original-Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-2ef5380669cso4186837b3.9 for <56002@debbugs.gnu.org>; Wed, 15 Jun 2022 23:12:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GQIApe45Wocb7A6zQbPNlVOw3tDq2/Y1cR2BbbqBIzk=; b=LgDS++ZDuDL7eBr6mWZU07Z6KuY/CysPvePhstJ1MIFESSRW/9XDgnkH4mReNl91Fu YWTt+U2xhwRHYVWPILjO3WjIQ18IfmzLvFfCIQN0Ht1D5RM4RnwXkm30fmZAr471Vu/0 ZtJzYyYicNf63YyPi/dzo7KzOUbGVowfxmEtPxkokNihKxzrsYTIwkrQnnAYOe2OUOS8 cMaAd/OUo8/78veH/nq3Eu5dF/6QzWAS32AmphwoB2IG/tfim+QKBluLPrpDAzr3qYBt 8zdjofsBXjzFUwKrzyWRWXcSYyaa4zMDO8irdcBJOnwpKd9k1XZLGdmOYywzI0jyNtsB qTng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GQIApe45Wocb7A6zQbPNlVOw3tDq2/Y1cR2BbbqBIzk=; b=PBvyBafgTHvaUKTmuTmRuc+vhPW1q8UiYypmK17bqN+17lo+6raXyvLtBcTPWa7Oe3 UT1VRtTl1GKtWmWMbv1UvlPpcN4ZWRnm6QDDIwIrROh1iZ3KA6z7KGi9nsqaXb3lsYFi IlR5o6JyLj7PIsynvOzD7s3EOW2AfpiTsdXj6DbpR0lggB2/wTE5QsauXgroEJiBlmev yvpfeizwvzMJtZw7+Mzatg87oEZMAzp18cS7tEED1UYrcpCedLwnihPj3w1vXrkfvsG1 fxJ2j3P6PmUh24nEVshgEonltzZGDcFNaL91wcxdEOJJzPZkHN6x4gpN4pw++jC5r/Ug B4/g== X-Gm-Message-State: AJIora851jgrvnZC2k5SVye9Hcmr7VstnEKTDhkMJyTDDbxI8EXGPcgD VhfRi0uQT/RrH306owOeJk1s3JEueAX38qqUoluuDPlGyvQ= X-Google-Smtp-Source: AGRyM1uOwWni4kzS0ln4/0q0Covj/U8+8qxfUztHfbiC8UnY/aePe75Lo/RHDcP7wzqx+ciBsjHv9V/T2SYVrwbMvTg= X-Received: by 2002:a81:ed4:0:b0:2f1:c8db:ce23 with SMTP id 203-20020a810ed4000000b002f1c8dbce23mr3754919ywo.95.1655359921262; Wed, 15 Jun 2022 23:12:01 -0700 (PDT) In-Reply-To: <83pmj9qjgk.fsf@gnu.org> 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:234620 Archived-At: > Can you elaborate on what do you mean by "clean up the stderr > process"? Do you see the code which does that in the "normal" cases? I'm not entirely sure as I am unfamiliar with the life cycle for processes in the runtime. I think that the "normal" cleanup happens when the parent process exits with a return code. The stderr process is a pipe process so I assume that under normal circumstances the pipe process would receive a signal from the primary process via the os and exit allowing calls to accept-process-output to complete and then presumably the gc would take care of the rest? I have no idea if this is remotely accurate. It does look like remote_process is called during other failures though. > Sounds like we lack some unwind-protect call somewhere? It does look like there are a number of calls to record_unwind_protect (remove_process, proc); in the code. Maybe there is a missing record_unwind_protect (remove_process, stderrproc); in make-process?