From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#33747: 26.1; process-send-string exceeds max-specpdl-size Date: Fri, 14 Dec 2018 18:49:09 +0100 Message-ID: <87bm5o2e3u.fsf@metalevel.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1544809752 6736 195.159.176.226 (14 Dec 2018 17:49:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2018 17:49:12 +0000 (UTC) To: 33747@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 14 18:49:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXraE-0001e2-VA for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Dec 2018 18:49:07 +0100 Original-Received: from localhost ([::1]:34827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXrcL-00046Y-HK for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Dec 2018 12:51:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXrcA-00045O-J2 for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 12:51:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXrc6-0005rO-Gt for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 12:51:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44253) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXrc6-0005r7-C3 for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 12:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gXrc6-0005Be-8D for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 12:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Dec 2018 17:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154480985519923 (code B ref -1); Fri, 14 Dec 2018 17:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Dec 2018 17:50:55 +0000 Original-Received: from localhost ([127.0.0.1]:48511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXrbz-0005BE-1Q for submit@debbugs.gnu.org; Fri, 14 Dec 2018 12:50:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gXrbx-0005Aw-Ox for submit@debbugs.gnu.org; Fri, 14 Dec 2018 12:50:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXrbr-0005lD-Sk for submit@debbugs.gnu.org; Fri, 14 Dec 2018 12:50:48 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48519) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gXrbr-0005l7-PB for submit@debbugs.gnu.org; Fri, 14 Dec 2018 12:50:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXrbq-0003rx-Nu for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 12:50:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXrbn-0005iy-II for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 12:50:46 -0500 Original-Received: from metalevel.at ([78.46.218.83]:47814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXrbn-0005hm-AP for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2018 12:50:43 -0500 Original-Received: from debian (localhost.localdomain [127.0.0.1]) by metalevel.at (Postfix) with ESMTP id 89014A0227 for ; Fri, 14 Dec 2018 18:50:39 +0100 (CET) Original-Received: by debian (Postfix, from userid 1000) id 8F1ABE3ED4; Fri, 14 Dec 2018 18:49:09 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153454 Archived-At: To reproduce this issue, please install the PostScript viewer Ghostscript ("gs"), and put the following forms in "pipe.el": (setq target (start-process "gs" nil "gs" "-g100x100") source (start-process "bash" nil "bash" "-c" "while true; do echo \ rand 2 31 exp div setgray 0 0 100 100 rectfill; done")) (set-process-filter source 'send-to-target) (defun send-to-target (proc str) (process-send-string target str)) When you then invoke Emacs via: $ emacs -Q pipe.el --eval '(eval-buffer)' you get almost instantly: error in process filter: Variable binding depth exceeds max-specpdl-size The reason for this seems to be that process-send-string also builds up frames for unwind-protect when it waits for input if the queue is full. However, in this concrete case, I would prefer to simply send (or queue) the string and *not* wait for any input within the process filter. Is there a way to accomplish this? Alternatively, would you please consider to provide such a mechanism? For example, when sending output to a process and the output queue of that process is full, would it be admissible or even preferable to wait only for input of that specific process, instead of also waiting for and handling input from other processes (as seems to be the case now)? Thank you and all the best! Markus In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2018-11-18 built on debian Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea Windowing system distributor 'The X.Org Foundation', version 11.0.11902000 System Description: Debian GNU/Linux 9.6 (stretch)