From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.devel Subject: Re: allocation within critical sections Date: Thu, 16 Feb 2012 18:46:02 -0800 (PST) Message-ID: <1329446762.84665.YahooMailNeo@web37906.mail.mud.yahoo.com> References: <87sjijzulh.fsf@pobox.com> <87d39e5uv1.fsf@gnu.org> <874nuqpg6k.fsf@pobox.com> Reply-To: Mike Gran NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1329446778 20558 80.91.229.3 (17 Feb 2012 02:46:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2012 02:46:18 +0000 (UTC) Cc: "guile-devel@gnu.org" To: Andy Wingo , =?utf-8?B?THVkb3ZpYyBDb3VydMOocw==?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Feb 17 03:46:14 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RyDpu-00013k-6M for guile-devel@m.gmane.org; Fri, 17 Feb 2012 03:46:14 +0100 Original-Received: from localhost ([::1]:42838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyDpq-0007AM-0a for guile-devel@m.gmane.org; Thu, 16 Feb 2012 21:46:10 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyDpm-0007A6-6S for guile-devel@gnu.org; Thu, 16 Feb 2012 21:46:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyDpl-0001Eu-Bf for guile-devel@gnu.org; Thu, 16 Feb 2012 21:46:06 -0500 Original-Received: from nm25-vm2.bullet.mail.ne1.yahoo.com ([98.138.91.213]:38445) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RyDpk-0001Eh-Ur for guile-devel@gnu.org; Thu, 16 Feb 2012 21:46:05 -0500 Original-Received: from [98.138.90.55] by nm25.bullet.mail.ne1.yahoo.com with NNFMP; 17 Feb 2012 02:46:03 -0000 Original-Received: from [98.138.89.197] by tm8.bullet.mail.ne1.yahoo.com with NNFMP; 17 Feb 2012 02:46:03 -0000 Original-Received: from [127.0.0.1] by omp1055.mail.ne1.yahoo.com with NNFMP; 17 Feb 2012 02:46:03 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 832598.97636.bm@omp1055.mail.ne1.yahoo.com Original-Received: (qmail 67317 invoked by uid 60001); 17 Feb 2012 02:46:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1329446763; bh=IaO8JqhayGx+rrRQULfuvbDTepe/YHjNICig9AoWFXY=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=KAwc3H0ekFBMlRWoWwc8YiwEdddsiyL4r7phx3f67R1ix3ZyGlWXJdLTVfoFlhSkyAIKzEFraeBZfRKVAvM6GqFQX5Zanm+q6WG6jojubt1aooN7TGp7v7a+6JzprqyhnCOOxdklvvZR+ANPiE9hfEMyznb3H6W1tMkmDqPpfdU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=q9scNN4icHuzfXcnZj3GoAqC4ynvvejJDcwYZaRKAHjgR1PrjRN+2BuBgFKJB7RsWGpIchUYwa3NsXihzTnAE9yLm9xD2ygxPyRqM40zR4MfZ8x1o1lG1Mn2nsfUsRjglV4wgoN+LKqjKjgmm3/tgHkCjEieliTehZGbjPXgrNM=; X-YMail-OSG: FUhege8VM1kkKA1EP9y7a6xosbSnuPgPSJrHFQixmWzgsYG rO5r_W525FeRdgyj7RHzU2weBwhATdEBi3tTEI8XNN09oyBWveZsD0qzWOYt s7cF650JWYH6so4u38orYVq09.RggWOT0X07.x71xWP16wE0geW8I6aJd8pc ONLDvtNoeEXHsSYN3O0CdvYDfX4gPikykP6_rl1q5RoFMnXKP1wsffYZHmgJ fYCxDtsNxEvl1.ZokAupt4zCqaxatsh9aEZiMoLiYRKrVMyf2MQngo8w_WJH u4Gzown0RM5Arp4lKw83LlcQ5TBV5f1EJq0jIZud7DlyFbiXEjOncL3LyCfI SvVI4I3TAh_VBEggMtjkN.YZWMqpGJU32Es6BRT9XeUhppmwwakL1IxsJZyR EKhIK3orYgtRMM3g0Tq6_0OZy1mftECygB0vPPKLW6crwQG918Ta3SDec9ii 5FGT7Med11NVlFio- Original-Received: from [66.80.183.50] by web37906.mail.mud.yahoo.com via HTTP; Thu, 16 Feb 2012 18:46:02 PST X-Mailer: YahooMailWebService/0.8.116.338427 In-Reply-To: <874nuqpg6k.fsf@pobox.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 98.138.91.213 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13881 Archived-At: > From: Andy Wingo =0A=0A>> Can you explain what happens = here?=C2=A0 Is it a deadlock?=C2=A0 What=E2=80=99s at=0A>> ports.c:575?=0A= > =0A> It was a deadlock, but I fixed it.=C2=A0 It was something that locke= d all=0A> weak sets, but while doing so allocated memory.=C2=A0 Allocating = memory ran=0A> finalizers which tried to manipulate the port set, but that = lock was=0A> already taken: deadlock.=0A> =0A> The solution will be to run = finalizers in a separate thread, as the JVM=0A> does.=0A=0AAs an aside, I c= an get a similar sort of deadlock during garbage=0Acollection of SMOBs if m= y smob_free function calls a scheme function.=0ABut the manual does note th= at you should not call any functions in =0ASMOB GC finalizers, so that woul= dn't happen if I actually followed the=0Ainstructions.=0A=0A-Mike