From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@igalia.com>
Cc: help-guix@gnu.org, 27476@debbugs.gnu.org
Subject: Re: guix pull fails on powerful server
Date: Mon, 25 Sep 2017 15:03:27 +0200 [thread overview]
Message-ID: <87a81jj5gg.fsf@gnu.org> (raw)
In-Reply-To: <87k20nz18u.fsf@igalia.com> (Andy Wingo's message of "Mon, 25 Sep 2017 09:27:45 +0200")
Hi,
Andy Wingo <wingo@igalia.com> skribis:
> On Fri 22 Sep 2017 16:10, ludo@gnu.org (Ludovic Courtès) writes:
>
>> Hi Ricardo,
>>
>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>
>>> The following derivation will be built:
>>> /gnu/store/yvyfkns3w3vm7ynwbr7mvxcmin4gd2a0-guix-latest.drv
>>> copying and compiling to '/gnu/store/7m52dkr98nhwgpsx20mmpwyw2yzj58d3-guix-latest' with Guile 2.2.2...
>>> loading... 25.4% of 629 filesrandom seed for tests: 1506066913
>>> loading... 99.8% of 629 files
>>> compiling... 69.2% of 629 filesice-9/threads.scm:289:22: In procedure loop:
>>> ice-9/threads.scm:289:22: Syntax error:
>>> guix/scripts.scm:130:2: >>=: >>= (bind) used outside of 'with-monad' in form (>>= (apply set-build-options* #:use-substitutes
>>> ptions)) (lambda (unused-value) (mbegin %store-monad (mlet %store-monad ((derivation (origin->derivation (package-source pack
>>> tutes? use-substitutes? #:dry-run? dry-run?) (return (show-derivation-outputs derivation)))))))
>>
>> This was reported at <https://bugs.gnu.org/27476>, and I suspect a
>> thread-safety issue. However, syntax parameters are purely functional
>> AFAICS, so I fail to see why multithreading could be a problem.
>>
>> Andy, any idea what could be causing this?
>
> I have heard of but not seen a number of similar bugs: errors that
> "can't happen" but which appear under multiple threads. I don't know
> what underlying pattern is. Has anyone found a test case that reliably
> reproduces?
With this program:
--8<---------------cut here---------------start------------->8---
(use-modules (ice-9 threads)
(srfi srfi-1))
(define-syntax-parameter foo
(identifier-syntax +))
(define threads
(unfold (lambda (x) (> x 100))
(lambda (x)
(call-with-new-thread
(lambda ()
(while #t
(macroexpand
'(syntax-parameterize ((foo (identifier-syntax -)))
(foo y z)))))))
1+
0))
(for-each join-thread threads)
--8<---------------cut here---------------end--------------->8---
I managed to get a segfault:
--8<---------------cut here---------------start------------->8---
$ guile syntax-parms.scm
;;; note: source file /home/ludo/src/guix/syntax-parms.scm
;;; newer than compiled /home/ludo/.cache/guile/ccache/2.2-LE-8-3.A/home/ludo/src/guix/syntax-parms.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/ludo/src/guix/syntax-parms.scm
;;; compiled /home/ludo/.cache/guile/ccache/2.2-LE-8-3.A/home/ludo/src/guix/syntax-parms.scm.go
In /home/ludo/src/guix/syntax-parms.scm:
13:17 13 (_)
In ice-9/psyntax.scm:
1233:22 12 (expand-top-sequence (#(ribcage #(x) #((m-1dff1b83541ce327-7f97c #)) #) # …) …)
In ice-9/boot-9.scm:
230:17 11 (map1 (#<tree-il (lambda-case (((id) #f #f #f () (id-1dff1b83541ce327-7fb4…>))
In ice-9/psyntax.scm:
2053:19 10 (_ _ #() (foo y z) ())
In ice-9/boot-9.scm:
230:17 9 (map1 #())
In ice-9/psyntax.scm:
1408:12 8 (_ _)
1788:11 7 (lp (1) (11 0 . 0))
1678:45 6 (parse _ _ _ _ _ _ _)
In ice-9/boot-9.scm:
230:17 5 (map1 ((tmp-1dff1b83541ce327-7f98b 0 . 0)))
In ice-9/psyntax.scm:
2701:67 4 Adres-eraro
--8<---------------cut here---------------end--------------->8---
… but then I failed to reproduce it again (that was on my 4-thread
laptop).
Ludo’.
next prev parent reply other threads:[~2017-09-25 13:03 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 8:38 guix pull fails on powerful server Ricardo Wurmus
2017-09-22 14:10 ` bug#27476: " Ludovic Courtès
2017-09-25 7:27 ` Andy Wingo
2017-09-25 13:03 ` Ludovic Courtès [this message]
2017-09-25 14:02 ` Ricardo Wurmus
2017-09-30 7:59 ` Ricardo Wurmus
2017-10-03 20:29 ` Marius Bakke
2017-10-04 13:15 ` bug#27476: " Ricardo Wurmus
2017-10-04 13:15 ` Ricardo Wurmus
2017-10-03 20:29 ` bug#27476: " Marius Bakke
2017-10-04 15:09 ` Clément Lassieur
2017-10-04 15:09 ` Clément Lassieur
2017-10-04 16:17 ` bug#27476: " Ricardo Wurmus
2017-10-07 15:11 ` Ludovic Courtès
2017-10-07 15:11 ` Ludovic Courtès
2017-10-10 7:17 ` bug#27476: " Ricardo Wurmus
2017-10-10 7:17 ` Ricardo Wurmus
2017-10-10 11:32 ` Ludovic Courtès
2017-10-10 11:32 ` bug#27476: " Ludovic Courtès
2017-10-12 13:37 ` Ludovic Courtès
2017-10-13 20:29 ` Ricardo Wurmus
2017-10-13 20:29 ` Ricardo Wurmus
2017-10-13 21:04 ` Ricardo Wurmus
2017-10-13 21:10 ` Ricardo Wurmus
2017-10-12 13:37 ` Ludovic Courtès
2017-11-07 10:57 ` Ludovic Courtès
2018-04-30 21:19 ` Ludovic Courtès
2018-04-30 21:39 ` bug#27476: libguile/memoize.c is not thread safe, so syntax parameter expansion is not thread-safe Ludovic Courtès
2018-05-09 8:41 ` Andy Wingo
2018-05-09 9:23 ` Ludovic Courtès
2018-05-09 10:18 ` Andy Wingo
2019-02-06 14:48 ` Ludovic Courtès
2019-02-06 16:14 ` Andy Wingo
2019-02-06 22:09 ` Ludovic Courtès
2019-01-29 10:07 ` bug#27476: guix pull fails on powerful server Ricardo Wurmus
2019-01-29 10:07 ` Ricardo Wurmus
2017-11-07 10:57 ` Ludovic Courtès
2017-09-30 7:59 ` Ricardo Wurmus
2017-09-25 13:03 ` Ludovic Courtès
2017-09-25 8:43 ` Clément Lassieur
2017-09-25 8:43 ` bug#27476: " Clément Lassieur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a81jj5gg.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=27476@debbugs.gnu.org \
--cc=help-guix@gnu.org \
--cc=wingo@igalia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.