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-9190] DESERIALIZATION FAILURE: While deserializing SIL function #51681

Open
swift-ci opened this issue Nov 5, 2018 · 3 comments
Open

[SR-9190] DESERIALIZATION FAILURE: While deserializing SIL function #51681

swift-ci opened this issue Nov 5, 2018 · 3 comments

Comments

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Nov 5, 2018

Previous ID SR-9190
Radar rdar://problem/45961669
Original Reporter calebkleveter (JIRA User)
Type Bug

Attachment: Download

Environment

Apple Swift version 4.2.1 (swift-4.2.1-RELEASE)
Target: x86_64-apple-darwin18.0.0

swiftenv 1.4.0

macOS 10.14 (18A391)

Xcode 10.1 (10B61)

zsh 5.5.1 (x86_64-apple-darwin17.5.0)

Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, CompilerCrash, SILSerialization
Assignee None
Priority Medium

md5: 49eadefb7d9498d2aed33ddd97ed53c8

Issue Description:

Compile Swift Module 'App' (31 sources)
<unknown>:0: error: fatal error encountered while reading from module 'App'; please file a bug report with your project and the crash log

*** DESERIALIZATION FAILURE (please include this section in any bug report) ***
result not found
Cross-reference to module 'App'
... Order
... in an extension in module 'App'
... Payment
... in an extension in module 'App'
... ID

