GNU bug report logs - #16039
repeated emacs crashes (in GC?)

Previous Next

Package: emacs;

Reported by: emacs user <user.emacs <at> gmail.com>

Date: Tue, 3 Dec 2013 14:57:02 UTC

Severity: normal

Tags: fixed

Fixed in version 25.2

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16039 <at> debbugs.gnu.org, emacs user <user.emacs <at> gmail.com>
Subject: bug#16039: repeated emacs crashes (in GC?)
Date: Wed, 04 Dec 2013 09:43:00 +0900
>>>>> On Tue, 03 Dec 2013 18:01:21 +0200, Eli Zaretskii <eliz <at> gnu.org> said:

>> I wrote YAMAMOTO Mitsuharu, the Emacs for mac developer, and his
>> response is
>> 
>> > The backtrace shows that the stack is used up because some deeply
>> > nested Lisp data structure is recursively traversed in garbage >
>> > collection (or possibly an unknown bug in the GC code).  In
>> > normal OSX applications, the stack depth for the main thread is
>> > set to 8MiB by default, and Emacs slightly enlarges it to
>> > 8720000B (on 64-bit binary) by some formula in src/emacs.c:

> What is the evidence that the stack is used up?

The backtrace shows it crashed by accessing the address exceeding the
stack boundary:

  * thread #1: tid = 0x484e3, 0x00000001000f61d1 Emacs`mark_object + 1073,
  queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=2,
  address=0x7fff5f3aeff8)

Below is extracted from the memory map (% vmmap -interleaved PID):

  STACK GUARD            00007fff5bc00000-00007fff5f3af000 [ 55.7M] ---/rwx SM=NUL  stack guard for thread 0
  Stack                  00007fff5f3af000-00007fff5f400000 [  324K] rw-/rwx SM=NUL  thread 0
  Stack                  00007fff5f400000-00007fff5fbff000 [ 8188K] rw-/rwx SM=PRV  thread 0

> Having 136 thousand frames during GC is not unheard of.

(/ 8720000.0 (* 136 1000))
64.11764705882354

If each frame consumes more than 64 bytes, then it will use up
8720000B stack space.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp




This bug report was last modified 8 years and 189 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.