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
Race condition when upgrading python #26083
Comments
comment:1
Opinions? |
This comment has been minimized.
This comment has been minimized.
comment:3
Duplicate of #18438? |
comment:4
I'll have to check out Volker's branch there. Something like |
comment:5
I'm seeing this rather frequently now. The race was there for a long time but its getting more likely to hit. |
comment:7
IF we're going to close this ticket (which is fine) the milestone / priority on the existing ticket should also be updated, and maybe link to this ticket which I believe adds more context. |
I've encountered a race condition a couple times when doing a build on Cygwin where, for one reason or other, the python2 package gets upgraded (or python3 if
--with-python=3
). The error occurs in another package that is being built at the same time, I think when it tries to run thesage-flock
command (which invokes/usr/bin/env python
). That's also why I've only seen this on Cygwin--it's only on Cygwin thatsage-flock
is being invoked at the end of each package install.Update: I have also now seen this on Linux too. It can also happen because
sage-spkg-uninstall
andsage-download-file
use Python, among others. Any program use bysage-spkg
that uses Python can break if it's called in the middle of upgrading or installing the Python in Sage.The error ends up looking something like this:
It says "Successfully installed" but then make exits with an error shortly thereafter.
The problem is that although ppl itself does not have a dependency on Python,
sage-spkg
itself does. But the python2 files are still in the process of being copied over. Thebin/python
has been copied, but not all of the stdlib, so thatbin/python
is broken.I believe there are a few things that should be done about this. First of all, putting a lock around all modifications to
$SAGE_LOCAL
, as discussed in #26018 comment:10 might help.But I've mentioned in the context of other tickets that the build system itself should always stick to using the system python explicitly, and that Sage's Python should only be invoked explicitly in specific
spkg-installs
that need to build against the Sage Python.CC: @jdemeyer
Component: build
Issue created by migration from https://trac.sagemath.org/ticket/26083
The text was updated successfully, but these errors were encountered: