* [PATCH] doc: sequentialize calls to sphinx-build
@ 2019-03-03 20:40 David Bremner
2019-03-05 2:45 ` Matt Armstrong
0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2019-03-03 20:40 UTC (permalink / raw)
To: notmuch
In certain conditions the parallel calls to sphinx-build could
collide, yielding a crash like
Exception occurred:
File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 1261, in get_doctree
doctree = pickle.load(f)
EOFError: Ran out of input
---
I first observed this on Debian/ppc64le. There it occured about 1 in
50 builds. Thanks to Olly Betts for pointing me in the right
direction.
doc/Makefile.local | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/Makefile.local b/doc/Makefile.local
index 16459e35..eed243a0 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -37,6 +37,13 @@ INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
%.gz: %
rm -f $@ && gzip --stdout $^ > $@
+# Sequentialize the calls to sphinx-build to avoid races with
+# reading/writing state.
+
+sphinx-html: | $(DOCBUILDDIR)/.roff.stamp
+sphinx-texinfo: | sphinx-html
+sphinx-info: | sphinx-texinfo
+
sphinx-html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] doc: sequentialize calls to sphinx-build
2019-03-03 20:40 [PATCH] doc: sequentialize calls to sphinx-build David Bremner
@ 2019-03-05 2:45 ` Matt Armstrong
0 siblings, 0 replies; 2+ messages in thread
From: Matt Armstrong @ 2019-03-05 2:45 UTC (permalink / raw)
To: David Bremner, notmuch
I had never seen this make syntax before so think it might be a bit
mysterious for the next person coming along. I dug up the reference.
The GNU make info pages call them "order-only" prerequisites. I might
comment this as:
# Prevent sphinx-build from running in parallel by using "order-only"
# prerequisites. This avoids races when sphinx-build reads and writes
# cached state.
David Bremner <david@tethera.net> writes:
> In certain conditions the parallel calls to sphinx-build could
> collide, yielding a crash like
>
> Exception occurred:
> File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 1261, in get_doctree
> doctree = pickle.load(f)
> EOFError: Ran out of input
> ---
>
> I first observed this on Debian/ppc64le. There it occured about 1 in
> 50 builds. Thanks to Olly Betts for pointing me in the right
> direction.
>
> doc/Makefile.local | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/doc/Makefile.local b/doc/Makefile.local
> index 16459e35..eed243a0 100644
> --- a/doc/Makefile.local
> +++ b/doc/Makefile.local
> @@ -37,6 +37,13 @@ INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
> %.gz: %
> rm -f $@ && gzip --stdout $^ > $@
>
> +# Sequentialize the calls to sphinx-build to avoid races with
> +# reading/writing state.
> +
> +sphinx-html: | $(DOCBUILDDIR)/.roff.stamp
> +sphinx-texinfo: | sphinx-html
> +sphinx-info: | sphinx-texinfo
> +
> sphinx-html:
> $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
>
> --
> 2.20.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-05 2:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-03 20:40 [PATCH] doc: sequentialize calls to sphinx-build David Bremner
2019-03-05 2:45 ` Matt Armstrong
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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).