From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michal Herko Newsgroups: gmane.lisp.guile.bugs Subject: bug#42797: starting thread from an used module dead lock Date: Mon, 10 Aug 2020 11:57:51 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-/vSXoZeyFFJuNMHTTsML" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6531"; mail-complaints-to="usenet@ciao.gmane.io" To: 42797@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Aug 10 12:17:25 2020 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 1k54rt-0001Yy-9D for guile-bugs@m.gmane-mx.org; Mon, 10 Aug 2020 12:17:25 +0200 Original-Received: from localhost ([::1]:41102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k54rs-0000Yd-9G for guile-bugs@m.gmane-mx.org; Mon, 10 Aug 2020 06:17:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k54pa-0005BD-U8 for bug-guile@gnu.org; Mon, 10 Aug 2020 06:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k54pa-0007hY-HM for bug-guile@gnu.org; Mon, 10 Aug 2020 06:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k54pa-0001jI-DR for bug-guile@gnu.org; Mon, 10 Aug 2020 06:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michal Herko Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 10 Aug 2020 10:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42797 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15970544456557 (code B ref -1); Mon, 10 Aug 2020 10:15:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Aug 2020 10:14:05 +0000 Original-Received: from localhost ([127.0.0.1]:34499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k54oe-0001hh-To for submit@debbugs.gnu.org; Mon, 10 Aug 2020 06:14:05 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:45566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k54Z6-0001DB-Hi for submit@debbugs.gnu.org; Mon, 10 Aug 2020 05:58:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k54Z5-0004uM-Uk for bug-guile@gnu.org; Mon, 10 Aug 2020 05:58:00 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:43604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k54Z3-00048U-Fg for bug-guile@gnu.org; Mon, 10 Aug 2020 05:57:59 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 591E451C71 for ; Mon, 10 Aug 2020 11:57:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aG1-r_u4wSyE for ; Mon, 10 Aug 2020 11:57:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1597053472; bh=c4us2xJqZNjRGe6YzhLwHXtdvtM4mjlAANBEpDV+orc=; h=Subject:From:To:Date; b=eFt3/zStG0aF6Pk+nWb9jsJwhi3SYGHFN0zyhCT4cinOEtXagmZ3eyOhtP2xKe3F9 5UuwQtMYqtgV41nA8YzNspvqI4EoY1s1SbmNJxb55F/eGX8nw62LWXNf6BSZX4txm1 MGHMOeuJ+YzGCRGBqDHvQcuqipj2RjKytEzgLAQgTeesRWkT7yndOimOMMdETErr72 VqmVT0Y9Vb5wWVDuZLdqHDRK3TcvdF7hsh8jz6wakERLUFm29ytfJQ6nQwyZJWofK4 4srnhIvL24APMRtlGLPXoP1/eOx0q3SUA9D9yoHbOm/oWwoiCZAGfexwdH4Nx0kZW/ mK+p/qDYI7+0A== Received-SPF: pass client-ip=178.21.23.139; envelope-from=michal.herko@disroot.org; helo=knopi.disroot.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/10 05:57:53 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 10 Aug 2020 06:14:03 -0400 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" Xref: news.gmane.io gmane.lisp.guile.bugs:9861 Archived-At: --=-/vSXoZeyFFJuNMHTTsML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hello, Attempint to start a new thread from a file loaded using *use-modules* dead locks guile. Create a file *start.scm* ``` (define-module (start)) (use-modules (ice-9 threads)) (call-with-new-thread (lambda () (format #t "hello from thread\n"))) ``` Create a file *use.scm* ``` (define-module (use)) (use-modules (start)) ``` Execute start.scm: $ guile -L . start.scm The program should print the message end exit. Instead it would hang forever without using cpu. The bug displays both on guile version 2.2.7 and 3.0.4. I was testing on debian bullseye, x86_64. The workaround is to use *load-from-path* instead of *use-modules*. The bug does not manifest from REPL. --=-/vSXoZeyFFJuNMHTTsML Content-Disposition: attachment; filename="use.scm" Content-Transfer-Encoding: base64 Content-Type: text/x-scheme; name="use.scm"; charset="UTF-8" KGRlZmluZS1tb2R1bGUgKHVzZSkpCgoodXNlLW1vZHVsZXMgKHN0YXJ0KSkKCjsgKGxvYWQtZnJv bS1wYXRoICJzdGFydC5zY20iKQo= --=-/vSXoZeyFFJuNMHTTsML Content-Disposition: attachment; filename="start.scm" Content-Transfer-Encoding: base64 Content-Type: text/x-scheme; name="start.scm"; charset="UTF-8" KGRlZmluZS1tb2R1bGUgKHN0YXJ0KSkKCih1c2UtbW9kdWxlcwogIChpY2UtOSB0aHJlYWRzKSkK CihjYWxsLXdpdGgtbmV3LXRocmVhZAogIChsYW1iZGEgKCkKICAgIChmb3JtYXQgI3QgImhlbGxv IGZyb20gdGhyZWFkXG4iKSkpCgoK --=-/vSXoZeyFFJuNMHTTsML--