Subject: Re: bug#15794: Core dump after SIGTERM during GC marking

From: Eli Zaretskii <[email-masked]>
Date: Sun, 03 Nov 2013 19:39:24 +0200

> Date: Sun, 3 Nov 2013 00:28:09 -0400
> From: Barry OReilly <[email-masked]>
> 
> I noticed a core dump file in my file system that was almost a week old.
> I'm not certain what was doing

You can find the equivalent of "C-h l" in the variable recent_keys.

> but I think I was developing Elisp code
> around the time which may have inf looped and led to me issuing the SIGTERM
> indicated in the backtrace.
> 
> I have attached the output of 'bt full'.

Executive summary:

 . Emacs was in GC

 . You killed it with SIGTERM

 . Emacs started emergency shutdown, and as part of that invoked the
   hooks in kill-emacs-hook

 . One of those hooks hit a bad regexp, and tried to signal an error

 . 'signal' aborted because it noticed that Emacs is in GC

Since kill-emacs-hook is nil by default, it is hard to know what
exactly happened.  Please try to find out whoch function was run by
the hook at the point of the crash.  The easiest way of doing that is
to call "xbacktrace" (which is always recommended when reporting
bugs, btw).

In any case, running Lisp in the middle of GC is intrinsically
dangerous, so perhaps the error in regexp is due to that; hard to know
without seeing the pattern that was passed to compile_pattern_1.