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-1427] Segmentation fault: 11 when compiling PromiseKit while emitting SIL function #44036

Closed
swift-ci opened this issue May 6, 2016 · 12 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software optimized only Flag: An issue whose reproduction requires optimized compilation

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented May 6, 2016

Previous ID SR-1427
Radar None
Original Reporter sega-zero (JIRA User)
Type Bug
Status Resolved
Resolution Invalid
Environment

Xcode 7.3.1 (7D1014)

Additional Detail from JIRA
Votes 13
Component/s Compiler
Labels Bug, CompilerCrash, OptimizedOnly
Assignee @swiftix
Priority Medium

md5: 1bc43f2dbdc9347e0ffcfd4e8c61c163

Issue Description:

Compiler crashes when archiving a project that uses PromiseKit. Debug schemes compiles with no errors.
Failing module: NSNotificationCenter+Promise.swift

CompileSwift normal arm64 /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift
    cd /Users/travis/build/Company/iOS/Project/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/after.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/afterlife.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/AnyPromise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/dispatch_promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/Error.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/join.swift -primary-file /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSObject+Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSURLConnection+Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSURLSession+Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/Promise+Properties.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/race.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/State.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/URLDataPromise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/when.swift -target arm64-apple-ios8.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos -F /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos -g -import-underlying-module -module-cache-path /Users/travis/Library/Developer/Xcode/DerivedData/ModuleCache -D COCOAPODS -serialize-debugging-options -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-generated-files.hmap -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-own-target-headers.hmap -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-project-headers.hmap -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/include -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Private -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Private/PromiseKit -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Public -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Public/Crashlytics -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Public/Fabric -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/DerivedSources/arm64 -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/DerivedSources -Xcc -DRELEASE=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/travis/build/Company/iOS/Project/Pods -emit-module-doc-path /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise~partial.swiftdoc -O -module-name PromiseKit -emit-module-path /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise~partial.swiftmodule -serialize-diagnostics-path /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise.dia -emit-dependencies-path /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise.d -o /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise.bc
