-
-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
homebrew: docbuild crashes, libtcl AtForkPrepare - from sage.misc.cython globals / multiprocessing #31344
Comments
comment:1
Bisecting |
comment:2
For some reason, this line: |
New commits:
|
Author: Matthias Koeppe |
Commit: |
comment:5
Easiest to test on #31335, which merges this branch |
comment:6
With #31335, I still see a failure during docbuilding when using homebrew's Python with Big Sur. The failure now appears when building
|
comment:7
Thanks for testing! I'll try a clean rebuild of the documentation and see if I can reproduce it on Catalina as well. For reference, the trick for bisecting was to use
the first |
comment:8
OK, I can reproduce it |
comment:9
reducing
|
comment:10
That's in an incremental docbuild - so something bad must have been saved in the inventory. |
comment:11
When I saw the original problem, I only saw it on the second pass through the ref manual build, which is consistent with seeing problems based on something in the inventory. |
comment:12
Does anyone know why
fails at thematic_tutorial but
works? |
comment:13
In fact, after
failed, I tried building thematic_tutorial by itself. That worked, and then make doc says it was successful. |
comment:14
I think the bug is triggered by the parallelization code in |
comment:16
see also #31289 |
comment:17
In any case, I think this ticket is an improvement by itself, as it removes some accidental globals from the module |
comment:19
With this change, the documentation builds for me (but of course it is missing a plot): diff --git a/src/doc/en/thematic_tutorials/vector_calculus/vector_calc_cartesian.rst b/src/doc/en/thematic_tutorials/vector_calculus/vector_calc_cartesian.rst
index 9faa9f2375..bc77d72e68 100644
--- a/src/doc/en/thematic_tutorials/vector_calculus/vector_calc_cartesian.rst
+++ b/src/doc/en/thematic_tutorials/vector_calculus/vector_calc_cartesian.rst
@@ -94,7 +94,6 @@ Vector fields can be plotted::
E = EuclideanSpace(3)
x, y, z = E.default_chart()[:]
v = E.vector_field(-y, x, sin(x*y*z), name='v')
- sphinx_plot(v.plot(max_range=1.5, scale=0.5))
For customizing the plot, see the list of options in the documentation of
:meth:`~sage.manifolds.differentiable.vectorfield.VectorField.plot`. |
comment:20
This does not seem to help on my machine |
comment:21
Sorry, it turns out that it doesn't consistently help on mine, either. I think this should stop the non-reference manual docs from being built in parallel: diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py
index b07e9c100c..1d4139555e 100644
--- a/src/sage_setup/docbuild/__init__.py
+++ b/src/sage_setup/docbuild/__init__.py
@@ -286,13 +286,15 @@ class DocBuilder(object):
from .utils import build_many as _build_many
-def build_many(target, args):
+def build_many(target, args, processes=None):
"""
Thin wrapper around `sage_setup.docbuild.utils.build_many` which uses the
docbuild settings ``NUM_THREADS`` and ``ABORT_ON_ERROR``.
"""
+ if processes is None:
+ processes = NUM_THREADS
try:
- _build_many(target, args, processes=NUM_THREADS)
+ _build_many(target, args, processes=processes)
except BaseException as exc:
if ABORT_ON_ERROR:
raise
@@ -349,7 +351,7 @@ class AllBuilder(object):
# build the other documents in parallel
L = [(doc, name, kwds) + args for doc in others]
- build_many(build_other_doc, L)
+ build_many(build_other_doc, L, 1)
logger.warning("Elapsed time: %.1f seconds."%(time.time()-start))
logger.warning("Done building the documentation!") |
comment:22
#31289 doesn't seem to help, by the way. |
comment:23
Perhaps conditionalize this change on macOS? |
comment:24
I've pushed this change to the branch of #31335, but it does not actually fix the problem for me. I'll try next if replacing the |
comment:25
(retracted) |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:28
This fixes the problem on my machine. Please test on Big Sur |
Changed author from Matthias Koeppe to Matthias Koeppe, John Palmieri |
comment:31
Worked for me on Big Sur |
Reviewer: John Palmieri |
comment:33
Thanks! |
comment:34
this fixed the docbuild crash on my Big Sur bix too |
comment:35
On macOS 10.14.6: dochtml builds with this, while it does not with 9.3.beta7 or #31419. |
Changed branch from u/mkoeppe/homebrew__docbuild_crashes__libtcl_atforkprepare to |
(from #31335, reported in https://groups.google.com/g/sage-devel/c/9EMs9h2i_H4)
CC: @jhpalmieri @zlscherr @kiwifb @kliem
Component: build
Author: Matthias Koeppe, John Palmieri
Branch/Commit:
b4ceee5
Reviewer: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/31344
The text was updated successfully, but these errors were encountered: