Article View: gnu.emacs.vm.bug
Article #322Re: PLEASE TRY THIS PATCH
From: blueman
Date: Mon, 11 Jan 2010 06:24
Date: Mon, 11 Jan 2010 06:24
71 lines
4786 bytes
4786 bytes
blueman <NOSPAM@nospam.com> writes:
> blueman <NOSPAM@nospam.com> writes:
>
>> Uday S Reddy <uDOTsDOTreddy@cs.bham.ac.uk> writes:
>>> blueman wrote:
>>
>>> I played with some variations of it, and finally realized that the
>>> problem must be the handling of the output. In your test process, the
>>> output is going to the testfile. If I just use 'cat' as the command
>>> instead of 'cat > testfile', then sure enough the problem
>>> reappears. It starts hanging somewhere above 64K.
>>
>> Ahhhh... that's why I was asking for details on exactly what commands
>> you used.
>> That would explain our differences since cat'ing to a file (or running
>> through spamassassin which is another test I did) generates only a
>> handful of bytes of output.
>
> I can now reproduce your problem but it seems to happen *only* on
> Windows. Interestingly, it happens using either bash.exe (Cygwin's
> shell) or the Windows-like shell (cmdproxy.exe). So, seems to be
> something different about how Emacs on Windows deals with processes
>
> Interestingly, when I use edebug to step through the function, it
> doesn't hang as long as no single email is too large. If there is an
> email larger than 64K, it hangs on the command:
> (process-send-region process (nth 0 region) (nth 1 region)))
>
> So, it seems like there is some type of size/timing issue going on
> here. Where a process cannot accept more than 64K either in one batch or
> in batches too closely spaced together in time.
>
> And I can replicate it by running the following block from the
> minibuffer on a buffer >64K in length (doesn't need to be mail) for
> different values of NNN. The precise value where it hangs seems to
> differ for different files but it always seems to be <64K (and it may be
> due to the coding system).
>
> (progn (setq process (start-process "test" "tempbuff" shell-file-name
> shell-command-switch "cat")) (process-send-region process (point-min) NNN))
>
>
> NB.Just for a lark, I tested "cat" (without testfile) on a 50MB folder with
> 2500 emails on Linux -- took about a minute on my 7 year old machine,
> but worked flawlessly.
>
> So, clearly a bug in Emacs and nothing to do with VM or
> vm-pipe-messages-to-command etc. Probably should be reported to the
> Emacs team. Also, doesn't seem to be any way to fix it neatly unles you
> would want to break up writes into smaller chunks (which is not that
> bad in and of itself) and then wait for some arbitray amount of time
> between writes (this seems just downright ugly & unnatural).
>
> BTW are you using ntEmacs or cygwin Emacs?
>
Interestingly, the problem is not simply related to either the size of
the input or the size of the output. (The following is all only true for
Windows):
1. "cat > tempfile"
- Doesn't crash regardless of input size
2. "cat"
- Seems to hang if input region >64K or so (sometimes a few K less,
sometimes a few hundred bytes more)
3. "cat file"
- Doesn't seem to work regardless of size of input region or file
(but works fine on Linux
Technical Details
Message-ID:
<m2aawltazh.fsf@consult.pretender>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!188.40.43.213.MISMATCH!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mailReferences:
<m2d41p7sho.fsf@consult.pretender> <hi2c72$l5i$1@north.jnrs.ja.net> <m2ocl7yvsr.fsf@consult.pretender> <hi4d25$81f$1@north.jnrs.ja.net> <m24omxzybc.fsf@consult.pretender> <hi54kr$euu$1@north.jnrs.ja.net> <m2r5q1ybz4.fsf@consult.pretender> <m2my0pybcx.fsf@consult.pretender> <hi5peg$kmp$1@north.jnrs.ja.net> <m2iqbdxbuj.fsf@consult.pretender> <hi73bg$1cs$1@north.jnrs.ja.net> <m2aawownfr.fsf_-_@consult.pretender> <hi80m7$9sa$1@north.jnrs.ja.net> <m2pr5kuzoi.fsf@consult.pretender> <hi88sr$c2j$1@north.jnrs.ja.net> <m28wc6vncg.fsf@consult.pretender> <hicmei$h4k$1@north.jnrs.ja.net> <m2my0mt133.fsf@consult.pretender> <hid1l2$k9c$1@north.jnrs.ja.net> <m2iqb9tg1d.fsf@consult.pretender> <m2eilxtcb3.fsf@consult.pretender>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!188.40.43.213.MISMATCH!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: blueman <NOSPAM@nospam.com> Newsgroups: gnu.emacs.vm.bug Subject: Re: PLEASE TRY THIS PATCH Date: Mon, 11 Jan 2010 01:24:34 -0500 Organization: A noiseless patient Spider Lines: 71 Message-ID: <m2aawltazh.fsf@consult.pretender> References: <m2d41p7sho.fsf@consult.pretender> <hi2c72$l5i$1@north.jnrs.ja.net> <m2ocl7yvsr.fsf@consult.pretender> <hi4d25$81f$1@north.jnrs.ja.net> <m24omxzybc.fsf@consult.pretender> <hi54kr$euu$1@north.jnrs.ja.net> <m2r5q1ybz4.fsf@consult.pretender> <m2my0pybcx.fsf@consult.pretender> <hi5peg$kmp$1@north.jnrs.ja.net> <m2iqbdxbuj.fsf@consult.pretender> <hi73bg$1cs$1@north.jnrs.ja.net> <m2aawownfr.fsf_-_@consult.pretender> <hi80m7$9sa$1@north.jnrs.ja.net> <m2pr5kuzoi.fsf@consult.pretender> <hi88sr$c2j$1@north.jnrs.ja.net> <m28wc6vncg.fsf@consult.pretender> <hicmei$h4k$1@north.jnrs.ja.net> <m2my0mt133.fsf@consult.pretender> <hid1l2$k9c$1@north.jnrs.ja.net> <m2iqb9tg1d.fsf@consult.pretender> <m2eilxtcb3.fsf@consult.pretender> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Mon, 11 Jan 2010 06:24:35 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="o0xooYC/dlyFpPxuXQpbEw"; logging-data="14674"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+gyETARaqmI6Joz9GP1Av3cBa/8fsKNbo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:/THnWD2jRU9fvD2veC8Cryx9Uag= sha1:kF/pumkWxKZGbL6rZf32sWrTAIk=