GNU bug report logs - #67510
29.1; macOS accept-process-output line length limit of 1024

Previous Next

Package: emacs;

Reported by: Max Arnold <arnold.maxim <at> gmail.com>

Date: Tue, 28 Nov 2023 14:22:01 UTC

Severity: normal

Tags: notabug

Found in version 29.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67510 in the body.
You can then email your comments to 67510 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#67510; Package emacs. (Tue, 28 Nov 2023 14:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Max Arnold <arnold.maxim <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 28 Nov 2023 14:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Max Arnold <arnold.maxim <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.1; macOS accept-process-output line length limit of 1024
Date: Tue, 28 Nov 2023 11:14:09 +0700
[Message part 1 (text/plain, inline)]
blacken-buffer (from
https://github.com/pythonic-emacs/blacken/blob/master/blacken.el) hangs
at accept-process-output C call if a Python code line length exceeds 1024
characters.

A quick reproducer:

mytest.py:

```
assert res ==
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
```

mytest.el:

```
(defun test-blacken ()
  (add-to-list 'load-path "~/.emacs.d/elpa/blacken-20230821.1738")
  (require 'blacken)
  (find-file "/tmp/mytest.py")
  (blacken-buffer)
  )
```

Test command:

/Applications/Emacs.app/Contents/MacOS/Emacs -Q -l mytest.el -f
test-blacken

Emacs build
https://github.com/railwaycat/homebrew-emacsmacport/releases/tag/emacs-29.1-mac-10.0

In GNU Emacs 29.1 (build 1, x86_64-apple-darwin21.6.0, Carbon Version
 165 AppKit 2113.6) of 2023-08-08 built on Mac-1691500888998.local
Repository revision: e173249a143cee72d59ae78c4e11038512f5a00f
Repository branch: 29.1-mac-10.0
Windowing system distributor 'Apple Inc.', version 13.6.1
System Description:  macOS 13.6.1

Configured using:
 'configure --with-mac
 --enable-locallisppath=/usr/local/share/emacs/site-lisp:/opt/homebrew/share/emacs/site-lisp
 --enable-mac-app=/Users/runner/work/homebrew-emacsmacport/homebrew-emacsmacport/build-scripts/build_out/tmproot
 --prefix=/Users/runner/work/homebrew-emacsmacport/homebrew-emacsmacport/build-scripts/build_out/tmproot
 --enable-mac-self-contained --with-modules --with-xwidgets
 --with-tree-sitter --without-lcms2 --without-webp'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE PDUMPER SQLITE3
THREADS TOOLKIT_SCROLL_BARS TREE_SITTER XWIDGETS ZLIB

Important settings:
  value of $LANG: ru_RU.UTF-8
  locale-coding-system: utf-8-unix
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67510; Package emacs. (Tue, 28 Nov 2023 14:52:01 GMT) Full text and rfc822 format available.

Message #8 received at 67510 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Max Arnold <arnold.maxim <at> gmail.com>
Cc: 67510 <at> debbugs.gnu.org
Subject: Re: bug#67510: 29.1;
 macOS accept-process-output line length limit of 1024
Date: Tue, 28 Nov 2023 16:51:11 +0200
> From: Max Arnold <arnold.maxim <at> gmail.com>
> Date: Tue, 28 Nov 2023 11:14:09 +0700
> 
> blacken-buffer (from https://github.com/pythonic-emacs/blacken/blob/master/blacken.el) hangs
> at accept-process-output C call if a Python code line length exceeds 1024 characters.

Did you try binding process-connection-type to nil around the call to
blacken-buffer?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67510; Package emacs. (Tue, 28 Nov 2023 15:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 67510 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Max Arnold <arnold.maxim <at> gmail.com>
Cc: 67510 <at> debbugs.gnu.org
Subject: Re: bug#67510: 29.1;
 macOS accept-process-output line length limit of 1024
Date: Tue, 28 Nov 2023 17:43:37 +0200
> From: Max Arnold <arnold.maxim <at> gmail.com>
> Date: Tue, 28 Nov 2023 22:22:31 +0700
> 
> Added one line to blacken.el and it looks like the problem is fixed:
> 
> ```
> (let ((process (make-process :name "blacken"
>                                  :command `(,blacken-executable ,@(blacken-call-args))
>                                  :buffer output-buffer
>                                  :stderr error-buffer
>                                  :noquery t
>                                  :connection-type 'pipe  ;;  <-- ADDED
>                                  :sentinel (lambda (process event)))))
> ```
> 
> Does it mean that the bug is not related to Emacs and I should file it against blacken? If so, sorry for
> the noise.

If blacken has no reason to use PTYs, and it can produce large volumes
of output from the process, then yes, it should use pipes for
communications with the sub-process.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67510; Package emacs. (Mon, 25 Dec 2023 14:30:02 GMT) Full text and rfc822 format available.

Message #14 received at 67510 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Max Arnold <arnold.maxim <at> gmail.com>
Cc: 67510 <at> debbugs.gnu.org
Subject: Re: bug#67510: 29.1;
 macOS accept-process-output line length limit of 1024
Date: Mon, 25 Dec 2023 06:29:17 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Max Arnold <arnold.maxim <at> gmail.com>
>> Date: Tue, 28 Nov 2023 22:22:31 +0700
>>
>> Added one line to blacken.el and it looks like the problem is fixed:
>>
>> ```
>> (let ((process (make-process :name "blacken"
>>                                  :command `(,blacken-executable ,@(blacken-call-args))
>>                                  :buffer output-buffer
>>                                  :stderr error-buffer
>>                                  :noquery t
>>                                  :connection-type 'pipe  ;;  <-- ADDED
>>                                  :sentinel (lambda (process event)))))
>> ```
>>
>> Does it mean that the bug is not related to Emacs and I should file it against blacken? If so, sorry for
>> the noise.
>
> If blacken has no reason to use PTYs, and it can produce large volumes
> of output from the process, then yes, it should use pipes for
> communications with the sub-process.

So I guess this is a bug in blacken and not in Emacs?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67510; Package emacs. (Mon, 25 Dec 2023 15:09:02 GMT) Full text and rfc822 format available.

Message #17 received at 67510 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 67510 <at> debbugs.gnu.org, arnold.maxim <at> gmail.com
Subject: Re: bug#67510: 29.1;
 macOS accept-process-output line length limit of 1024
Date: Mon, 25 Dec 2023 17:08:34 +0200
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Mon, 25 Dec 2023 06:29:17 -0800
> Cc: 67510 <at> debbugs.gnu.org
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Max Arnold <arnold.maxim <at> gmail.com>
> >> Date: Tue, 28 Nov 2023 22:22:31 +0700
> >>
> >> Added one line to blacken.el and it looks like the problem is fixed:
> >>
> >> ```
> >> (let ((process (make-process :name "blacken"
> >>                                  :command `(,blacken-executable ,@(blacken-call-args))
> >>                                  :buffer output-buffer
> >>                                  :stderr error-buffer
> >>                                  :noquery t
> >>                                  :connection-type 'pipe  ;;  <-- ADDED
> >>                                  :sentinel (lambda (process event)))))
> >> ```
> >>
> >> Does it mean that the bug is not related to Emacs and I should file it against blacken? If so, sorry for
> >> the noise.
> >
> > If blacken has no reason to use PTYs, and it can produce large volumes
> > of output from the process, then yes, it should use pipes for
> > communications with the sub-process.
> 
> So I guess this is a bug in blacken and not in Emacs?

I think so, yes.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67510; Package emacs. (Mon, 25 Dec 2023 18:19:02 GMT) Full text and rfc822 format available.

Message #20 received at 67510 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67510 <at> debbugs.gnu.org, arnold.maxim <at> gmail.com
Subject: Re: bug#67510: 29.1;
 macOS accept-process-output line length limit of 1024
Date: Mon, 25 Dec 2023 10:17:56 -0800
tags 67510 + notabug
close 67510
thanks

Eli Zaretskii <eliz <at> gnu.org> writes:

> I think so, yes.

OK, closing it as notabug.




Added tag(s) notabug. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 25 Dec 2023 18:19:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 67510 <at> debbugs.gnu.org and Max Arnold <arnold.maxim <at> gmail.com> Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 25 Dec 2023 18:19:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Jan 2024 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.