0  swift                    0x000000010ad4166b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x000000010ad40956 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x000000010ad41ccf SignalHandler(int) + 287
3  libsystem_platform.dylib 0x00007fff8c0ad52a _sigtramp + 26
4  libsystem_platform.dylib 0x00000000000002f0 _sigtramp + 1945447904
5  swift                    0x0000000108bdd16d emitApplyArgument((anonymous namespace)::IRGenSILFunction&, swift::SILValue, swift::SILParameterInfo, swift::irgen::Explosion&) + 365
6  swift                    0x0000000108bdc971 (anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 2497
7  swift                    0x0000000108bca23b swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 9787
8  swift                    0x0000000108b255c8 swift::irgen::IRGenModuleDispatcher::emitGlobalTopLevel() + 600
9  swift                    0x0000000108bb104e performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 1278
10 swift                    0x0000000108bb14f6 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 70
11 swift                    0x0000000108a94c8c performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 15004
12 swift                    0x0000000108a9068d frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2781
13 swift                    0x0000000108a8c0ac main + 1932
14 libdyld.dylib            0x00007fff8aad75ad start + 1
15 libdyld.dylib            0x000000000000005b start + 1968343727
Stack dump:
0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/after.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/afterlife.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/AnyPromise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/dispatch_promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/Error.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/join.swift -primary-file /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSObject+Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSURLConnection+Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSURLSession+Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/Promise+Properties.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/Promise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/race.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/State.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/URLDataPromise.swift /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Sources/when.swift -target arm64-apple-ios8.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos -F /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos -g -import-underlying-module -module-cache-path /Users/travis/Library/Developer/Xcode/DerivedData/ModuleCache -D COCOAPODS -serialize-debugging-options -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-generated-files.hmap -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-own-target-headers.hmap -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-project-headers.hmap -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/include -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Private -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Private/PromiseKit -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Public -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Public/Crashlytics -Xcc -I/Users/travis/build/Company/iOS/Project/Pods/Headers/Public/Fabric -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/DerivedSources/arm64 -Xcc -I/Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/DerivedSources -Xcc -DRELEASE=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/travis/build/Company/iOS/Project/Pods -emit-module-doc-path /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise~partial.swiftdoc -O -module-name PromiseKit -emit-module-path /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise~partial.swiftmodule -serialize-diagnostics-path /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise.dia -emit-dependencies-path /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise.d -o /Users/travis/Library/Developer/Xcode/DerivedData/Project-dtaoyjhgdxdnqsdrizcxetkzcack/Build/Intermediates/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise.bc 
1.  While emitting IR SIL function @_TZFE10PromiseKitCSo20NSNotificationCenter4oncefSSCS_19NotificationPromise for 'once' at /Users/travis/build/Company/iOS/Project/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift:22:12
<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
** ARCHIVE FAILED **
@belkadan
Copy link
Contributor

belkadan commented May 6, 2016

Can you note which revision of PromiseKit you're using, so that we can reproduce this?

@swift-ci
Copy link
Collaborator Author

swift-ci commented May 6, 2016

Comment by Sergey Galezdinov (JIRA)

latest 2.2.2 release, through cocoapods. Specifying this in Podfile:

pod 'PromiseKit', :subspecs => ['Foundation']

@swift-ci
Copy link
Collaborator Author

swift-ci commented May 6, 2016

Comment by Sergey Galezdinov (JIRA)

Sorry, 3.1.1 release

@swift-ci
Copy link
Collaborator Author

Comment by Marcus Wu (JIRA)

I am also experiencing a segmentation fault with the 3.1.1 release. It compiles successfully in Debug, but fails during Archive.

I get the following stack trace:

0  swift                    0x000000011183b66b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x000000011183a956 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x000000011183bccf SignalHandler(int) + 287
3  libsystem_platform.dylib 0x00007fff8901e52a _sigtramp + 26
4  libsystem_platform.dylib 0x000000000000014c _sigtramp + 1996364860
5  swift                    0x000000010f6d716d emitApplyArgument((anonymous namespace)::IRGenSILFunction&, swift::SILValue, swift::SILParameterInfo, swift::irgen::Explosion&) + 365
6  swift                    0x000000010f6d6971 (anonymous namespace)::IRGenSILFunction::visitFullApplySite(swift::FullApplySite) + 2497
7  swift                    0x000000010f6c423b swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 9787
8  swift                    0x000000010f61f5c8 swift::irgen::IRGenModuleDispatcher::emitGlobalTopLevel() + 600
9  swift                    0x000000010f6ab04e performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 1278
10 swift                    0x000000010f6ab4f6 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 70
11 swift                    0x000000010f58ec8c performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 15004
12 swift                    0x000000010f58a68d frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2781
13 swift                    0x000000010f5860ac main + 1932
14 libdyld.dylib            0x00007fff8a9585ad start + 1
Stack dump:
0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/after.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/Foundation/afterlife.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/AnyPromise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/dispatch_promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/Error.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/join.swift -primary-file /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/Foundation/NSObject+Promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/Foundation/NSURLConnection+Promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/Foundation/NSURLSession+Promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/UIKit/PMKAlertController.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/Promise+Properties.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/Promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/race.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/State.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/UIKit/UIActionSheet+Promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/UIKit/UIAlertView+Promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/UIKit/UIView+Promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/UIKit/UIViewController+Promise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/URLDataPromise.swift /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Sources/when.swift -target arm64-apple-ios8.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/BuildProductsPath/Release-iphoneos -F /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/BuildProductsPath/Release-iphoneos -g -import-underlying-module -module-cache-path /Users/mwu/Library/Developer/Xcode/DerivedData/ModuleCache -D COCOAPODS -serialize-debugging-options -Xcc -I/Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-generated-files.hmap -Xcc -I/Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-own-target-headers.hmap -Xcc -I/Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/PromiseKit-project-headers.hmap -Xcc -I/Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/BuildProductsPath/Release-iphoneos/include -Xcc -I/Users/mwu/src/iosmobilepay-swift/Pods/Headers/Private -Xcc -I/Users/mwu/src/iosmobilepay-swift/Pods/Headers/Private/PromiseKit -Xcc -I/Users/mwu/src/iosmobilepay-swift/Pods/Headers/Public -Xcc -I/Users/mwu/src/iosmobilepay-swift/Pods/Headers/Public/CardIO -Xcc -I/Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/DerivedSources/arm64 -Xcc -I/Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/DerivedSources -Xcc -DRELEASE=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/mwu/src/iosmobilepay-swift/Pods -emit-module-doc-path /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise~partial.swiftdoc -O -module-name PromiseKit -emit-module-path /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise~partial.swiftmodule -serialize-diagnostics-path /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise.dia -emit-dependencies-path /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise.d -o /Users/mwu/Library/Developer/Xcode/DerivedData/mobilepay-flgefgsgaefgdqeiytdyktakpvsx/Build/Intermediates/ArchiveIntermediates/mobilepay/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PromiseKit.build/Objects-normal/arm64/NSNotificationCenter+Promise.bc 
1.  While emitting IR SIL function @_TZFE10PromiseKitCSo20NSNotificationCenter4oncefSSCS_19NotificationPromise for 'once' at /Users/mwu/src/iosmobilepay-swift/Pods/PromiseKit/Categories/Foundation/NSNotificationCenter+Promise.swift:22:12

@swift-ci
Copy link
Collaborator Author

Comment by Martin Redington (JIRA)

I'm seeing an identical crash to the initial reporter, compiling against PromiseKit 3.0 with Release, but not Debug configuration

@rudkx
Copy link
Member

rudkx commented May 13, 2016

I reproduced with 7.3.1. I'll see if I can narrow it down a bit.

@rudkx
Copy link
Member

rudkx commented May 13, 2016

Roman thinks this is fixed on ToT.

@swift-ci
Copy link
Collaborator Author

Comment by Eliezer Talón (JIRA)

I can reproduce this issue as well when building with optimisations enabled for Debug (e.g. -O). Normally we build with -Onone, so this problem only reveals when archiving, because it's when you switch to Release, thus enabling optimisations.

@swift-ci
Copy link
Collaborator Author

Comment by Ben Wood (JIRA)

I can also reproduce this issue, I am using version 3.2.0 of PromiseKit, Does anybody have a workaround?

@swift-ci
Copy link
Collaborator Author

Comment by John Stricker (JIRA)

Ben.Wood (JIRA User) there's some work arounds discussed at promise kit 's github. If you aren't using promise kit with notifications then you can remove the NSNotification category (this is what I did and it solved the problem for our project).

Here's a link to the Promise kit's github issue and the specific workaround I mentioned
PromiseKit issue #415

@slavapestov
Copy link
Member

Is this bug obsolete?

@swift-ci
Copy link
Collaborator Author

swift-ci commented Jun 3, 2017

Comment by Nathan Hosselton (JIRA)

@slavapestov It is no longer applicable for PromiseKit since we worked around it. So I can't speak to whether the underlying bug was fixed. I can try to resurface if it would be helpful.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 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. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software optimized only Flag: An issue whose reproduction requires optimized compilation
Projects
None yet
Development

No branches or pull requests

5 participants