Subject: Re: bug#12587: 24.2; Delayed startup, unresponsive Emacs in MS Windows when netlogon services is running in a domain

From: Eli Zaretskii <[email-masked]>
Date: Mon, 08 Oct 2012 11:15:07 +0200

> Date: Mon, 08 Oct 2012 10:49:48 +0200
> From: Mohammed Imaduddin Humayun <[email-masked]>
> CC: Eli Zaretskii <[email-masked]>
> 
> - Post startup, if w32-get-true-file-attributes is:
>          (a) nil:  file operations are responsive albeit 3-4x slower 
> than when netlogon is not running i.e. not instantaneous.
>          (b) default: extremely sluggish response. File operations 
> (opening of files, filename autocomplete or dired etc.) each take 2-3 
> minutes or more.

Is this with the latest development snapshot?  If not, please try with
that, a lot has changed in that area lately.

Also, what happens when w32-get-true-file-attributes is set to t?  Is
the behavior closer to the default value or to nil?

> >      http://alpha.gnu.org/gnu/emacs/windows/
> >
> > First, please see if the same slow startup happens with the latest
> > snapshot.  If it does, I will give you instructions on what to do to
> > investigate.
> >
> > Thanks
> Yes, the same problem occurs with the latest alpha build 
> 'emacs-20120917-r110062'.

OK.  If you don't already have GDB for Windows, please install it
from here:

  http://sourceforge.net/projects/mingw/files/MinGW/Extension/gdb/GDB-7.5/

(If you are not an experienced MinGW user, you might be better off
installing GDB with mingw-get utility, which is mentioned on the above
page, because mingw-get will automatically install any dependencies
needed by GDB.)

Once GDB is installed, please follow these steps:

  . Invoke Emacs

  . Use the Task Manager or some equivalent to find out the process ID
    of emacs.exe (not of runemacs.exe!), which is a number.  Since you
    say the startup takes minutes, it shouldn't be a problem to do
    this and the next step while Emacs is still stuck in whatever it's
    doing at this stage.

  . Type from the cmd prompt "gdb -p PID" where PID is the process ID
    of emacs.exe, and hit Enter.  GDB will attach to the running
    Emacs, stop it wherever it is, and show its prompt "(gdb)".

  . Type at GDB's prompt "thread apply all backtrace", and post here
    everything that GDB reports in response.

  . If you can, try these steps both before and after the welcome
    screen comes up, because it's possible that there's more than one
    place that is holding the startup.

Thanks.