From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19868: #19868 25.0.50; Compilation eats buffers Date: Sat, 13 Aug 2016 09:44:29 +0300 Message-ID: <83h9apdv76.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1471070734 25584 195.159.176.226 (13 Aug 2016 06:45:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 13 Aug 2016 06:45:34 +0000 (UTC) Cc: rcopley@gmail.com, 19868@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 13 08:45:30 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bYShF-0006S9-2e for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Aug 2016 08:45:29 +0200 Original-Received: from localhost ([::1]:56083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYShF-0007ZW-62 for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Aug 2016 02:45:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYSgr-0007Lv-P1 for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2016 02:45:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYSgo-0005xZ-KM for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2016 02:45:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYSgo-0005xV-HC for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2016 02:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bYSgo-0006ce-Cw for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2016 02:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Aug 2016 06:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19868 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19868-submit@debbugs.gnu.org id=B19868.147107069025416 (code B ref 19868); Sat, 13 Aug 2016 06:45:02 +0000 Original-Received: (at 19868) by debbugs.gnu.org; 13 Aug 2016 06:44:50 +0000 Original-Received: from localhost ([127.0.0.1]:55648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bYSgb-0006bs-QH for submit@debbugs.gnu.org; Sat, 13 Aug 2016 02:44:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bYSgZ-0006bg-NM for 19868@debbugs.gnu.org; Sat, 13 Aug 2016 02:44:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYSgT-0005vp-IN for 19868@debbugs.gnu.org; Sat, 13 Aug 2016 02:44:42 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYSgP-0005vH-OA; Sat, 13 Aug 2016 02:44:37 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4389 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bYSgN-0005qA-9E; Sat, 13 Aug 2016 02:44:35 -0400 In-reply-to: (message from Noam Postavsky on Fri, 12 Aug 2016 16:47:07 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122148 Archived-At: > From: Noam Postavsky > Date: Fri, 12 Aug 2016 16:47:07 -0400 > Cc: Richard Copley > > I reproduced this (the hanging, not the buffer eating) on Windows 10, > Emacs 25.1, MinGW64. Stepping with gdb I found the the hang occurs in > sys_close where it calls _close (fd). This is being called from > deactivate_process: > > for (i = 0; i < PROCESS_OPEN_FDS; i++) > close_process_fd (&p->open_fd[i]); // <-- when i == 2 Does it hang in the _close call itself, or somewhere else? And what is the value of fd? Can you instrument the relevant code with printf's and see this happening without stepping through the code with GDB? Doing the latter might change the timing of the calls, so we might be trying to use file descriptors when the process (cmdproxy) is already dead, and so the other end of the pipe no longer exists. In any case, this is a tricky situation, because we kill the shell, not the program it runs. When the program run from the shell was built with -mwindows, it is detached from the shell, and the various Emacs facilities that try to kill subprocesses are likely to fail in exciting ways. IOW, running -mwindows programs from the likes of "M-x compile" is not really supported on MS-Windows, I think. Of course, if we can figure out how to avoid the hang in this case, we should.