Project

General

Profile

Actions

Bug #15276

closed

cython build can race on creation of CYTHON_BUILD_DIR

Added by Dan Mick about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
build
Target version:
-
% Done:

0%

Source:
Development
Tags:
arm64
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.

Actions #1

Updated by Loïc Dachary about 8 years ago

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

Actions #2

Updated by Loïc Dachary about 8 years ago

  • Tags set to arm64
Actions #3

Updated by Dan Mick about 8 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.

Actions #4

Updated by Dan Mick about 8 years ago

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

Updated by Dan Mick about 8 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF