all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 24764@debbugs.gnu.org
Subject: bug#24764: 25.1.50; Another crash in automatic gc
Date: Sat, 22 Oct 2016 13:05:53 +0300	[thread overview]
Message-ID: <83d1isr94u.fsf@gnu.org> (raw)
In-Reply-To: <87vawkk9l1.fsf@web.de> (message from Michael Heerdegen on Sat, 22 Oct 2016 11:38:02 +0200)

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Sat, 22 Oct 2016 11:38:02 +0200
> 
> I think this could be provoked by some lisp stuff I currently develop
> that does a lot of consing, dunno (but of cause I don't funcall `crash'
> anywhere, at least not willingly :-) ).  Crashs happen every ten minutes or
> so, and at totally random points.
> 
> Here is the gdb output.  Session still open.
> [...]
> 
> (gdb) bt full
> #0  0x000000000058aae0 in unchain_marker (marker=0x88e9968) at marker.c:605
>         tail = 0x2020200020202020 <<<<<<<<<<<<<<<<<<<<<<<<
>         prev = 0x2020200020202030 <<<<<<<<<<<<<<<<<<<<<<<<

Your marker pointers are actually full of blank (and other ASCII)
characters.  So some code somewhere either writes past the end of some
stack-based array or otherwise overwrites the stack.

Or maybe your system, too, uses ralloc.c, and this is one more
manifestation of some buffer or string relocated while some code hangs
to the C pointers of the original contents.

The question is which code does that, and how, because usually this
happens long before GC.

See etc/DEBUG for how to debug problems during GC.  The first question
to answer is what is the Lisp data structure being GC'ed here.  Use
the last_marked array for that.

Then you will usually need to come up with a reproducible recipe for
the crash, because finding out which code causes this involves
repeated execution of the recipe with different probes inserted.

If you cannot easily come up with a reproducible recipe, try lowering
the value of gc-cons-threshold, so that GC happens more frequently;
that could allow you to realize what exactly in your Lisp causes the
bad memory writes.

That's about all I can say about this (not sure why I'm on the CC
list, anyway).

Oh, one other thing:

> In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.1)
>  of 2016-10-22 built on drachen
> Repository revision: bfd1abf5c8edf571e9ba272ec2587b964ba86102

There's no such revision SHA1 in the Emacs repository, so I'm not sure
what code base you are using there.





  reply	other threads:[~2016-10-22 10:05 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-22  9:38 bug#24764: 25.1.50; Another crash in automatic gc Michael Heerdegen
2016-10-22 10:05 ` Eli Zaretskii [this message]
2016-10-22 11:41   ` Andreas Schwab
2016-10-22 12:01     ` Eli Zaretskii
2016-10-22 12:21       ` Eli Zaretskii
2016-10-22 14:05         ` Michael Heerdegen
2016-10-22 14:10           ` Eli Zaretskii
2016-10-22 14:43             ` Michael Heerdegen
2016-10-22 15:08               ` Eli Zaretskii
2016-10-22 18:25                 ` Michael Heerdegen
2016-10-22 18:35                   ` Eli Zaretskii
2016-10-23  9:06                     ` Michael Heerdegen
2016-10-23  9:32                       ` Eli Zaretskii
2016-10-23 10:22                         ` Eli Zaretskii
2016-10-23 10:53                           ` Michael Heerdegen
2016-10-23 12:06                             ` Eli Zaretskii
2016-10-23 10:49                         ` Michael Heerdegen
2016-10-23 10:24                       ` Eli Zaretskii
2016-10-23 11:00                         ` Michael Heerdegen
2016-10-23 12:08                           ` Eli Zaretskii
2016-10-23 13:57                           ` Eli Zaretskii
2016-10-23 15:53                             ` Michael Heerdegen
2016-10-23 16:37                               ` Michael Heerdegen
2016-10-23 17:01                                 ` Eli Zaretskii
2016-10-25 14:37                                   ` Michael Heerdegen
2016-10-25 16:46                                     ` Eli Zaretskii
2016-10-25 17:21                                       ` Michael Heerdegen
2016-10-25 18:17                                         ` Eli Zaretskii
2016-10-27 16:40                                         ` Michael Heerdegen
2016-10-27 17:18                                           ` Eli Zaretskii
2016-11-07  3:38                                           ` Eli Zaretskii
2016-11-07 11:36                                             ` Michael Heerdegen
2016-10-22 12:36       ` Eli Zaretskii
2016-10-22 13:54   ` Michael Heerdegen
2016-10-22 14:12     ` Michael Heerdegen
2016-10-22 14:24       ` Eli Zaretskii
2016-10-22 14:13     ` Eli Zaretskii
2016-10-23  9:32       ` Michael Heerdegen
2016-10-22 14:37 ` npostavs
2016-10-22 14:38   ` Eli Zaretskii
2016-10-22 14:51     ` Michael Heerdegen
2016-10-22 15:25       ` Eli Zaretskii
2016-10-22 15:33         ` Eli Zaretskii

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=83d1isr94u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=24764@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.