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-2482] Compiler Crash on Dual Core Macs but not Quad Core Mac #45087

Closed
swift-ci opened this issue Aug 25, 2016 · 1 comment
Closed

[SR-2482] Compiler Crash on Dual Core Macs but not Quad Core Mac #45087

swift-ci opened this issue Aug 25, 2016 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-2482
Radar None
Original Reporter jeffburg@jeffburg.com (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

10.11.6
Xcode 8 beta
Swift Snapshot 8-18 toolchain
MacBook Air (Mid 2009)
2GB RAM, 128GB SSD

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

md5: dadca70d826462ca6f0be5a525e0bd9c

duplicates:

  • SR-1567 [SwiftPM] Prevent/solve issue with seeing headers in /usr/include and SDK (was: compiler crash when passing -Xcc -I/usr/include to swiftc)

Issue Description:

I'm having trouble compiling Perfect-CURL submodule of the Perfect web server. I know this Swift board is for Swift issues. But the problem appears to be the Swift compiler and not the Perfect web server codebase.

I have tried to compile this package on 3 macs. The swift compiler crashes on two of them and not on the third one and I don't know why.

Software Specs:
10.11.6
Xcode 8 beta
Swift Snapshot 8-18 toolchain

Step to perform:
git clone https://github.com/PerfectlySoft/Perfect-CURL.git
cd Perfect-CURL
swift build

Mac #​1 (Compiler Crash):
MacBook (Retina, 12-inch, Early 2016)
8GB RAM, 512 SSD

Mac #​2 (Compiler Crash):
MacBook Air (Mid 2009)
2GB RAM, 128GB SSD

Mac #​3 (Build Succeeded):
MacBook Pro (Retina, 15-inch, Mid 2015)
16GB RAM, 512 SSD

Crash Output:
jeffreybergier@Pinkinium ~/U/Perfect-CURL> swift --version
Apple Swift version 3.0-dev (LLVM 17c4c6cf7a, Clang 4ca9e01a7c, Swift 31bbb2c)
Target: x86_64-apple-macosx10.9
jeffreybergier@Pinkinium ~/U/Perfect-CURL> swift build -v
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swiftc --driver-mode=swift -I /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/lib/swift/pm -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/lib/swift/pm -lPackageDescription -target x86_64-apple-macosx10.10 /Users/jeffreybergier/Unsynced/Perfect-CURL/Package.swift -fileno 3
/usr/bin/git -C /Users/jeffreybergier/Unsynced/Perfect-CURL/Packages/cURL-0.5.0 config --get remote.origin.url
/usr/bin/git -C /Users/jeffreybergier/Unsynced/Perfect-CURL/Packages/PerfectThread-0.14.0 config --get remote.origin.url
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swiftc --driver-mode=swift -I /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/lib/swift/pm -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/lib/swift/pm -lPackageDescription -target x86_64-apple-macosx10.10 /Users/jeffreybergier/Unsynced/Perfect-CURL/Packages/cURL-0.5.0/Package.swift -fileno 3
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swiftc --driver-mode=swift -I /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/lib/swift/pm -L /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/lib/swift/pm -lPackageDescription -target x86_64-apple-macosx10.10 /Users/jeffreybergier/Unsynced/Perfect-CURL/Packages/PerfectThread-0.14.0/Package.swift -fileno 3
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swift-build-tool -f /Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug.yaml -v
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swiftc -module-name PerfectCURL -incremental -emit-dependencies -emit-module -emit-module-path /Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURL.swiftmodule -output-file-map /Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURL.build/output-file-map.json -parse-as-library -num-threads 8 -c /Users/jeffreybergier/Unsynced/Perfect-CURL/Sources/cURL.swift -I /Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug -j8 -D SWIFT_PACKAGE -Onone -g -enable-testing -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -Xcc -fmodule-map-file=/Users/jeffreybergier/Unsynced/Perfect-CURL/Packages/cURL-0.5.0/module.modulemap -Xcc -I/usr/include -L/usr/lib -lcurl -module-cache-path /Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/ModuleCache
Assertion failed: ((ID || !Mod) && "asked for module ID for non-local, non-imported module"), function getSubmoduleID, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/llvm/tools/clang/lib/Serialization/ASTWriter.cpp, line 2376.
0 swift 0x000000010687f30b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 swift 0x000000010687e556 llvm::sys::RunSignalHandlers() + 70
2 swift 0x000000010687fa5f SignalHandler(int) + 383
3 libsystem_platform.dylib 0x00007fff8f77152a _sigtramp + 26
4 libsystem_platform.dylib 0x0000000000000008 _sigtramp + 1888021240
5 swift 0x000000010687f7ae abort + 14
6 swift 0x000000010687f791 __assert_rtn + 81
7 swift 0x0000000104b541a3 clang::ASTWriter::WritePreprocessor(clang::Preprocessor const&, bool) + 5971
8 swift 0x0000000104b6c6de clang::ASTWriter::WriteASTCore(clang::Sema&, llvm::StringRef, std::_1::basic_string<char, std::1::char_traits, std::_1::allocator > const&, clang::Module*) + 9230
9 swift 0x0000000104b6a282 clang::ASTWriter::WriteAST(clang::Sema&, std::_1::basic_string<char, std::1::char_traits, std::_1::allocator > const&, clang::Module*, llvm::StringRef, bool) + 642
10 swift 0x0000000104ba59ac clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&) + 124
11 swift 0x00000001049c751c clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 44
12 swift 0x0000000104bb3055 clang::ParseAST(clang::Sema&, bool, bool) + 581
13 swift 0x000000010498bf69 clang::FrontendAction::Execute() + 73
14 swift 0x0000000104958ff1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1073
15 swift 0x000000010680e3fb llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 283
16 swift 0x000000010680e5c0 RunSafelyOnThread_Dispatch(void*) + 48
17 swift 0x00000001068809fd ExecuteOnThread_Dispatch(void*) + 13
18 libsystem_pthread.dylib 0x00007fff8f73e99d _pthread_body + 131
19 libsystem_pthread.dylib 0x00007fff8f73e91a _pthread_body + 0
20 libsystem_pthread.dylib 0x00007fff8f73c351 thread_start + 13
Stack dump:
0. parser at end of file
:0: error: unable to execute command: Illegal instruction: 4
:0: error: compile command failed due to signal (use -v to see invocation)
:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swift-build-tool -f /Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug.yaml -v

