Skip to content
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

[SR-1629] build-script freezes when using Python installed via Homebrew #44238

Open
jtbandes opened this issue May 27, 2016 · 0 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build-script Area → utils: The build script

Comments

@jtbandes
Copy link
Collaborator

Previous ID SR-1629
Radar None
Original Reporter @jtbandes
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, BuildScript
Assignee None
Priority Medium

md5: 0e5ea92f8a215a4db63a74faf7d82438

Issue Description:

Environment

$ git log --oneline -n1
87d73e9 Merge pull request #​2708 from jckarter/bridging-objc-generic-containers

$ ls -l $(which python)
lrwxr-xr-x  1 Jacob  admin  34 May 26 19:14 /usr/local/bin/python -> ../Cellar/python/2.7.11/bin/python

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.5
BuildVersion:   15F34

$ plutil -p $(xcode-select --print-path)/../../Contents/version.plist
{
  "CFBundleShortVersionString" => "7.3.1"
  "BuildVersion" => "3"
  "ProductBuildVersion" => "7D1012"
  "ProjectName" => "IDEFrameworks"
  "SourceVersion" => "10188000000000000"
  "CFBundleVersion" => "10188"
}

Steps to reproduce

1. Install Python via Homebrew: brew install python
2. Run build-script -x (starting with a clean tree; or also add -c)

Observed

  • The build proceeds for a while, but eventually freezes with all 8 workers sitting in Python processes (see attached screenshot).

  • Pressing ⌃C and re-running build-script -x will often freeze at a slightly different command, but it's always a gyb line (line breaks are my own addition):

    cd /Users/Jacob/Development/swift/swift/stdlib/public/core && \
    /Users/Jacob/Development/swift/swift/utils/gyb --test \
    -DunicodeGraphemeBreakPropertyFile=/Users/Jacob/Development/swift/swift/utils/UnicodeData/GraphemeBreakProperty.txt \
    -DunicodeGraphemeBreakTestFile=/Users/Jacob/Development/swift/swift/utils/UnicodeData/GraphemeBreakTest.txt \
    -DCMAKE_SIZEOF_VOID_P=8 \
    -o /Users/Jacob/Development/swift/build/Xcode-DebugAssert/swift-macosx-x86_64/stdlib/public/core/8/Indices.swift.tmp \
    Indices.swift.gyb
    
  • Breaking with ⌃C results in this stack trace:

    ^C** BUILD INTERRUPTED **
    Traceback (most recent call last):
      File "utils/build-script", line 1444, in <module>
        sys.exit(main())
      File "utils/build-script", line 1440, in main
        return main_normal()
      File "utils/build-script", line 1398, in main_normal
        disable_sleep=True)
      File "/Users/Jacob/Development/swift/swift/utils/SwiftBuildSupport.py", line 86, in check_call
        return subprocess.check_call(args)
      File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
        retcode = call(*popenargs, **kwargs)
      File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
        return Popen(*popenargs, **kwargs).wait()
      File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1384, in wait
        pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
      File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
        return func(*args)
    KeyboardInterrupt
    
  • Manually running the above gyb command from a shell seems to succeed.

Workaround

Running brew unlink python to revert to the system version of Python seems to resolve the issue.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build-script Area → utils: The build script
Projects
None yet
Development

No branches or pull requests

1 participant