GNU bug report logs - #5359
23.1.91; CRITICAL BUG: process-send-region hangs ntEmacs if region >64K

Previous Next

Package: emacs;

Reported by: "Jeffrey J. Kosowsky" <ntemacs <at> kosowsky.org>

Date: Mon, 11 Jan 2010 20:20:03 UTC

Severity: normal

Tags: unreproducible

Done: Andrew Hyatt <ahyatt <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 5359 in the body.
You can then email your comments to 5359 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5359; Package emacs. (Mon, 11 Jan 2010 20:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Jeffrey J. Kosowsky" <ntemacs <at> kosowsky.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 11 Jan 2010 20:20:03 GMT) Full text and rfc822 format available.

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

From: "Jeffrey J. Kosowsky" <ntemacs <at> kosowsky.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.91;
	CRITICAL BUG: process-send-region hangs ntEmacs if region	>64K
Date: Mon, 11 Jan 2010 15:16:02 -0500
When using process-send-region-process to send a region more than
 about 64K in size to the command 'cat', emacs hangs forever and is
 *only* recoverable by going out of emacs to kill the 'cat' process. 

The following simple code snippet reproduces the problem where NNNN is
 bigger than about 64K. Just run it on a region containing sufficient
 text...

 (progn (setq process (start-process "test" "tempbuff" "cat"))
 (process-send-region process (point-min) NNNNN))

Note the problem *does* not occur with synchronous use of 'cat' via
call-process-region nor does it occur if you 'cat' the region onto a
file (e.g. using "> tempfile" as part of the &rest args). Also, this
problem does not occur on Linux.

The exact cutoff for when it fails is always within a few thousand
bytes of 64K but varies by file (and may be related to things like
encoding).

The problem also occurs if NNNN is smaller than 64K but you send
multiple separate regions of size >64K in rapid succession.

This seems to be some type of buffering issue.

Also, the bug is not *theoretical* in that it breaks functionality in
the vm.el (viewmail) program.

I am using: GNU Emacs 23.1.91.1 (i386-mingw-nt5.1.2600)
But had the same bug on GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of
2009-09-23 on YAMALOK and also on ntEmacs 22. Again Linux works just fine.

This bug may or may not be related to the following code snippet found
in the standard tramp.el package:
      ;; Under Windows XP, accept-process-output doesn't return
      ;; sometimes.  So we add an additional timeout.
      (with-timeout ((or timeout 1))
	(accept-process-output proc timeout timeout-msecs)))

-------------------------------------------------------------------------------
In GNU Emacs 23.1.91.1 (i386-mingw-nt5.1.2600)
 of 2010-01-02 on PRETEST
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> C-x C-f e m <tab> . <tab> <return> y <escape> 
x g l o b a l - s e <tab> <return> <escape> <escape> 
<return> e v a l - e x p <tab> <return> <escape> <escape> 
<return> C-y C-a C-k <help-echo> <down-mouse-1> <mouse-1> 
C-y <help-echo> <down-mouse-1> <mouse-1> C-y 6 0 0 
0 0 ) ) <return> C-n C-n C-n C-n C-n C-n <escape> <escape> 
<return> C-y C-a C-k <help-echo> <down-mouse-1> <mouse-1> 
C-y C-a C-k <help-echo> <down-mouse-1> <mouse-1> C-y 
C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b 
C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b 
C-b C-b C-b C-b C-b <backspace> <backspace> C-e C-b 
C-b <backspace> <backspace> <backspace> <backspace> 
<backspace> 7 0 0 0 0 C-a C-k C-y <return> <down-mouse-1> 
<mouse-1> <help-echo> <help-echo> <help-echo> <down-mouse-1> 
<mouse-1> <escape> x <down-mouse-1> <mouse-1> r e p 
o <tab> r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
File emacs.exe is large (31MB), really open? (y or n) 
nil
Entering debugger...
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message smtpmail sendmail regexp-opt ecomplete
rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug help-mode
easymenu view debug tooltip ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process multi-tty
emacs)




