all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16039@debbugs.gnu.org, emacs user <user.emacs@gmail.com>
Subject: bug#16039: repeated emacs crashes (in GC?)
Date: Wed, 04 Dec 2013 09:43:00 +0900	[thread overview]
Message-ID: <wlr49tla3v.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <83k3fl53fy.fsf@gnu.org>

>>>>> On Tue, 03 Dec 2013 18:01:21 +0200, Eli Zaretskii <eliz@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@math.s.chiba-u.ac.jp





  reply	other threads:[~2013-12-04  0:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 14:55 bug#16039: repeated emacs crashes (in GC?) emacs user
2013-12-03 16:01 ` Eli Zaretskii
2013-12-04  0:43   ` YAMAMOTO Mitsuharu [this message]
2013-12-04  1:48     ` YAMAMOTO Mitsuharu
2013-12-05  0:35       ` YAMAMOTO Mitsuharu
2013-12-05  6:54         ` emacs user
2013-12-04  3:49     ` Eli Zaretskii
2013-12-04  6:33       ` emacs user
2013-12-07 20:29 ` emacs user
2013-12-15 17:17   ` emacs user
2013-12-15 17:45     ` Eli Zaretskii
2014-01-18 16:06       ` emacs user
2016-05-28 15:08         ` Alan Third
2016-11-03 22:45           ` emacs user

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

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

  git send-email \
    --in-reply-to=wlr49tla3v.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=16039@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=user.emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.