From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.lisp.guile.devel Subject: Re: bug#22608: Module system thread unsafety and .go compilation Date: Fri, 07 Oct 2022 20:21:37 -0400 Message-ID: <87lepr412m.fsf@gmail.com> References: <8737t1k5yk.fsf@T420.taylan> <87d0w4ezst.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36387"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) Cc: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?=22Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer=22?=), 22608@debbugs.gnu.org, guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sat Oct 08 02:21:59 2022 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogxbL-0009Dy-A2 for guile-devel@m.gmane-mx.org; Sat, 08 Oct 2022 02:21:59 +0200 Original-Received: from localhost ([::1]:52152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogxbJ-0000bs-Qn for guile-devel@m.gmane-mx.org; Fri, 07 Oct 2022 20:21:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogxb6-0000bj-4g for guile-devel@gnu.org; Fri, 07 Oct 2022 20:21:44 -0400 Original-Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:34532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogxb4-0004Ph-2z; Fri, 07 Oct 2022 20:21:43 -0400 Original-Received: by mail-qt1-x836.google.com with SMTP id e3so2962072qts.1; Fri, 07 Oct 2022 17:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=DzqMU2SeRW+01Tz4ClXeMY2bOTVlhrtEkPdpunAbz6U=; b=SrylB8lPOJyjZBnqhFscyTzxFHOw0YGLyICX8YcQd9/MoSsYHVU040IsuOr4iND4eZ KuSH4y5tz7lT1tR99j/h+Wcl7uBkytLf+Hf0+B04KqBG4jzUUcrHAhwCfib1CPu9um1O 4usMMXQy4JjT+JzDTJtuTMMZ5p0M1cx6tGqv+rdxbzHTtYtXUTFCKNrCTbHUKB7sCk/0 W7Zj0nzGRxdnaZqSFeP4TVqdEYPXZLcq6sk8Q0IbeDgtadU/6e+3qjS7l0kutfwyEpkC 9JSJI+fdwQ/Sv0hOOHckDUhd5iu9CgZM+MGGACHtOnEihPwmNu4Tgtmybv79Fv6PJxQh ScyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DzqMU2SeRW+01Tz4ClXeMY2bOTVlhrtEkPdpunAbz6U=; b=7kEWs2faSjwCrZkX5GSnwz8czT9JkrfjvPWsHKCI9UHaJoigkjMqqj3tLrMP/sm90i lz3IA0k0E5GjunzsqbMq9p2CfV16A6a85HAdz5NpEIjs6wanBvUh8p6xL2GADf74XFZ4 tJcvSiYDuGz8FTffKYBlMaT/KK8HBghP7Pm+cTOaQoW6LzWPJ4aj5OsFrPpIHs1bnNJY vi+8y1xza8ov5OiVtFryUx19+JMeEr6sJJTon/xPWpg65yNAJne6ko4Mv4ruJxoQOBlI yx/9+fH+bxrPhlhV/ABI4CtZFnKpzp1fSAvB3VpdUQLDD7mLORLlJvAT5nqvOPyh4DYf Q0Qw== X-Gm-Message-State: ACrzQf1y3eyEWngTEXNj50bvLuWvZHQEG4X6z1D9Eznq/ZdP99agv6Ma rLt5emz/bAf2mjVg+uFbfSU57E7CjEgNjg== X-Google-Smtp-Source: AMsMyM6sjYiyNaLFUT+3SdZ0YZJfxQ6bT3kx2Ewn6D620zvLx33rZ/YAyZP1Hu5lzEFOUA+L9LoD8Q== X-Received: by 2002:ac8:5b04:0:b0:375:f4d7:50cc with SMTP id m4-20020ac85b04000000b00375f4d750ccmr6565007qtw.333.1665188499731; Fri, 07 Oct 2022 17:21:39 -0700 (PDT) Original-Received: from hurd ([2607:fad8:4:3::1005]) by smtp.gmail.com with ESMTPSA id h10-20020a05620a284a00b006b9c9b7db8bsm3331794qkp.82.2022.10.07.17.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 17:21:39 -0700 (PDT) In-Reply-To: <87d0w4ezst.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Wed, 04 Jul 2018 00:10:10 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x836.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:21392 Archived-At: Hi, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello, > > taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") skribi= s: > >> To speed up the compilation of the many Scheme files in Guix, we use a >> script that first loads all modules to be compiled into the Guile >> process (by calling 'resolve-interface' on the module names), and then >> the corresponding Scheme files are compiled in a par-for-each. >> >> While Guile's module system is known to be thread unsafe, the idea was >> that all mutation should happen in the serial loading phase, and the >> parallel compile-file calls should then be thread safe. >> >> Sadly that assumption isn't met when autoloads are involved. > > For the record, these issues should be fixed in Guile 2.2.4: > > 533e3ff17 * Serialize accesses to submodule hash tables. > 46bcbfa56 * Module import obarrays are accessed in a critical section. > 761cf0fb8 * Make module autoloading thread-safe. > > =E2=80=98guix pull=E2=80=99 now defaults to 2.2.4, so we=E2=80=99ll see i= f indeed those crashes > disappear. I think we haven't seen these in the last 4 years! We still have references to https://bugs.gnu.org/15602 in our code base though; although the upstream issue appears to have been fixed. Could we remove the workarounds now? --=20 Thanks, Maxim