* bug#42797: starting thread from an used module dead lock
@ 2020-08-10 9:57 Michal Herko
0 siblings, 0 replies; only message in thread
From: Michal Herko @ 2020-08-10 9:57 UTC (permalink / raw)
To: 42797
[-- Attachment #1: Type: text/plain, Size: 697 bytes --]
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.
[-- Attachment #2: use.scm --]
[-- Type: text/x-scheme, Size: 77 bytes --]
(define-module (use))
(use-modules (start))
; (load-from-path "start.scm")
[-- Attachment #3: start.scm --]
[-- Type: text/x-scheme, Size: 135 bytes --]
(define-module (start))
(use-modules
(ice-9 threads))
(call-with-new-thread
(lambda ()
(format #t "hello from thread\n")))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-10 9:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 9:57 bug#42797: starting thread from an used module dead lock Michal Herko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).