From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Panicz Maciej Godek Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Fix thread-unsafe lazy initializations Date: Thu, 23 Jan 2014 21:25:38 +0100 Message-ID: References: <87ha8ulh1z.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1390508739 13379 80.91.229.3 (23 Jan 2014 20:25:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jan 2014 20:25:39 +0000 (UTC) Cc: guile-devel To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jan 23 21:25:46 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 1W6QqQ-0002C2-Ig for guile-devel@m.gmane.org; Thu, 23 Jan 2014 21:25:46 +0100 Original-Received: from localhost ([::1]:43071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6QqQ-0000Y0-4I for guile-devel@m.gmane.org; Thu, 23 Jan 2014 15:25:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6QqL-0000Xr-L6 for guile-devel@gnu.org; Thu, 23 Jan 2014 15:25:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6QqJ-0002ae-Ur for guile-devel@gnu.org; Thu, 23 Jan 2014 15:25:41 -0500 Original-Received: from mail-vb0-x22f.google.com ([2607:f8b0:400c:c02::22f]:55502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6QqJ-0002aS-G0 for guile-devel@gnu.org; Thu, 23 Jan 2014 15:25:39 -0500 Original-Received: by mail-vb0-f47.google.com with SMTP id p6so1356534vbe.34 for ; Thu, 23 Jan 2014 12:25:39 -0800 (PST) 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=byu1RsWKsdsWcCbQa6qPnf7rnTtkKGxi3w8fmMjNfTw=; b=WlkVptx5uA+uCsfAWD7F4vGsECXzkn71a8A0Jj1CzmgNsNVG0gwV41TKIJ7Op1SSWW lXorm/3bgwwmeASSaYtg//BR6Ryti1pRjHD0xt62mM8cy58rno9YaaCUZ8x25DmPELXR i3Y4X7yFasB9jnoUS3yLOPWRVBn6VTBwJDyqrnAwnlQAbIYzX7WzG9EUaEytbCg9sfcu BF52H4GydbCmPGNFFksvmaEVOntyDxbXCl2Pxza00RVMZ8qHf466K+mnG5HFZ08n0Slm UnsnZKQjxXy3NYyllelwLuuFgeoQmb28DonyTdQCP5Wuza6UjyNZ0SeWIxPHvu5v/18q 1kdg== X-Received: by 10.220.159.4 with SMTP id h4mr5555167vcx.1.1390508738981; Thu, 23 Jan 2014 12:25:38 -0800 (PST) Original-Received: by 10.220.115.65 with HTTP; Thu, 23 Jan 2014 12:25:38 -0800 (PST) In-Reply-To: <87ha8ulh1z.fsf@netris.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c02::22f 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:16835 Archived-At: 2014/1/23 Mark H Weaver : > This patch fixes all of the thread-unsafe lazy initializations I could > find in stable-2.0, using 'scm_i_pthread_once'. > > Any comments and/or objections? Does this fix the error that Chris Vine found some time ago? If so, is there any test in the test suite that failed before, and doesn't fail anymore? According to Ludovic, Chris' example corresponds to test-pthread-create-secondary.c -- yet they differ in that guile's test doesn't use scm_c_eval_string, which helped to reveal the problem. Shouldn't it be added to the test suite along with the patch, for regression? Could we come up with any tests that would prove with certainty that there are still some failures caused by lazy intializations of modules? (e.g. would it help to write a test that loads all the modules that are provided by guile, each in a separate thread?) I hope that this is not a big faux pas :) Thanks