GNU bug report logs - #42797
starting thread from an used module dead lock

Previous Next

Package: guile;

Reported by: Michal Herko <michal.herko <at> disroot.org>

Date: Mon, 10 Aug 2020 10:15:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michal Herko <michal.herko <at> disroot.org>
To: bug-guile <at> gnu.org
Subject: starting thread from an used module dead lock
Date: Mon, 10 Aug 2020 11:57:51 +0200
[Message part 1 (text/plain, inline)]
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.





[use.scm (text/x-scheme, attachment)]
[start.scm (text/x-scheme, attachment)]

This bug report was last modified 4 years and 309 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.