GNU bug report logs -
#27476
Multi-threaded compilation of 'syntax-parameterize' forms crashes
Previous Next
Full log
View this message in rfc822 format
ludo <at> gnu.org (Ludovic Courtès) skribis:
> I can’t reproduce this with current Guile ‘stable-2.2’, following Andy’s
> weak-table rewrite¹, so this might have been a weak-table bug showing up
> under memory pressure.
With Guile 2.2.3 a similar program triggers a crash very quickly:
--8<---------------cut here---------------start------------->8---
$ cat ../guile-debugging/syntax-parms.scm
(use-modules (ice-9 threads)
(srfi srfi-1)
(guix monads)
(guix store)
(system base compile))
(compile #f) ;load modules
(define threads
(unfold (lambda (x) (> x 100))
(lambda (x)
(call-with-new-thread
(lambda ()
(while #t
(compile
'(mlet %store-monad ((x y))
(mbegin %store-monad
(return x)
(return y)))
#:env (current-module)
#:from 'scheme
#:to 'tree-il)))))
1+
0))
(for-each join-thread threads)
$ guile --version
guile (GNU Guile) 2.2.3
Copyright (C) 2017 Free Software Foundation, Inc.
License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ guile ../guile-debugging/syntax-parms.scm
In ice-9/psyntax.scm:
2338:44 19 (expand-let _ _ _ #f _ #<procedure build-let (src ids vars val-exps body-exp)> _ _ _)
1679:45 18 (parse _ _ _ _ _ _ _)
In ice-9/boot-9.scm:
222:17 17 (map1 ("-" "1dff1b83541ce327" "-" "2ad70"))
In ice-9/psyntax.scm:
1679:45 16 (parse _ _ _ _ _ _ _)
In ice-9/boot-9.scm:
222:17 15 (map1 ((#(ribcage () () ()) #(ribcage () () ()) #(ribcage #(unused-value) #((m-1dff1b83541ce327-29a7a top)) #("l-1dff1b83541ce327-2bce9")) #(ribcage () () ()) # …)))
In ice-9/psyntax.scm:
1484:23 14 (_ _ _)
In ice-9/boot-9.scm:
222:29 13 (map1 _)
222:17 12 (map1 ("-" "2bd28"))
In ice-9/psyntax.scm:
1789:11 11 (lp _ ())
1679:45 10 (parse _ _ _ _ _ _ _)
In ice-9/boot-9.scm:
222:17 9 (map1 ((expand-1dff1b83541ce327-2bd31) (#<tree-il (lambda ((name . expand)) (lambda-case (((body) #f #f #f () (body-1dff1b83541ce327-2bd35)) (call (lambda () (…>) …))
In ice-9/psyntax.scm:
1679:45 8 (parse _ _ _ _ _ _ _)
In ice-9/boot-9.scm:
222:17 7 (map1 ((m-1dff1b83541ce327-2bcf4 top)))
In ice-9/psyntax.scm:
1484:23 6 (_ _ _)
In ice-9/boot-9.scm:
222:17 5 (map1 (#<syntax %store-monad>))
In ice-9/psyntax.scm:
1407:23 4 (_ _)
1317:39 3 (syntax-type y (shift #(ribcage #(e) #((top)) #("l-680b775fb37a463-1343")) #(ribcage () () ()) #(ribcage #(xx) #((top)) #("l-680b775fb37a463-1340")) #(ribcage …)) # …)
916:15 2 (resolve-identifier y (#<syntax >>=> #<syntax (#<syntax mval> #<syntax mproc0>)>) (shift #(ribcage #(e) #((top)) #("l-680b775fb37a463-1343")) #(ribcage () () #) …) …)
833:21 1 (id-var-name y _ _)
669:4 0 (search y (() #(ribcage () () ()) #(ribcage () () ()) #(ribcage () () ()) #(ribcage () () ())) (top) (hygiene guile-user))
ice-9/psyntax.scm:669:4: In procedure search:
In procedure vector-ref: Wrong type argument in position 1 (expecting vector): ()
In ice-9/boot-9.scm:
222:29 19 (map1 _)
222:17 18 (map1 (#f))
In ice-9/psyntax.scm:
1789:11 17 (lp _ ())
1679:45 16 (parse _ _ _ _ _ _ _)
In ice-9/boot-9.scm:
222:17 15 (map1 (() (m-1dff1b83541ce327-8f24e top)))
In ice-9/psyntax.scm:
1679:45 14 (parse _ _ _ _ _ _ _)
In ice-9/boot-9.scm:
222:17 13 (map1 ((m-1dff1b83541ce327-8fe71 top) shift #(ribcage #(e) #((top)) #("l-680b775fb37a463-1343")) #(ribcage () () ()) #(ribcage #(xx) #((top)) #("l-680b775fb3…")) #))
In ice-9/psyntax.scm:
1409:12 12 (expand-expr _ _ _ (shift #(ribcage #(e) #((top)) #("l-680b775fb37a463-1343")) #(ribcage () () ()) #(ribcage #(xx) #((top)) #("l-680b775fb37a463-1340")) #(# # …)) # …)
2054:19 11 (_ _ _ (m-1dff1b83541ce327-8fe71 top) ())
In ice-9/boot-9.scm:
222:17 10 (map1 (#<syntax identifier?> (#<syntax syntax> #<syntax id>)))
In ice-9/psyntax.scm:
1409:12 9 (_ _)
1789:11 8 (lp _ (#(ribcage () () ()) #(ribcage #(x) #((m-1dff1b83541ce327-8f383 top)) #("l-1dff1b83541ce327-8f40b")) #(ribcage () () ()) #(ribcage () () ()) #(ribcage # …) …))
1679:45 7 (parse _ _ _ _ _ _ _)
In ice-9/boot-9.scm:
222:17 6 (map1 (#(ribcage #(x) #((m-1dff1b83541ce327-8f383 top)) #("l-1dff1b83541ce327-8f40b")) #(ribcage () () ()) shift #(ribcage #(monad body) #((top) (top)) #("…" …)) …))
In ice-9/psyntax.scm:
2702:67 5 (_ tmp-1dff1b83541ce327-8fa7a _ _)
2646:111 4 (gen-clause #<tree-il (lexical tmp tmp-1dff1b83541ce327-8db88)> () (#(ribcage () () ()) #(ribcage #(x) #((m-1dff1b83541ce327-8f383 top)) #("l-1dff1b83541ce3…")) …) …)
2607:69 3 (build-dispatch-call (("8fa7c" . 0)) "1dff1b83541ce327" #<tree-il (lexical tmp tmp-1dff1b83541ce327-8e71d)> #((m-1dff1b83541ce327-8f383 top)) (#f #f () (#) #<tr…> …))
In ice-9/boot-9.scm:
222:17 2 (map1 ("8fa7c"))
In ice-9/psyntax.scm:
2004:10 1 (gen-var _)
In unknown file:
0 (symbol->string "8fa7c")
ERROR: In procedure symbol->string:
In procedure symbol->string: Wrong type argument in position 1 (expecting symbol): "8fa7c"
--8<---------------cut here---------------end--------------->8---
Ludo’.
This bug report was last modified 4 years and 153 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.