bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe

2019-02-06 Thread Ludovic Courtès
Hi! Andy Wingo skribis: > To be clear, here's the series of events. Firstly, know that defining a > syntax parameter is like: Thanks for the clear explanation! >> So I came up with ‘define-syntax-parameter-once’, which is like >> ‘define-once’ but for syntax parameters (note that we can’t use

bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe

2019-02-06 Thread Andy Wingo
Hi! On Wed 06 Feb 2019 15:48, Ludovic Courtès writes: > I drew the conclusion that our syntax parameter is redefined when we > compile or when we load (guix monads), so there’s a chance that we get > to see the wrong value when we expand (guix monads) (I’m not entirely > sure about the exact seq

bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe

2019-02-06 Thread Ludovic Courtès
Hello Andy! Since guix-core.drv is the best reproducer I have so far for this syntax parameter crash, I modified (guix self) to print the name of the files it’s compiling, and here’s the crash I got (on a 24-core machine): --8<---cut here---start->8--- building

bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe

2018-05-09 Thread Andy Wingo
On Wed 09 May 2018 11:23, l...@gnu.org (Ludovic Courtès) writes: >> Is the memoization you are referring to the "set!" in the "lazy" form in >> ice-9/eval.scm ? Or something else? FWIW I would not think the "set!" >> could be the issue, at least on x86, but who knows. > > Actually I’m not sure e

bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe

2018-05-09 Thread Ludovic Courtès
Hello Andy! Andy Wingo skribis: > On Mon 30 Apr 2018 23:39, l...@gnu.org (Ludovic Courtès) writes: > >> So the problem, AIUI, is that psyntax evaluates syntax parameters using >> ‘primitive-eval’ (via ‘eval-local-transformer’), but memoization in >> (ice-9 eval) is not thread-safe, hence the ran

bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe

2018-05-09 Thread Andy Wingo
Hi, On Mon 30 Apr 2018 23:39, l...@gnu.org (Ludovic Courtès) writes: > So the problem, AIUI, is that psyntax evaluates syntax parameters using > ‘primitive-eval’ (via ‘eval-local-transformer’), but memoization in > (ice-9 eval) is not thread-safe, hence the random crashes. Sorry I've been a bit

bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe

2018-04-30 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) skribis: > With Guile 2.2.3 a similar program triggers a crash very quickly: Even simpler: --8<---cut here---start->8--- $ guile ../guile-debugging/syntax-parms.scm ;;; note: source file /home/ludo/src/guix/../guile-debugging/sy