From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#61058: [PATCH v2] Fix asymetric mutex locking when joining thread. Date: Thu, 25 Jan 2024 23:14:26 +0100 Message-ID: <87fryloybh.fsf@gnu.org> References: <20230125152403.19091-1-olivier.dion@polymtl.ca> <20240125214547.3951-1-olivier.dion@polymtl.ca> 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="36086"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 55356-done@debbugs.gnu.org, 61058-done@debbugs.gnu.org To: Olivier Dion Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Thu Jan 25 23:15:29 2024 Return-path: Envelope-to: guile-bugs@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 1rT80O-0009D7-Q2 for guile-bugs@m.gmane-mx.org; Thu, 25 Jan 2024 23:15:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rT7zv-0005za-BP; Thu, 25 Jan 2024 17:14:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rT7zt-0005yV-NT for bug-guile@gnu.org; Thu, 25 Jan 2024 17:14:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rT7zt-0004R5-Ev for bug-guile@gnu.org; Thu, 25 Jan 2024 17:14:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rT7zz-0003HB-GE for bug-guile@gnu.org; Thu, 25 Jan 2024 17:15:03 -0500 Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Thu, 25 Jan 2024 22:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 61058 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Mail-Followup-To: 61058@debbugs.gnu.org, ludo@gnu.org, olivier.dion@polymtl.ca Original-Received: via spool by 61058-done@debbugs.gnu.org id=D61058.170622088512513 (code D ref 61058); Thu, 25 Jan 2024 22:15:03 +0000 Original-Received: (at 61058-done) by debbugs.gnu.org; 25 Jan 2024 22:14:45 +0000 Original-Received: from localhost ([127.0.0.1]:49467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT7zg-0003Fg-Ku for submit@debbugs.gnu.org; Thu, 25 Jan 2024 17:14:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT7ze-0003FK-1x; Thu, 25 Jan 2024 17:14:42 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rT7zR-0004EO-VF; Thu, 25 Jan 2024 17:14:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=qA4emFfGALbTPqbv81dwRT5Mcf7Zi17e1aebEF+bpiM=; b=iO0inLt2ijbjUTaIQToa 6kqnNgtsPXUiwPnlFFvxePO/xODT/9PCvWN4Dj6zbf/v3lWPF1ZBxokUKEWzdZBpEKBsbX754PAW7 2SMtm+zjCQMA78m/cxCoVQH2VogoON0uSazhE7jTxcA3/m3BPYNkphYD6o264lFcYW7RxCb0Xpmry clC/3UzsSo1TIIgyLkkSq7PIakFWZVkXzSuqpHxddeI1sy0d9ZmmSqeU0y5XyRbe7GG0fDlla+M1i THuz97hxz+CJOjOi8SMCfICUGCD63YwmAo85hc+NvRGj7OnkgpnmnNsJril7U6k+Z8ov+RL760TX1 wsFFpfkUWjVqGg==; In-Reply-To: <20240125214547.3951-1-olivier.dion@polymtl.ca> (Olivier Dion's message of "Thu, 25 Jan 2024 16:45:47 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10771 Archived-At: Hello, Olivier Dion skribis: > If `join-thread' timeout, the thread mutex is not unlocked, resulting in > deadlock to the next call to it or deadlock of the thread itself when it > terminates. > > Thus, always unlock the mutex. > > Fix: #55356 > > * module/ice-9/threads.scm (join-thread): Always unlock thread mutex. > * test-suite/tests/threads.test (join-thread): New test to ensure the > mutex is released Pushed as 455ee49f5573baa1bc5237a8d49083ce588a13ee with a =E2=80=98NEWS=E2= =80=99 entry and an additional comment in the test. Thanks! Ludo=E2=80=99.