Subject: Re: bug#22344: 25.0.50 (and 24.5.1, 24.4); Sending 4097 bytes to a subprocess hangs Emacs on Windows 8 and 10

From: Clément Pit--Claudel <[email-masked]>
Date: Wed, 13 Jan 2016 19:48:38 -0500

On 01/12/2016 11:44 AM, Eli Zaretskii wrote:
>> Cc: [email-masked]
>> From: Clément Pit--Claudel <[email-masked]>
>> Date: Mon, 11 Jan 2016 14:41:20 -0500
>>
>>> Could it be that the script exits as soon as it processed the first 4K
>>> chunk, without waiting for the next one, or without waiting long
>>> enough?
>>
>> I'm not sure if I understand correctly. In the working case (sending small batches) the underlying script does receive everything Emacs sends. In fact, the blackhole example shown above never exits; it keeps reading on stdin and echoing on stdout.
>>
>> With a more complex setup, Emacs hangs when we send the whole buffer, but when sending it in small chunks the underlying process returns the expected results.
> 
> I tried to solve this in commit 58a622d on the emacs-25 branch.
> Please try the latest and see if your problem is solved by those
> changes.

Eli, there's something magical about your debugging abilities.
I downloaded and compiled the latest master on Windows 8; I could reproduce the bug there. Then I checked out emacs-25 and recompiled, and the bug seems to be gone! Amazing.

This is only for my personal curiosity, but would you mind expanding a bit on what the issue was (and how you found out)? I read the commit message and looked at the diff, but I don't think I understood everything from there. Did you have to look at node.js' source code? Would it be helpful for me to file a bug with node.js?

Clément.