unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jeffrey J. Kosowsky" <ntemacs@kosowsky.org>
To: emacs-pretest-bug@gnu.org
Subject: bug#5359: 23.1.91; CRITICAL BUG: process-send-region hangs ntEmacs if region	>64K
Date: Mon, 11 Jan 2010 15:16:02 -0500	[thread overview]
Message-ID: <19275.34562.710340.610420@consult.pretender> (raw)

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)






             reply	other threads:[~2010-01-11 20:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 20:16 Jeffrey J. Kosowsky [this message]
2016-07-06 23:49 ` bug#5359: 23.1.91; CRITICAL BUG: process-send-region hangs ntEmacs if region >64K npostavs
2016-07-07  2:42   ` Eli Zaretskii
2016-08-04  2:08     ` Andrew Hyatt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19275.34562.710340.610420@consult.pretender \
    --to=ntemacs@kosowsky.org \
    --cc=5359@debbugs.gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).