YAML Output:
client:
name: swift-build
tools: {}
targets:
"test": ["<PerfectThread.module>","<PerfectCURL.module>","<PerfectCURLTests.module>","<PerfectCURLPackageTests.test>"]
"main": ["<PerfectThread.module>","<PerfectCURL.module>"]
default: "main"
commands:
"<PerfectThread.module>":
tool: swift-compiler
executable: "/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swiftc"
module-name: "PerfectThread"
module-output-path: "/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.swiftmodule"
inputs: []
outputs: ["<PerfectThread.module>","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.build/Threading.swift.o","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.build/ThreadQueue.swift.o"]
import-paths: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug"]
temps-path: "/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.build"
objects: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.build/Threading.swift.o","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.build/ThreadQueue.swift.o"]
other-args: ["-j8","-D","SWIFT_PACKAGE","-Onone","-g","-enable-testing","-F","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks","-target","x86_64-apple-macosx10.10","-sdk","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk","-module-cache-path","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/ModuleCache"]
sources: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/Packages/PerfectThread-0.14.0/Sources/Threading.swift","/Users/jeffreybergier/Unsynced/Perfect-CURL/Packages/PerfectThread-0.14.0/Sources/ThreadQueue.swift"]
is-library: true
enable-whole-module-optimization: false
num-threads: "8"
"<PerfectCURL.module>":
tool: swift-compiler
executable: "/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swiftc"
module-name: "PerfectCURL"
module-output-path: "/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURL.swiftmodule"
inputs: ["<cURL.module>","<PerfectThread.module>"]
outputs: ["<PerfectCURL.module>","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURL.build/cURL.swift.o"]
import-paths: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug"]
temps-path: "/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURL.build"
objects: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURL.build/cURL.swift.o"]
other-args: ["-j8","-D","SWIFT_PACKAGE","-Onone","-g","-enable-testing","-F","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks","-target","x86_64-apple-macosx10.10","-sdk","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk","-Xcc","-fmodule-map-file=/Users/jeffreybergier/Unsynced/Perfect-CURL/Packages/cURL-0.5.0/module.modulemap","-Xcc","-I/usr/include","-L/usr/lib","-lcurl","-module-cache-path","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/ModuleCache"]
sources: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/Sources/cURL.swift"]
is-library: true
enable-whole-module-optimization: false
num-threads: "8"
"<PerfectCURLTests.module>":
tool: swift-compiler
executable: "/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swiftc"
module-name: "PerfectCURLTests"
module-output-path: "/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURLTests.swiftmodule"
inputs: ["<cURL.module>","<PerfectThread.module>","<PerfectCURL.module>"]
outputs: ["<PerfectCURLTests.module>","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURLTests.build/PerfectCURLTests.swift.o"]
import-paths: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug"]
temps-path: "/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURLTests.build"
objects: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURLTests.build/PerfectCURLTests.swift.o"]
other-args: ["-j8","-D","SWIFT_PACKAGE","-Onone","-g","-enable-testing","-F","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks","-target","x86_64-apple-macosx10.10","-sdk","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk","-Xcc","-fmodule-map-file=/Users/jeffreybergier/Unsynced/Perfect-CURL/Packages/cURL-0.5.0/module.modulemap","-Xcc","-I/usr/include","-L/usr/lib","-lcurl","-module-cache-path","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/ModuleCache"]
sources: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/Tests/PerfectCURLTests/PerfectCURLTests.swift"]
is-library: true
enable-whole-module-optimization: false
num-threads: "8"
"<PerfectCURLPackageTests.test>":
tool: shell
description: "Linking ./.build/debug/PerfectCURLPackageTests.xctest/Contents/MacOS/PerfectCURLPackageTests"
inputs: ["/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURLTests.build/PerfectCURLTests.swift.o","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.build/Threading.swift.o","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.build/ThreadQueue.swift.o","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURL.build/cURL.swift.o"]
outputs: ["<PerfectCURLPackageTests.test>","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURLPackageTests.xctest/Contents/MacOS/PerfectCURLPackageTests"]
args: ["/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-08-18-a.xctoolchain/usr/bin/swiftc","-target","x86_64-apple-macosx10.10","-sdk","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk","-g","-L/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug","-o","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURLPackageTests.xctest/Contents/MacOS/PerfectCURLPackageTests","-F","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks","-module-name","PerfectCURLPackageTests","-Xlinker","-bundle","-F","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks","-Xcc","-I/usr/include","-L/usr/lib","-lcurl","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURLTests.build/PerfectCURLTests.swift.o","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.build/Threading.swift.o","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectThread.build/ThreadQueue.swift.o","/Users/jeffreybergier/Unsynced/Perfect-CURL/.build/debug/PerfectCURL.build/cURL.swift.o"]

@belkadan
Copy link
Contributor

See discussion in SR-1567.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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.
Projects
None yet
Development

No branches or pull requests

2 participants