From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#48118: 27.1; 28; Only first process receives output with multiple running processes Date: Fri, 30 Apr 2021 15:44:17 +0200 Message-ID: <64c194f9-b984-adaa-d5fd-86aa3ed3833a@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23922"; mail-complaints-to="usenet@ciao.gmane.io" To: 48118@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 30 15:47:33 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 1lcTUT-00066v-0Z for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Apr 2021 15:47:33 +0200 Original-Received: from localhost ([::1]:58306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcTUR-0002dO-VJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Apr 2021 09:47:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcTS2-0000Wa-Fs for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2021 09:45:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcTS2-000595-7R for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2021 09:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lcTS2-00018w-5h for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2021 09:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Apr 2021 13:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48118 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16197902694321 (code B ref -1); Fri, 30 Apr 2021 13:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Apr 2021 13:44:29 +0000 Original-Received: from localhost ([127.0.0.1]:57946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcTRV-00017d-3D for submit@debbugs.gnu.org; Fri, 30 Apr 2021 09:44:29 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcTRT-00017W-MV for submit@debbugs.gnu.org; Fri, 30 Apr 2021 09:44:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcTRS-0007zY-Cu for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2021 09:44:27 -0400 Original-Received: from server.qxqx.de ([2a01:4f8:121:346::180]:39089 helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcTRO-0004gw-Dj for bug-gnu-emacs@gnu.org; Fri, 30 Apr 2021 09:44:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date: Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=R7d1fHyr7lOtHjV0iDEA1AceXEz+str+c4Ia5aNhYtM=; b=ITmDZfGvaEQUyMEnSFMMFHAKZ0 dfNZ7mP/Y/0cZjjlbjuAbISbDKOZK6CDH4bsR0q7/HI8zCare4RshPqYJVNe+Tfz7YBw76Jr/DZM4 V6EbhekCfJPeyTwXdJMmnkNQlKIu5jsPphCsiADh4AGD3xXOxiwHR1X0i7YVNIr+vmr4=; Content-Language: en-US Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:205243 Archived-At: When running multiple asynchronous processes only the output of the first process is handled. This happens when the first process continously produces a huge amount of output, for example when running `ripgrep` as done by my `consult-ripgrep` command (part of my Consult package). Then Emacs is stuck handling the output of the first process. The output of the second process is not read until the first process is terminated. I expect Emacs to treat the running processes fairly. The issue also occurs if a :filter function is specified. Both Emacs 27 and 28 are affected. Minimal reproducible example by @jakanakaevangeli: (progn (setq pa (make-process :name "yes-a" :command '("yes") :connection-type 'pipe :buffer (setq a (generate-new-buffer " *a*")))) (setq pb (make-process :name "yes-b" :command '("yes") :connection-type 'pipe :buffer (setq b (generate-new-buffer " *b*")))) (run-at-time 1 1 (lambda () (message "size a: %s\nsize b: %s" (buffer-size a) (buffer-size b))))) Original bug discussions: https://github.com/minad/consult/issues/272 https://github.com/minad/consult/pull/297