Subject: RE: bug#1243: Verilog mode hanging emacs 22.2

From: "Mitchell, Paul" <[email-masked]>
Date: Mon, 27 Oct 2008 09:58:05 -0400

Stefan,

I ran emacs under gdb, from within the src directory.  I then edited the
file that exhibits this problem and did a few incremental searches.
This caused emacs to hang.  I tried to break out of this from gdb using
ctrl-c, which killed emacs so that I could not use xbacktrace.  Then,
from the gdb prompt I used: "handle SIGINT stop", got back to the hang,
and tried ctrl-c again.  I now was able to use xbacktrace, and see this:

(gdb) xbacktrace
"re-search-backward" (0x86f1eeb)
"verilog-beg-of-defun" (0x87cfd85)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8811595)
"verilog-beg-of-defun" (0x87cfd85)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8804edd)
"verilog-beg-of-defun" (0x87d1405)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8804e9d)
"verilog-beg-of-defun" (0x87d1405)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8808745)
"verilog-beg-of-defun" (0x87d1405)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8808785)
"verilog-beg-of-defun" (0x87d1405)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x88087c5)
"verilog-beg-of-defun" (0x87dabdd)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x87edc35)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8711c85)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8711cf5)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8711d35)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8711d75)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8711dd5)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8711e65)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8711f15)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
---Type <return> to continue, or q <return> to quit---
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8711f55)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x8711f95)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x871203d)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"verilog-syntax-ppss" (0x831e8c9)
"verilog-skip-backward-comment-or-string" (0x87120b5)
"verilog-beg-of-defun" (0xa4670)
"byte-code" (0x8234d13)
"syntax-ppss" (0x1122c8)
"font-lock-fontify-syntactically-region" (0x1122c8)
"font-lock-default-fontify-region" (0x1122c8)
"font-lock-fontify-region" (0x1122c8)
"run-hook-with-args" (0x8514ce1)
"byte-code" (0x8239e2b)
"jit-lock-fontify-now" (0x112458)
"jit-lock-function" (0x112458)
(gdb)  

-----Original Message-----
From: Stefan Monnier [mailto:[email-masked]] 
Sent: Saturday, October 25, 2008 2:39 PM
To: Mitchell, Paul
Cc: [email-masked]; [email-masked]
Subject: Re: bug#1243: Verilog mode hanging emacs 22.2

> Bring a verilog file (*.v) into the editor, and either search for
> something or simply page down thru it.  After a few searches or pages,
> the clock symbol is displayed on the mouse cursor, and emacs is
> completely unresponsive.  A "top" shows that emacs is using most of
the
> cpu.  Nothing I've tried from within emacs has been able to break out
of
> this - the emacs process is hung.  This seems to happen more with
> font-lock mode enabled, but it also occurs w/o it.

> I've contacted the maintainer of verilog-mode, and he has been able to
> reproduce this, but is unsure how to debug it.  His stack trace:

To make better sense of the stack trace, you need to use `xbacktrace'
(which will give a Lisp-level interpretation of the stack).
`xbacktrace' is defined in emacs/src/.gdbinit so you need to start `gdb'
from the `src' directory of the Emacs build tree.

        Stefan