From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24764: 25.1.50; Another crash in automatic gc Date: Sat, 22 Oct 2016 13:05:53 +0300 Message-ID: <83d1isr94u.fsf@gnu.org> References: <87vawkk9l1.fsf@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477132804 27890 195.159.176.226 (22 Oct 2016 10:40:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 10:40:04 +0000 (UTC) Cc: 24764@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 22 12:40:00 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxtiG-0004D1-FX for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 12:39:40 +0200 Original-Received: from localhost ([::1]:36534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxtiI-000724-Qi for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 06:39:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxtCl-0004hF-9s for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 06:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxtCg-0008KI-Ap for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 06:07:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58696) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bxtCg-0008KA-7q for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 06:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bxtCg-0006Jj-2N for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 06:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Oct 2016 10:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24764 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147713077524228 (code B ref -1); Sat, 22 Oct 2016 10:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Oct 2016 10:06:15 +0000 Original-Received: from localhost ([127.0.0.1]:45862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxtBv-0006Ih-43 for submit@debbugs.gnu.org; Sat, 22 Oct 2016 06:06:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxtBu-0006IT-CP for submit@debbugs.gnu.org; Sat, 22 Oct 2016 06:06:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxtBo-00083O-GK for submit@debbugs.gnu.org; Sat, 22 Oct 2016 06:06:09 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47139) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxtBo-00082z-Dj for submit@debbugs.gnu.org; Sat, 22 Oct 2016 06:06:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxtBn-0003q0-8U for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 06:06:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxtBi-0007z0-AM for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 06:06:07 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxtBi-0007yw-72; Sat, 22 Oct 2016 06:06:02 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1451 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bxtBg-0003hS-H1; Sat, 22 Oct 2016 06:06:01 -0400 In-reply-to: <87vawkk9l1.fsf@web.de> (message from Michael Heerdegen on Sat, 22 Oct 2016 11:38:02 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124819 Archived-At: > From: Michael Heerdegen > Cc: Eli Zaretskii > 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.