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,gmane.comp.gdb.patches Subject: Re: [PATCH][PR guile/17247] Block SIGCHLD while initializing Guile Date: Sun, 31 Aug 2014 13:20:48 -0700 Message-ID: References: <834mwsh2nu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1409516460 21653 80.91.229.3 (31 Aug 2014 20:21:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 31 Aug 2014 20:21:00 +0000 (UTC) Cc: guile-devel , "gdb-patches@sourceware.org" To: Eli Zaretskii Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Aug 31 22:20:53 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 1XOBcL-0004zm-QO for guile-devel@m.gmane.org; Sun, 31 Aug 2014 22:20:53 +0200 Original-Received: from localhost ([::1]:50971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOBcL-00077e-CU for guile-devel@m.gmane.org; Sun, 31 Aug 2014 16:20:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOBcJ-00077Y-39 for guile-devel@gnu.org; Sun, 31 Aug 2014 16:20:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOBcI-0001UZ-3U for guile-devel@gnu.org; Sun, 31 Aug 2014 16:20:51 -0400 Original-Received: from mail-yh0-x231.google.com ([2607:f8b0:4002:c01::231]:39276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOBcH-0001UQ-Vm; Sun, 31 Aug 2014 16:20:50 -0400 Original-Received: by mail-yh0-f49.google.com with SMTP id z6so2860428yhz.8 for ; Sun, 31 Aug 2014 13:20:48 -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=VuAvIxITjKzjjj+mRS28pOwsRTMvbDFIOnWdEe+uQzI=; b=G9CUmMt353+3Yu673cuwoObTpgPK7m/mez/LTl4K+ScUrhLbInha7RX7rwnipsonbx to39mh30NgDlNBxo35FqWTDU1EfRNdjM1Y8gBaAxK8LL1GIW/RVp0xSk6I2MCAS7NnBV UBDZKQZjLQ5282/wV2i5oHY0v5soxkZWjmc3cSrkyPDZnZxyaN2jrrbMMddD5bR98LGm JxpJf0qMUeQYlSpWFDUBs4wEkclPCAL89y2O/UXmNqHku5Q+z6SGhIz6uOyLJdaMKc9S 9V5YMLdLjcjTdBL8HRFhG0N2TdEJujCQG3buN6coWLwiPORIWuDexducj8AVFJ/va2ZS gqRg== X-Received: by 10.236.129.205 with SMTP id h53mr37508217yhi.74.1409516448193; Sun, 31 Aug 2014 13:20:48 -0700 (PDT) Original-Received: by 10.170.66.138 with HTTP; Sun, 31 Aug 2014 13:20:48 -0700 (PDT) In-Reply-To: <834mwsh2nu.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::231 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:17380 gmane.comp.gdb.patches:100389 Archived-At: [+ guile-devel] On Sun, Aug 31, 2014 at 12:36 PM, Eli Zaretskii wrote: >> From: Doug Evans >> Date: Sun, 31 Aug 2014 12:07:58 -0700 >> >> Basically, current Guile (git) starts an internal thread >> (the "finalizer" thread), and libgc as of 7.4 now starts several >> marker threads by default (before 7.4.0 one needed to configure >> libgc with --enable-parallel-mark). >> >> When other threads are running, and they haven't blocked SIGCHLD, >> then the kernel may send SIGCHLD to these threads, leaving gdb >> hung in the sigsuspend calls in linux-nat.c. > > A heretic thought: is it at all a good idea to have Guile (and GC) > start threads when they run under GDB? GDB is a single-threaded > program, so having it linked against libraries that start threads > whenever they like is IME a source of subtle problems (like this one) > and a lot of pain down the road. Anything GDB does that affects the > global environment of the whole program (e.g., I/O redirection) will > also affect those threads, with who knows what consequences. > > So maybe The Right Way of fixing these problems is configure Guile and > GC so that they never start any additional threads? Users are going to want to start threads. I've seen that already. I think we should not shy away from them.