bug reassigned from package 'emacs' to 'emacs,w32'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 12 Jan 2010 18:33:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5359; Package emacs. (Wed, 06 Jul 2016 23:50:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: "Jeffrey J. Kosowsky" <ntemacs <at> kosowsky.org>
Cc: 5359 <at> debbugs.gnu.org
Subject: Re: bug#5359: 23.1.91;
 CRITICAL BUG: process-send-region hangs ntEmacs if region	>64K
Date: Wed, 06 Jul 2016 19:49:26 -0400
tags 5359 unreproducible
quit

I tried from emacs -Q

(dotimes (i (/ (* 65 1024) 80))
  (insert (make-string 80 ?x) ?\n))

;; I have cat.exe in PATH due to running from MSYS.
(progn (setq process (start-process "test" "tempbuff" "cat"))
       (process-send-region process (point-min) (point-max)))

Didn't hang.  Maybe it's fixed?

GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570
GNU Emacs 25.0.95.4 (x86_64-w64-mingw32) of 2016-06-29




Added tag(s) unreproducible. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 06 Jul 2016 23:50:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5359; Package emacs. (Thu, 07 Jul 2016 02:43:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: npostavs <at> users.sourceforge.net
Cc: ntemacs <at> kosowsky.org, 5359 <at> debbugs.gnu.org
Subject: Re: bug#5359: 23.1.91;
 CRITICAL BUG: process-send-region hangs ntEmacs if region	>64K
Date: Thu, 07 Jul 2016 05:42:28 +0300
> From: npostavs <at> users.sourceforge.net
> Date: Wed, 06 Jul 2016 19:49:26 -0400
> Cc: 5359 <at> debbugs.gnu.org
> 
> I tried from emacs -Q
> 
> (dotimes (i (/ (* 65 1024) 80))
>   (insert (make-string 80 ?x) ?\n))
> 
> ;; I have cat.exe in PATH due to running from MSYS.
> (progn (setq process (start-process "test" "tempbuff" "cat"))
>        (process-send-region process (point-min) (point-max)))
> 
> Didn't hang.  Maybe it's fixed?

Most probably.  This area saw quite some improvement in Emacs 24.5.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5359; Package emacs. (Thu, 04 Aug 2016 02:09:01 GMT) Full text and rfc822 format available.

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

From: Andrew Hyatt <ahyatt <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: ntemacs <at> kosowsky.org, 5359 <at> debbugs.gnu.org, npostavs <at> users.sourceforge.net
Subject: Re: bug#5359: 23.1.91;
 CRITICAL BUG: process-send-region hangs ntEmacs if region	>64K
Date: Wed, 03 Aug 2016 22:08:45 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: npostavs <at> users.sourceforge.net
>> Date: Wed, 06 Jul 2016 19:49:26 -0400
>> Cc: 5359 <at> debbugs.gnu.org
>> 
>> I tried from emacs -Q
>> 
>> (dotimes (i (/ (* 65 1024) 80))
>>   (insert (make-string 80 ?x) ?\n))
>> 
>> ;; I have cat.exe in PATH due to running from MSYS.
>> (progn (setq process (start-process "test" "tempbuff" "cat"))
>>        (process-send-region process (point-min) (point-max)))
>> 
>> Didn't hang.  Maybe it's fixed?
>
> Most probably.  This area saw quite some improvement in Emacs 24.5.

Also didn't hang for me.  Due to no one being able to reproduce this in
almost a month, I'll close this out as unreproducible.




bug closed, send any further explanations to 5359 <at> debbugs.gnu.org and "Jeffrey J. Kosowsky" <ntemacs <at> kosowsky.org> Request was from Andrew Hyatt <ahyatt <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 04 Aug 2016 02:10: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. (Thu, 01 Sep 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 294 days ago.

Previous Next


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