Project

General

Profile

Bug #15276

cython build can race on creation of CYTHON_BUILD_DIR

Added by Dan Mick over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
build
Target version:
-
Start date:
03/25/2016
Due date:
% Done:

0%

Source:
Development
Tags:
arm64
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

Noticed while building on arm64, but may apply elsewhere: Got this failure:

Traceback (most recent call last):
  File "./setup.py", line 47, in <module>
    ], build_dir=os.environ.get("CYTHON_BUILD_DIR", None)),
  File "/usr/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 796, in cythonize
    os.makedirs(dir)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/tmp/buildd/ceph-10.1.0/src/build'
Makefile:32318: recipe for target 'rados-pybind-all' failed

The issue is that /tmp/buildd/ceph-10.1.0/src/build, which is CYTHON_BUILD_DIR, is used for all three pybind builds, and if they're executing simultaneously, they can race on "is directory present, if not, create it".

Josh says that top-of-tree Cython now has a 'safe_makedirs' call there, but at least with this version (0.23.4-0ubuntu5 on arm64/xenial) it's still an issue.

Josh also suggests that doing the mkdir before calling setup.py would be a workaround, and that seems low-cost.

History

#1 Updated by Loic Dachary over 3 years ago

FWIW make -j8 on arm64 Ubuntu 14.04.1 does not exhibit this problem

#2 Updated by Loic Dachary over 3 years ago

  • Tags set to arm64

#3 Updated by Dan Mick over 3 years ago

Yes, I can't figure out what's different about the arm64 build, but it seems frighteningly reproducible ATM. Clearly it's not affecting any of the other upstream builds.

#4 Updated by Dan Mick over 3 years ago

  • Status changed from New to In Progress
  • Assignee set to Dan Mick

#5 Updated by Dan Mick over 3 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF