From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.bugs Subject: bug#13611: SEGV during SMOB GC Date: Tue, 5 Feb 2013 08:29:48 -0800 (PST) Message-ID: <1360081788.3781.YahooMailNeo@web120406.mail.ne1.yahoo.com> References: <1359838300.89158.YahooMailNeo@web120405.mail.ne1.yahoo.com> <87y5f3t6o8.fsf@gnu.org> Reply-To: Mike Gran NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1635569886-88612283-1360081788=:3781" X-Trace: ger.gmane.org 1360081863 937 80.91.229.3 (5 Feb 2013 16:31:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2013 16:31:03 +0000 (UTC) Cc: "13611@debbugs.gnu.org" <13611@debbugs.gnu.org> To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Feb 05 17:31:22 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 1U2lQR-0001rO-1i for guile-bugs@m.gmane.org; Tue, 05 Feb 2013 17:31:15 +0100 Original-Received: from localhost ([::1]:32775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2lQ8-0006Cq-Cq for guile-bugs@m.gmane.org; Tue, 05 Feb 2013 11:30:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2lQ4-0006CX-Ri for bug-guile@gnu.org; Tue, 05 Feb 2013 11:30:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2lQ3-0002ER-At for bug-guile@gnu.org; Tue, 05 Feb 2013 11:30:52 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2lQ3-0002EK-7v for bug-guile@gnu.org; Tue, 05 Feb 2013 11:30:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U2lRB-0004SL-QA for bug-guile@gnu.org; Tue, 05 Feb 2013 11:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mike Gran Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 05 Feb 2013 16:32:01 +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.136008186417058 (code B ref 13611); Tue, 05 Feb 2013 16:32:01 +0000 Original-Received: (at 13611) by debbugs.gnu.org; 5 Feb 2013 16:31:04 +0000 Original-Received: from localhost ([127.0.0.1]:38089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2lQF-0004R4-Mp for submit@debbugs.gnu.org; Tue, 05 Feb 2013 11:31:04 -0500 Original-Received: from nm14-vm1.bullet.mail.ne1.yahoo.com ([98.138.91.38]:44746) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2lQC-0004Qe-SJ for 13611@debbugs.gnu.org; Tue, 05 Feb 2013 11:31:01 -0500 Original-Received: from [98.138.90.49] by nm14.bullet.mail.ne1.yahoo.com with NNFMP; 05 Feb 2013 16:29:48 -0000 Original-Received: from [98.138.89.245] by tm2.bullet.mail.ne1.yahoo.com with NNFMP; 05 Feb 2013 16:29:48 -0000 Original-Received: from [127.0.0.1] by omp1059.mail.ne1.yahoo.com with NNFMP; 05 Feb 2013 16:29:48 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 538295.73102.bm@omp1059.mail.ne1.yahoo.com Original-Received: (qmail 6488 invoked by uid 60001); 5 Feb 2013 16:29:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1360081788; bh=IGOpIE5MEY0unIbhovxbgEE1cANCiRQ9FKQSjikuYbM=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=HOCJgfyja2hDm/+4yn+Z2Xd5gl/DSjEhL/AxH8GH3ltcncNL5GObL8dMw+2oRmXkbcmCRj/UlrFVBVpflxMfb/gLDhRlsV0QD6L+KWas5gO3c1yAxVKjx0ozOYfSZc6EGNp6KYUNOVQ+jSLgEjE1GRYCnLOfSnUo3M119Yvh90c= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=LP70Gl63mgyhFpUa4IofMMJvYmAHurMH0knIdT26LTBOl1ajZikFQLJSu2VLC7bEOWKBt1C6SYFng7c+U0v7qYgZA1wMpNIOmp9+/F5WdFhNC9p0YCV5Nwb/MDrZnQajHqqIAT7caz/ylnz9cRvIK1TpMkV6LHCVvN1fM4ToJGc=; X-YMail-OSG: qRdJSbAVM1kNiZ_q.MY.R2ifv.vYUNQhJopaiR26KsRLVOK m15PBRZufMef.0ufVA0ne_ByiPMprj_I1mFE0aUzug1m6tCd2xUo6P9sWuQb m3Cp8NSdmhJvvAJlIwhuM7p8brEQeP0oXEoKIAZqiY_dJyijAZr4vQ9d8Y2n 82iNivCOHRUnh.0OXX8_zTmD1JRQCcARu53o581jGbW1xL6a2Cxjcwjrvxh_ 7Dop_35jacmTcSJFk6gcVBNE70h1uqbIsAcEL43IMnMTmY_5jzAYQFfD0th4 FWq8CBwfv0vWWPbLo2hqLm73sNzpfWMxz8gAKfrZXSrFN2rJFES77Qp41Ka6 LDUkpQxNxSTUvGQjdYpUrlRsiCkxxcvL5zBGK2d7Hwukfdtr5sGHgHGzKuZQ ShLVgum.bZA.BHJBB.HSdjtPrqf32MLAlNR7lXaotuCQGtFVrPOpNu50d8aE 3aP4HQAm2mVvcfLw1ceIruHzsOSURgAZjk7.4mIxi.rPkx.ZW_vEGPCjAqIg w53leV_niwLhkL26sICw- Original-Received: from [71.130.223.191] by web120406.mail.ne1.yahoo.com via HTTP; Tue, 05 Feb 2013 08:29:48 PST X-Rocket-MIMEInfo: 001.001, PiBGcm9tOiBMdWRvdmljIENvdXJ0w6hzIDxsdWRvQGdudS5vcmc.Cgo.IElzIHRoZXJlIGFueSBjaGFuY2UgdGhhdCB5b3XigJlyZSB1c2luZyBhIEdDIDcuMyBwcmUtcmVsZWFzZT8KClVzaW5nIGdjLTcuMmItMi5mYzE3Lmk2ODYKb24gTGludXggMy42LjEwLTIuZmMxNy5pNjg2ICMxIFNNUCAKCj4gVGhlcmUgd2FzIGEgc2ltaWxhciByZXBvcnQgb24gSVJDLCBhbmQgdGhlIGZpeCBhcHBlYXJzIHRvIGJlOgoKSXQgZG9lcyBmaXggbXkgU0VHVgoKPiAoTm90ZSB0aGF0IG9uIDIuMCBTTU9CIG1hcmsgcHJvY2UBMAEBAQE- X-Mailer: YahooMailWebService/0.8.132.503 In-Reply-To: <87y5f3t6o8.fsf@gnu.org> 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:6734 Archived-At: --1635569886-88612283-1360081788=:3781 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > From: Ludovic Court=C3=A8s =0A=0A> Is there any chance that= you=E2=80=99re using a GC 7.3 pre-release?=0A=0AUsing gc-7.2b-2.fc17.i686= =0Aon Linux 3.6.10-2.fc17.i686 #1 SMP =0A=0A> There was a similar report on= IRC, and the fix appears to be:=0A=0AIt does fix my SEGV=0A=0A> (Note that= on 2.0 SMOB mark procedures are unnecessary.)=0A=0ACool.=C2=A0 Let's yank = it from the manual.=C2=A0 Case closed.=0A=0AYet...=0A=0AFor what it is wort= h, I decided to get som statistics on how=0Aoften smob_mark is called from = a thread with scm_i_current_thread=0A=3D=3D NULL vs how often it is called = from a thread where it is =0Anot null.=0A=0AI wrote the attached patch, and= then, using the same little=0Alibrary as in my initial report, I ran=0A=0A= =C2=A0(use-modules (smobbug))=0A=C2=A0;; Create a SMOB type=0A=C2=A0(handle= smob-init)=0A=C2=A0(for-each (lambda (x) (gc))=0A=C2=A0=C2=A0=C2=A0=C2=A0 = =C2=A0 (iota 1000))=0A=C2=A0(gc-smob-mark-report)=0A=0AThis returned=0A=0A= =C2=A0Count of GC SMOB marks from null thread: 176=0A=C2=A0Count of GC SMOB= marks from current thread: 825=0A=0AIs that expected that GC is sometimes = called from a =0Athread where scm_i_current_thread is null and sometimes=0A= called from a thread where scm_i_current_thread is=0Anot null?=0A=0A-Mike --1635569886-88612283-1360081788=:3781 Content-Type: text/x-patch; name="smob_gc_mark_report.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smob_gc_mark_report.patch" RnJvbSA4MDdiMDBkOTFmYTNiNzAxNjk4N2VjZmQ2OTkyZTdiN2U5NDNkMWUz IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNaWtlIEdyYW4gPHNw azEyMUB5YWhvby5jb20+CkRhdGU6IFR1ZSwgNSBGZWIgMjAxMyAwODoxODow NyAtMDgwMApTdWJqZWN0OiBbUEF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