From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#13611: SEGV during SMOB GC Date: Tue, 05 Feb 2013 11:07:51 +0100 Message-ID: <87y5f3t6o8.fsf@gnu.org> References: <1359838300.89158.YahooMailNeo@web120405.mail.ne1.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1360058944 3528 80.91.229.3 (5 Feb 2013 10:09:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2013 10:09:04 +0000 (UTC) Cc: 13611@debbugs.gnu.org To: Mike Gran Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Feb 05 11:09:24 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U2fSu-0004Ma-72 for guile-bugs@m.gmane.org; Tue, 05 Feb 2013 11:09:24 +0100 Original-Received: from localhost ([::1]:38905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2fSb-0007Yh-IJ for guile-bugs@m.gmane.org; Tue, 05 Feb 2013 05:09:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2fSS-0007XD-H1 for bug-guile@gnu.org; Tue, 05 Feb 2013 05:09:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2fSP-0000CE-5C for bug-guile@gnu.org; Tue, 05 Feb 2013 05:08:56 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2fSP-0000C9-0R for bug-guile@gnu.org; Tue, 05 Feb 2013 05:08:53 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U2fTW-0002gY-H6 for bug-guile@gnu.org; Tue, 05 Feb 2013 05:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 05 Feb 2013 10:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13611 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 13611-submit@debbugs.gnu.org id=B13611.136005894510254 (code B ref 13611); Tue, 05 Feb 2013 10:10:02 +0000 Original-Received: (at 13611) by debbugs.gnu.org; 5 Feb 2013 10:09:05 +0000 Original-Received: from localhost ([127.0.0.1]:37123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2fSb-0002fI-E2 for submit@debbugs.gnu.org; Tue, 05 Feb 2013 05:09:05 -0500 Original-Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:22186) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2fSY-0002f0-Mo for 13611@debbugs.gnu.org; Tue, 05 Feb 2013 05:09:04 -0500 X-IronPort-AV: E=Sophos;i="4.84,602,1355094000"; d="scan'208";a="1426002" Original-Received: from nat-eduroam-37.bordeaux.inria.fr (HELO pluto) ([194.199.1.37]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 05 Feb 2013 11:07:51 +0100 In-Reply-To: <1359838300.89158.YahooMailNeo@web120405.mail.ne1.yahoo.com> (Mike Gran's message of "Sat, 2 Feb 2013 12:51:40 -0800 (PST)") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6733 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Mike, Mike Gran skribis: > This gives > > =C2=A0 Program received signal SIGSEGV, Segmentation fault. > =C2=A0 [Switching to Thread 0xb7d98b40 (LWP 20488)] > =C2=A0 0xb7f251ab in smob_mark (addr=3D0x8608ff0, mark_stack_ptr=3D0xb7d9= 0308,=20 > =C2=A0=C2=A0 =C2=A0=C2=A0 mark_stack_limit=3D0xb7d982f0, env=3D0) at smob= .c:325 > =C2=A0 325=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SC= M_I_CURRENT_THREAD->current_mark_stack_ptr =3D mark_stack_ptr; > > Here's what's happening internally.=C2=A0 When Guile starts up, it create= s 3 > threads > * Initial thread > * GC thread from scm_storage_prehistory GC_INIT() > * signal delivery thread > > That second thread is the one from which automatic garbage collection > occurs.=C2=A0 The way that thread gets created, it has an > scm_i_current_thread =3D=3D NULL, apparently. Is there any chance that you=E2=80=99re using a GC 7.3 pre-release? There was a similar report on IRC, and the fix appears to be: --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- a/libguile/smob.c +++ b/libguile/smob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -318,7 +318,7 @@ smob_mark (GC_word *addr, struct GC_ms_entry *mark_stack_ptr, mark_stack_ptr, mark_stack_limit, NULL); - if (scm_smobs[smobnum].mark) + if (scm_smobs[smobnum].mark && SCM_I_CURRENT_THREAD != NULL) { SCM obj; --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable (Note that on 2.0 SMOB mark procedures are unnecessary.) Ludo=E2=80=99. --=-=-=--