unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5359: 23.1.91; CRITICAL BUG: process-send-region hangs ntEmacs if region >64K
@ 2010-01-11 20:16 Jeffrey J. Kosowsky
  2016-07-06 23:49 ` npostavs
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey J. Kosowsky @ 2010-01-11 20:16 UTC (permalink / raw)
  To: emacs-pretest-bug

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)






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#5359: 23.1.91; CRITICAL BUG: process-send-region hangs ntEmacs if region >64K
  2010-01-11 20:16 bug#5359: 23.1.91; CRITICAL BUG: process-send-region hangs ntEmacs if region >64K Jeffrey J. Kosowsky
@ 2016-07-06 23:49 ` npostavs
  2016-07-07  2:42   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: npostavs @ 2016-07-06 23:49 UTC (permalink / raw)
  To: Jeffrey J. Kosowsky; +Cc: 5359

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#5359: 23.1.91; CRITICAL BUG: process-send-region hangs ntEmacs if region >64K
  2016-07-06 23:49 ` npostavs
@ 2016-07-07  2:42   ` Eli Zaretskii
  2016-08-04  2:08     ` Andrew Hyatt
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2016-07-07  2:42 UTC (permalink / raw)
  To: npostavs; +Cc: ntemacs, 5359

> From: npostavs@users.sourceforge.net
> Date: Wed, 06 Jul 2016 19:49:26 -0400
> Cc: 5359@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#5359: 23.1.91; CRITICAL BUG: process-send-region hangs ntEmacs if region >64K
  2016-07-07  2:42   ` Eli Zaretskii
@ 2016-08-04  2:08     ` Andrew Hyatt
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Hyatt @ 2016-08-04  2:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: ntemacs, 5359, npostavs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: npostavs@users.sourceforge.net
>> Date: Wed, 06 Jul 2016 19:49:26 -0400
>> Cc: 5359@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-04  2:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 20:16 bug#5359: 23.1.91; CRITICAL BUG: process-send-region hangs ntEmacs if region >64K Jeffrey J. Kosowsky
2016-07-06 23:49 ` npostavs
2016-07-07  2:42   ` Eli Zaretskii
2016-08-04  2:08     ` Andrew Hyatt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).