unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Kyle M. Lee" <mail2kyle@gmail.com>
Cc: emacs-pretest-bug@gnu.org
Subject: Re: 23.0.60; emacs hangs on WinXP with --disable-font-backend, and backtrace
Date: Fri, 09 May 2008 10:22:11 +0300	[thread overview]
Message-ID: <uk5i4lz6k.fsf@gnu.org> (raw)
In-Reply-To: <4823A345.8090601@gmail.com>

> Date: Fri, 09 May 2008 09:05:09 +0800
> From: "Kyle M. Lee" <mail2kyle@gmail.com>
> CC: emacs-pretest-bug@gnu.org
> 
> (gdb) r --disable-font-backend
> Starting program: e:\emacs_gcc_std_install\bin\emacs.exe --disable-font-backend
> [New thread 3376.0x30c]
> [New thread 3376.0x388]
> [New thread 3376.0xd80]
> [New thread 3376.0xa10]
> [Switching to thread 3376.0xa10]
> Quit (expect signal SIGINT when the program is resumed)
> (gdb) bt

There's a strange anomaly here: when I do the same, I only see 3
threads, not 4.  And 3 is what I'd expect: there are 2 threads in a
normally running Emacs (on Windows): one thread that reads input, the
other that runs the normal Emacs code.  The third thread is created by
Windows when you type C-c into the GDB window, because that's how
Windows handles SIGINT.

Please tell me when did you see the third thread, announced by this
line in GDB output:

> [New thread 3376.0xd80]

Was it when you typed C-c, or before?

Also, are you running GDB from a Command Prompt window, or in some
other manner?

> #0  0x7c810659 in KERNEL32!CreateThread ()
>    from C:\WINDOWS\system32\kernel32.dll
> Cannot access memory at address 0x3
> (gdb) xbacktrace
> (gdb) backtrace
> #0  0x7c810659 in KERNEL32!CreateThread ()
>    from C:\WINDOWS\system32\kernel32.dll
> Cannot access memory at address 0x3
> (gdb) c
> Continuing.
> [New thread 3376.0xc10]
> [Switching to thread 3376.0xc10]
> 0x7c810659 in KERNEL32!CreateThread () from C:\WINDOWS\system32\kernel32.dll
> Quit (expect signal SIGINT when the program is resumed)
> (gdb) bt
> #0  0x7c810659 in KERNEL32!CreateThread ()
>    from C:\WINDOWS\system32\kernel32.dll
> #1  0x90909090 in ?? ()
> #2  0x001165b8 in ?? ()
> #3  0x0300ba00 in ?? ()
> #4  0x12ff7ffe in ?? ()
> #5  0x900004c2 in ?? ()
> #6  0x90909090 in ?? ()

Oops, sorry: I forgot to tell you one important detail.  After you
type C-c into the GDB window, GDB delivers SIGINT to Emacs, and that
causes Windows to start another thread (see the "New thread" message
above).  When a new thread is started, GDB automatically switches to
that thread.  So after typing C-c you are in the thread created by
Windows to handle SIGINT.  But that thread is not the one whose
backtrace we need, which is why you see meaningless frames.

To see an interesting thread, type "thread 1" before "bt".  The first
thread in the running Emacs is the one where most processing happens.
(The GDB command "info threads" will show you all the threads GDB
knows about.)




  reply	other threads:[~2008-05-09  7:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 17:59 23.0.60; emacs hangs on WinXP with --disable-font-backend, and backtrace Kyle M. Lee
2008-05-07 18:15 ` Eli Zaretskii
2008-05-08  0:59   ` Kyle M. Lee
2008-05-08 10:22     ` Eli Zaretskii
2008-05-08 15:28       ` Kyle M. Lee
2008-05-08 15:37         ` Eli Zaretskii
2008-05-08 15:56           ` Kyle M. Lee
2008-05-08 16:57             ` Eli Zaretskii
2008-05-09  1:05               ` Kyle M. Lee
2008-05-09  7:22                 ` Eli Zaretskii [this message]
2008-05-09 15:20                   ` Kyle M. Lee
2008-05-09 21:46                     ` Eli Zaretskii
2008-05-10  8:56                     ` 23.0.60; emacs hangs on LoseXP " Richard M Stallman
2008-05-10 13:42                       ` Kyle M. Lee
2008-05-11  7:34                         ` Richard M Stallman
2008-05-11 12:38                           ` David Kastrup
2008-05-10 20:32                       ` David Kastrup
2008-05-08 16:03         ` 23.0.60; emacs hangs on WinXP " Kyle M. Lee
2008-05-08 11:50 ` Jason Rumney
2008-05-08 11:59   ` David Kastrup
2008-05-08 12:08     ` Jason Rumney
2008-05-08 15:40       ` Kyle M. Lee
2008-05-08 15:34   ` Kyle M. Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uk5i4lz6k.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=mail2kyle@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).