From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#1819: I can reproduce this on that pre-release Emacs 24 build on WIndows Server 2003 100% Date: Sun, 09 Oct 2011 09:01:21 -0400 Message-ID: References: <10537.80.58.205.50.1231358163.squirrel@correo.ozu.es> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1318165327 3894 80.91.229.12 (9 Oct 2011 13:02:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 9 Oct 2011 13:02:07 +0000 (UTC) Cc: 1819@debbugs.gnu.org To: darkdescendant@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 09 15:02:02 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RCt10-0003hh-DK for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Oct 2011 15:02:02 +0200 Original-Received: from localhost ([::1]:55204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCt0z-0006Ar-T2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Oct 2011 09:02:01 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCt0x-0006Ai-1p for bug-gnu-emacs@gnu.org; Sun, 09 Oct 2011 09:02:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCt0v-0008Lv-FQ for bug-gnu-emacs@gnu.org; Sun, 09 Oct 2011 09:01:59 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCt0v-0008Lr-CX for bug-gnu-emacs@gnu.org; Sun, 09 Oct 2011 09:01:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RCt10-0007kg-HB for bug-gnu-emacs@gnu.org; Sun, 09 Oct 2011 09:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Oct 2011 13:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1819 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: Original-Received: via spool by 1819-submit@debbugs.gnu.org id=B1819.131816529129758 (code B ref 1819); Sun, 09 Oct 2011 13:02:02 +0000 Original-Received: (at 1819) by debbugs.gnu.org; 9 Oct 2011 13:01:31 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RCt0U-0007ju-Hs for submit@debbugs.gnu.org; Sun, 09 Oct 2011 09:01:30 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RCt0R-0007jn-I3 for 1819@debbugs.gnu.org; Sun, 09 Oct 2011 09:01:28 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RCt0L-0005qA-N8; Sun, 09 Oct 2011 09:01:21 -0400 In-reply-to: (darkdescendant@gmail.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 09 Oct 2011 09:02:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52451 Archived-At: > Date: Sun, 09 Oct 2011 03:35:54 +0000 > From: darkdescendant@gmail.com > > I haven't tried the 4 CR trick outlined in the original posting but this is > an issue that I have to deal with all the time. It stops me from doing all > my work in Emacs. Does it help to invoke GUI programs via "start", like this: d:\foo> start notepad > This also reproduces on the latest released patched EmacsW32 distribution > running Emacs 23.2/ I can see it in the current development version as well. I played with this, and here are my observations. Hopefully, someone who knows more than I do about the startup process of a GUI application could make some sense out of it. . The behavior is not entirely repeatable. Sometimes I need 3 RETs, sometimes 4, and sometimes just 1. . It looks like the program that is invoked is in some limbo state inside early stages of its startup code, until you hit enough RETs. Process Explorer shows no threads for such a program. PsList does show one thread, but it is waiting for something. Here's an example with notepad: Tid Pri Cswtch State User Time Kernel Time Elapsed Time 2872 8 14 Wait:Executive 0:00:00.000 0:00:00.000 0:00:05.354 . Each time I hit RET, notepad seems to do a few more things in its startup. Process Explorer shows more and more handles being open. I show below the list of handles after each RET. Note that the desktop (WinSta0) is only opened after one RET. Another noteworthy fact is that when started from shell-mode, GUI applications have 3 pipes open -- those are the 3 standard handles they inherited from Emacs via cmd.exe. . I also tried with runemacs.exe, and I see the same pattern: it takes several RETs for it to make through its works, at which point it spawns emacs.exe and exits. . Invoking GUI programs through the "start" command works as expected: the program opens its window immediately. Here's the list of handles open by notepad just after the invocation: Type Name Directory \Windows Directory \KnownDlls File \Device\NamedPipe\Win32Pipes.000002e4.00000002 File \Device\NamedPipe\Win32Pipes.000002e4.00000001 File \Device\NamedPipe\Win32Pipes.000002e4.00000001 File D:\usr\eli\bzr File C:\WINDOWS\AppPatch\sysmain.sdb File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03 KeyedEvent \KernelObjects\CritSecOutOfMemoryEvent Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Thread emacs.exe(740): 2096 This is after one RET: Type Name Directory \BaseNamedObjects Directory \Windows Directory \KnownDlls File \Device\NamedPipe\Win32Pipes.000002e4.00000002 File \Device\NamedPipe\Win32Pipes.000002e4.00000001 File \Device\NamedPipe\Win32Pipes.000002e4.00000001 File D:\usr\eli\bzr File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03 Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows Key HKLM KeyedEvent \KernelObjects\CritSecOutOfMemoryEvent Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Thread emacs.exe(740): 2096 WindowStation \Windows\WindowStations\WinSta0 WindowStation \Windows\WindowStations\WinSta0 After 2 RETs: Type Name Directory \BaseNamedObjects Directory \Windows Directory \KnownDlls Event \BaseNamedObjects\userenv: User Profile setup event File \Device\NamedPipe\Win32Pipes.000002e4.00000002 File \Device\NamedPipe\Win32Pipes.000002e4.00000001 File \Device\NamedPipe\Win32Pipes.000002e4.00000001 File \Device\KsecDD File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03 File D:\usr\eli\bzr File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03 Key HKCU Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32 Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32 Key HKLM KeyedEvent \KernelObjects\CritSecOutOfMemoryEvent Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Semaphore \BaseNamedObjects\shell.{A48F1A32-A340-11D1-BC6B-00A0C90312E1} Thread emacs.exe(740): 2096 WindowStation \Windows\WindowStations\WinSta0 WindowStation \Windows\WindowStations\WinSta0 After 3 RETs: Type Name Directory \BaseNamedObjects Directory \Windows Directory \KnownDlls Event \BaseNamedObjects\userenv: User Profile setup event File \Device\NamedPipe\Win32Pipes.000002e4.00000002 File \Device\NamedPipe\Win32Pipes.000002e4.00000001 File \Device\NamedPipe\Win32Pipes.000002e4.00000001 File \Device\KsecDD File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03 File D:\usr\eli\bzr File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03 Key HKLM\SYSTEM\ControlSet001\Control\Nls\Language Groups Key HKLM\SYSTEM\ControlSet001\Control\Nls\Locale\Alternate Sorts Key HKLM\SYSTEM\ControlSet001\Control\Nls\Locale Key HKCU Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32 Key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32 Key HKLM KeyedEvent \KernelObjects\CritSecOutOfMemoryEvent Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\ShimCacheMutex Mutant \BaseNamedObjects\CTF.TimListCache.FMPDefaultS-1-5-21-135337107-1212574998-751859383-11823MUTEX.DefaultS-1-5-21-135337107-1212574998-751859383-11823 Mutant \BaseNamedObjects\CTF.TMD.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823 Mutant \BaseNamedObjects\CTF.Layouts.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823 Mutant \BaseNamedObjects\CTF.Asm.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823 Mutant \BaseNamedObjects\CTF.Compart.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823 Mutant \BaseNamedObjects\CTF.LBES.MutexDefaultS-1-5-21-135337107-1212574998-751859383-11823 Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Mutant \BaseNamedObjects\DBWinMutex Section \BaseNamedObjects\ShimSharedMemory Section \BaseNamedObjects\CTF.TimListCache.FMPDefaultS-1-5-21-135337107-1212574998-751859383-11823SFM.DefaultS-1-5-21-135337107-1212574998-751859383-11823 Section \BaseNamedObjects\CiceroSharedMemDefaultS-1-5-21-135337107-1212574998-751859383-11823 Semaphore \BaseNamedObjects\shell.{A48F1A32-A340-11D1-BC6B-00A0C90312E1} Thread emacs.exe(740): 2096 WindowStation \Windows\WindowStations\WinSta0 WindowStation \Windows\WindowStations\WinSta0