From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.comp.gdb.patches,gmane.lisp.guile.devel Subject: Re: [PATCH][PR guile/17247] Block SIGCHLD while initializing Guile Date: Fri, 05 Sep 2014 11:48:39 +0300 Message-ID: <83a96ee9lk.fsf@gnu.org> References: <834mwsh2nu.fsf@gnu.org> <8338ccgj78.fsf@gnu.org> <87ppffabw8.fsf@gnu.org> <83y4u3flr2.fsf@gnu.org> <87r3zv71qy.fsf@gnu.org> <83vbp7fer3.fsf@gnu.org> <83iol6f3iy.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1409906942 1610 80.91.229.3 (5 Sep 2014 08:49:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Sep 2014 08:49:02 +0000 (UTC) Cc: ludo@gnu.org, guile-devel@gnu.org, gdb-patches@sourceware.org To: Doug Evans Original-X-From: gdb-patches-return-115548-gdb-gdb-patches=m.gmane.org@sourceware.org Fri Sep 05 10:48:57 2014 Return-path: Envelope-to: gdb-gdb-patches@plane.gmane.org Original-Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XPpCQ-0000cz-TH for gdb-gdb-patches@plane.gmane.org; Fri, 05 Sep 2014 10:48:55 +0200 DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:subject:in-reply-to:to:cc:reply-to :message-id:references; q=dns; s=default; b=dPwHEnzFSTEH/QT+Mv5j +eTK7PN4sEk26L/giKKhu+HzYiOMCJKOcBLngpQ1yxHMEASVe9TM69x/Yh67Vpl/ mF9WDWxy0BBvBAfST4EGGiKWCfyQykxhG7+PRmIMLfY+wEWKbqSBQaFu6ySRgBXh BKacpcNj/UnleVWFBziJX6s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:subject:in-reply-to:to:cc:reply-to :message-id:references; s=default; bh=8cGnlvrcOhRKvikcOWigwIJ8mj A=; b=s7OzTu1ew8f1udZ8AziibpCEApQn76UWvc0bc5oONllXgraNfnYw/n0prd +EvKtfjTNak6em7E1aWV9XhhzMgSClwWTEUJ6dwAs2A+3IjL1JDCKPSJr4F+OWV/ uxh+6N5JAYjw0APk/R9Cw+ebppqtpNBEtJ0BTNn9YjKzvDzxQ= Original-Received: (qmail 21452 invoked by alias); 5 Sep 2014 08:48:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: gdb-patches-owner@sourceware.org Original-Received: (qmail 21439 invoked by uid 89); 5 Sep 2014 08:48:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout22.012.net.il Original-Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 05 Sep 2014 08:48:42 +0000 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NBF00K006TAWV00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Fri, 05 Sep 2014 11:48:39 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NBF00K0F753EZ90@a-mtaout22.012.net.il>; Fri, 05 Sep 2014 11:48:39 +0300 (IDT) In-reply-to: X-IsSubscribed: yes Xref: news.gmane.org gmane.comp.gdb.patches:100526 gmane.lisp.guile.devel:17412 Archived-At: > From: Doug Evans > Cc: ludo@gnu.org, guile-devel@gnu.org, gdb-patches@sourceware.org > Date: Fri, 05 Sep 2014 01:26:28 -0700 > > we can't physically prevent [users] from starting threads. Of course we can: if Guile gives us a way to disable threads, any user extension that attempts to start a thread will simply fail. > We pretty much leave them that way already given the myriad > of things they can do to mess up gdb without threads. ?? The rest of GDB is compiled C code which users cannot change without recompiling. And it's a single-threaded code. And it's under our close scrutiny. So I see no problems here. > The python side of things is too silent on whether threads are supported > there. > https://sourceware.org/gdb/current/onlinedocs/gdb/Basic-Python.html#Basic-Python I simply don't know enough about Python to discuss this; I do know about Guile. If Python extensions can start threads, then the same considerations apply there. And if the Python side didn't disallow that until now, it doesn't sound like a good excuse to add insult to injury on the Guile side. > At any rate, the task at hand is getting gdb to work well with Guile, > regardless of whether the user starts any threads, > and that's the intent of the patch. If we disable threads, this patch is unneeded, as are all the future patches I envision that will have to deal with these issues. We kill the problem cleanly and once and for all. From where I stand, it's a no-brainer. > I am happy to make the default value of GC_MARKERS be 1 (regardless > of libgc version, and if not already set by the user) when initializing Guile, > that will disable libgc marker threads. That'd be fine with me, thanks.