unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* 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

unofficial mirror of bug-guile@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-bugs/0 guile-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-bugs guile-bugs/ https://yhetil.org/guile-bugs \
		bug-guile@gnu.org
	public-inbox-index guile-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.bugs
	nntp://news.gmane.io/gmane.lisp.guile.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git