0  swift                    0x0000000110035208 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x0000000110034467 llvm::sys::RunSignalHandlers() + 39
2  swift                    0x0000000110035882 SignalHandler(int) + 258
3  libsystem_platform.dylib 0x00007fff7ec39b3d _sigtramp + 29
4  libsystem_platform.dylib 0x00007fee623391d0 _sigtramp + 3815765680
5  libsystem_c.dylib        0x00007fff7eaf81c9 abort + 127
6  swift                    0x000000010d7bd300 swift::ModuleFile::getModuleFileForDelayedActions() + 0
7  swift                    0x000000010d7d7800 swift::ModuleFile::finishNormalConformance(swift::NormalProtocolConformance*, unsigned long long) + 5664
8  swift                    0x000000010dadead6 swift::NormalProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*, swift::SubstOptions) const + 70
9  swift                    0x000000010dade95e swift::ProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*, swift::SubstOptions) const + 286
10 swift                    0x000000010dade278 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*, swift::SubstOptions) const + 104
11 swift                    0x000000010daf9b19 getMemberForBaseType(llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::Type, swift::Type, swift::AssociatedTypeDecl*, swift::Identifier, swift::SubstOptions) + 1257
12 swift                    0x000000010daff96a llvm::Optional<swift::Type> llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>::callback_fn<substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions)::$_19>(long, swift::TypeBase*) + 1482
13 swift                    0x000000010dafba1d swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const + 237
14 swift                    0x000000010daf9d89 substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions) + 281
15 swift                    0x000000010daff7fd llvm::Optional<swift::Type> llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>::callback_fn<substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions)::$_19>(long, swift::TypeBase*) + 1117
16 swift                    0x000000010dafba1d swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const + 237
17 swift                    0x000000010daf9d89 substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions) + 281
18 swift                    0x000000010daf9112 swift::Type::subst(llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>, swift::SubstOptions) const + 130
19 swift                    0x000000010d50bec4 (anonymous namespace)::SILTypeSubstituter::visitType(swift::CanType) + 116
20 swift                    0x000000010d50b86f swift::CanTypeVisitor<(anonymous namespace)::SILTypeSubstituter, swift::CanType>::visit(swift::CanType) + 95
21 swift                    0x000000010d5069e1 (anonymous namespace)::SILTypeSubstituter::substSILFunctionType(swift::CanTypeWrapper<swift::SILFunctionType>) + 673
22 swift                    0x000000010d5066f7 swift::SILFunctionType::substGenericArgs(swift::SILModule&, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolType*)>) + 71
23 swift                    0x000000010d506668 swift::SILFunctionType::substGenericArgs(swift::SILModule&, swift::SubstitutionMap const&) + 56
24 swift                    0x000000010d5065a6 swift::SILFunctionType::substGenericArgs(swift::SILModule&, llvm::ArrayRef<swift::Substitution>) + 54
25 swift                    0x000000010d585c59 swift::SILType::substGenericArgs(swift::SILModule&, llvm::ArrayRef<swift::Substitution>) const + 41
26 swift                    0x000000010d535ced swift::TryApplyInst::create(swift::SILDebugLocation, swift::SILValue, llvm::ArrayRef<swift::Substitution>, llvm::ArrayRef<swift::SILValue>, swift::SILBasicBlock*, swift::SILBasicBlock*, swift::SILFunction&, swift::SILOpenedArchetypesState&, swift::GenericSpecializationInformation const*) + 77
27 swift                    0x000000010d7f0ab0 swift::SILDeserializer::readSILInstruction(swift::SILFunction*, swift::SILBasicBlock*, swift::SILBuilder&, unsigned int, llvm::SmallVectorImpl<unsigned long long>&) + 48640
28 swift                    0x000000010d7e3442 swift::SILDeserializer::readSILFunctionChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, swift::SILFunction*, llvm::StringRef, bool, bool) + 6258
29 swift                    0x000000010d7f4c81 swift::SILDeserializer::getAllSILFunctions() + 625
30 swift                    0x000000010d8765af swift::SerializedSILLoader::getAllForModule(swift::Identifier, swift::FileUnit*) + 127
31 swift                    0x000000010c867294 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 12868
32 swift                    0x000000010c863042 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2946
33 swift                    0x000000010c81de08 main + 1128
34 libdyld.dylib            0x00007fff7ea50085 start + 1
35 libdyld.dylib            0x0000000000000072 start + 2170224622
Stack dump:
0.  Program arguments: /Library/Developer/Toolchains/swift-4.2.1-RELEASE.xctoolchain/usr/bin/swift -frontend -merge-modules -emit-module /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/OrderService~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/ProductManager~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/app~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/boot~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/commands~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/configure~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/databases~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/migrations~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/routes~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/AddressContent~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/ItemContent~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/OrderContent~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/PaymentGenerationContent~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/AccountSettingController~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/OrderController~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Account~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/AccountSetting~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Address~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Item~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Order+Payment~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Order+PaymentStatus~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Order+Status~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Order~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Product~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/User~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Currency~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Order+PaymentRepresentable~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/PayPal~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Stripe~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/VersionedCollection~partial.swiftmodule /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.build/Optionals~partial.swiftmodule -parse-as-library -sil-merge-partial-modules -disable-diagnostic-passes -disable-sil-perf-optzns -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/swift-nio.git-1082965977805871706/Sources/CNIOZlib/include -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/swift-nio.git-1082965977805871706/Sources/CNIOHTTPParser/include -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/swift-nio-ssl.git-8973514156742599447/Sources/CNIOOpenSSL/include -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/crypto.git--3390571419733429973/Sources/CCryptoOpenSSL/include -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/crypto.git--3390571419733429973/Sources/CBcrypt/include -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/crypto.git--3390571419733429973/Sources/CBase32/include -I /usr/local/Cellar/libressl/2.7.4/include -I /usr/local/Cellar/libressl/2.7.4/include -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/swift-nio.git-1082965977805871706/Sources/CNIOSHA1/include -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/swift-nio.git-1082965977805871706/Sources/CNIOAtomics/include -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/swift-nio.git-1082965977805871706/Sources/CNIODarwin/include -I /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/swift-nio.git-1082965977805871706/Sources/CNIOLinux/include -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/ModuleCache -swift-version 4 -Onone -D SWIFT_PACKAGE -D DEBUG -color-diagnostics -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/CCryptoOpenSSL.build/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/crypto.git--3390571419733429973/Sources/CBcrypt/include/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/crypto.git--3390571419733429973/Sources/CBase32/include/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/swift-nio-ssl-support.git--650619878008637674/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap -Xcc -fmodule-map-file=/Users/calebkleveter/Development/Skelpo/OrderSystem/.build/checkouts/swift-nio-zlib-support.git--7300948816109568019/module.modulemap -emit-module-doc-path /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.swiftdoc -module-name App -o /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/x86_64-apple-macosx10.10/debug/App.swiftmodule
1.  While deserializing SIL function "$S3App5OrderC7PaymentC6Fluent5ModelAafGP14willSoftDelete2on3NIO15EventLoopFutureCyxG8Database_10ConnectionQZ_tKFTW"
2.  While reading from 'App'
3.  While finishing conformance for type 'Order.Payment'
4.  While ... to 'Model' in module 'Fluent'
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: merge-module command failed due to signal 6 (use -v to see invocation)
error: terminated(1): /Library/Developer/Toolchains/swift-4.2.1-RELEASE.xctoolchain/usr/bin/swift-build-tool -f /Users/calebkleveter/Development/Skelpo/OrderSystem/.build/debug.yaml main output:

This crash should be reproducible with this project at the linked to commit.

The crash only occurs when the app is compiled from the command-line.

@belkadan
Copy link
Contributor

@belkadan belkadan commented Nov 6, 2018

Thanks!

@swift-ci create

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented Oct 28, 2019

Comment by Ky (JIRA)

I'm having this same issue with:

Xcode Version 11.1 (11A1027)
macOS 10.14.6 (18G95)
Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
Target: x86_64-apple-darwin18.7.0

@belkadan
Copy link
Contributor

@belkadan belkadan commented Oct 28, 2019

Can you file a new bug and attach your project? It's very likely to be a different 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
Projects
None yet
Development

No branches or pull requests

2 participants