From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Evans Newsgroups: gmane.lisp.guile.devel Subject: Re: Need to block SIGCHLD in libgc and guile internal threads Date: Sat, 30 Aug 2014 10:40:06 -0700 Message-ID: References: <87mwan19l7.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1409420421 22842 80.91.229.3 (30 Aug 2014 17:40:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Aug 2014 17:40:21 +0000 (UTC) Cc: guile-devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Aug 30 19:40:14 2014 Return-path: Envelope-to: guile-devel@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 1XNmdJ-0003Me-Jg for guile-devel@m.gmane.org; Sat, 30 Aug 2014 19:40:13 +0200 Original-Received: from localhost ([::1]:47307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNmdJ-00045c-8H for guile-devel@m.gmane.org; Sat, 30 Aug 2014 13:40:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNmdE-00043z-Lw for guile-devel@gnu.org; Sat, 30 Aug 2014 13:40:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNmdD-0003NE-Pl for guile-devel@gnu.org; Sat, 30 Aug 2014 13:40:08 -0400 Original-Received: from mail-yk0-x22b.google.com ([2607:f8b0:4002:c07::22b]:55746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNmdD-0003MA-MQ for guile-devel@gnu.org; Sat, 30 Aug 2014 13:40:07 -0400 Original-Received: by mail-yk0-f171.google.com with SMTP id 9so2262524ykp.16 for ; Sat, 30 Aug 2014 10:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HfzvPWLNQ7jItUI43dnchcs183ejG+rv23jGU6Iqq4Q=; b=Z/uLMAKCuu5ccvert/DoneVh2nURFG64XxWORGbjo9L4PEwmVuAnHcig/UHIqR4kck YHtGz8JI7gIbfIr3JI09hVWXj9AFGSXQUkqJ/ERpxyiHv5Fb25/rMeUnsfe1C3rJwo5c L16Q8wcbG3zN6Dny6Cl1fA3olsPQ+SjcsPC2m/d3vXdhHMbfQFU+8PujIYIREDxvKs8d i+zyyN/EgTIma2Hlvz2ZcUQd/hu3JCUR4fPlWX/UKbWu3zRtZDyC0TgXCnOAPUmf1lau bwyB1p+wuCWt9HLhPnq13/gPbFfLWklgkQryF2ReJH2YfWYj9rqUbAFwChgNi8p1NC8W ty4w== X-Received: by 10.236.202.40 with SMTP id c28mr2209515yho.120.1409420406955; Sat, 30 Aug 2014 10:40:06 -0700 (PDT) Original-Received: by 10.170.66.138 with HTTP; Sat, 30 Aug 2014 10:40:06 -0700 (PDT) In-Reply-To: <87mwan19l7.fsf@netris.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::22b 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:17377 Archived-At: On Fri, Aug 29, 2014 at 10:36 AM, wrote: > On master, where we now require gc-7.2 or later, I guess we should be > able to simplify this and block all signals. > > However, it's not clear how to backport this to stable-2.0, which does > not even have a finalization thread, and yet gdb bug 17247 occurs with > Guile 2.0.11. Any idea how to prevent the problem on stable-2.0? For gdb my plan is to block SIGCHLD before initializing guile and unblock it afterwards. That'll work regardless of guile version (assuming no new internal guile threads get created afterwards). For stable-2.0 you could do a similar thing I guess: block every signal not expected before initializing libgc and undo that afterwards. [taking care to not block signals libgc uses internally I guess, e.g. SIGPWR, SIGXCPU. I'm not sure if libgc checks and fails to initialize or unblocks them] [and, for completeness sake, we're only talking about asynchronous signals ... not SIGSEGV, etc.]