From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: process_send_string blocks? Date: Sat, 06 Sep 2014 08:11:13 -0500 Message-ID: <85ppf8evwu.fsf@stephe-leake.org> References: <85y4txdvbh.fsf@stephe-leake.org> <83r3zpcctv.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410009116 3073 80.91.229.3 (6 Sep 2014 13:11:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Sep 2014 13:11:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 06 15:11:49 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XQFmO-0004LN-B3 for ged-emacs-devel@m.gmane.org; Sat, 06 Sep 2014 15:11:48 +0200 Original-Received: from localhost ([::1]:34701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQFmN-0001MN-Q3 for ged-emacs-devel@m.gmane.org; Sat, 06 Sep 2014 09:11:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQFm7-0001M2-7a for emacs-devel@gnu.org; Sat, 06 Sep 2014 09:11:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQFm1-0005zj-O7 for emacs-devel@gnu.org; Sat, 06 Sep 2014 09:11:31 -0400 Original-Received: from dnvrco-outbound-snat.email.rr.com ([107.14.73.226]:16111 helo=dnvrco-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQFm1-0005yv-It for emacs-devel@gnu.org; Sat, 06 Sep 2014 09:11:25 -0400 Original-Received: from [70.94.38.149] ([70.94.38.149:49473] helo=TAKVER) by dnvrco-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id BE/53-18326-CF70B045; Sat, 06 Sep 2014 13:11:24 +0000 In-Reply-To: <83r3zpcctv.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 Sep 2014 12:34:04 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) X-RR-Connecting-IP: 107.14.64.118:25 X-Authority-Analysis: v=2.1 cv=btPCBSqi c=1 sm=1 tr=0 a=AppmJ/7ZOOFWL/q6u6u93g==:117 a=AppmJ/7ZOOFWL/q6u6u93g==:17 a=ayC55rCoAAAA:8 a=9XSUBuVRJI8A:10 a=s72kT6VaQ4sA:10 a=fvGhXoG7zBsA:10 a=o_R75loqY_IA:10 a=9i_RQKNPAAAA:8 a=mDV3o1hIAAAA:8 a=ewoZQZLL2uYYQdbF-8QA:9 a=ii61gXl28gQA:10 a=FMD1XRJ_Ct4A:10 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: BaiduSpider X-Received-From: 107.14.73.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174059 Archived-At: Eli Zaretskii writes: >> From: Stephen Leake >> >> It appears that process-send-string is blocked on a full IO send queue, >> while the background process is also blocked on a full IO send queue. > > Please tell the details of how did you determine this. mostly a guess, combined with "there's nothting else wrong". >> On reading process.c, I believe this should not happen, if the OS supports >> EWOULDBLOCK. >> >> Is that true, even when there is only one call to process-send-string that >> sends the entire buffer? > > Not sure what are you asking here, since you say you've read the code > and saw the handling of EWOULDBLOCK. Because it is often easy to misunderstand code that I am reading for the first time. For example, I completely missed the threading stuff you talk about below. >> I'm running on Windows 7, using the Windows binary >> emacs-23.4-bin-i386.zip from the FSF FTP site. >> >> Is EWOULDBLOCK supported on this system? > > Not on writes to pipes, AFAIK. Ah, then that's the problem. Hmm, except below you seem to be saying maybe it's not? >> I'll try compiling Emacs from source so I can run the debugger; I've >> never tried that on Windows before. > > Please do that with the latest pretest, as 24.3 is by now ancient > history. Ok. > thanks for the code info; that will help when I get the debugger running. > The first thing I'd do is attach GDB to the hung Emacs and see where > each one of these 2 threads is parked. (Note that there are more > threads in a running Emacs than just these 2.) I'll give that a try. > Finally, it is better to continue all this on the bug tracker, perhaps > as part of bug #18396, or a new bug report, if you don't want to mix > up these 2. It's not clear whether this is the same bug; I'll file a new one. I have a reliable reproducer, which I can easily simplify. -- -- Stephe