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-13800] Xcode12 fails with Segmentation fault 11 #56197

Closed
swift-ci opened this issue Oct 31, 2020 · 2 comments
Closed

[SR-13800] Xcode12 fails with Segmentation fault 11 #56197

swift-ci opened this issue Oct 31, 2020 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-13800
Radar rdar://problem/70934035
Original Reporter edias (JIRA User)
Type Bug
Status Closed
Resolution Cannot Reproduce
Environment

Xcode 12.1

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

md5: 45fed6e20924f0405072094f94583c9b

Issue Description:

Xcode 12.1 compiler is crashing when building a large scale project.

0  swift                    0x0000000108b62865 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  swift                    0x0000000108b61865 llvm::sys::RunSignalHandlers() + 85
2  swift                    0x0000000108b62e1f SignalHandler(int) + 111
3  libsystem_platform.dylib 0x00007fff6fe9c5fd _sigtramp + 29
4  libsystem_platform.dylib 0x00007ffeeb5c0540 _sigtramp + 18446744071485669216
5  swift                    0x000000010885b359 clang::SourceManager::getFileIDLoaded(unsigned int) const + 793
6  swift                    0x000000010487d5d3 clang::SourceManager::getDecomposedLoc(clang::SourceLocation) const + 435
7  swift                    0x00000001076caadd clang::ASTReader::ReadPragmaDiagnosticMappings(clang::DiagnosticsEngine&) + 909
8  swift                    0x00000001076c7b51 clang::ASTReader::InitializeContext() + 561
9  swift                    0x00000001076c637c clang::ASTReader::ReadAST(llvm::StringRef, clang::serialization::ModuleKind, clang::SourceLocation, unsigned int, llvm::SmallVectorImpl<clang::ASTReader::ImportedSubmodule>*) + 572
10 swift                    0x000000010740df1a clang::CompilerInstance::findOrCompileModuleAndReadAST(llvm::StringRef, clang::SourceLocation, clang::SourceLocation, bool) + 1178
11 swift                    0x0000000107410357 clang::CompilerInstance::loadModule(clang::SourceLocation, llvm::ArrayRef<std::__1::pair<clang::IdentifierInfo*, clang::SourceLocation> >, clang::Module::NameVisibilityKind, bool) + 3223
12 swift                    0x000000010569f01b swift::ClangImporter::Implementation::loadModuleClang(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >)::$_6::operator()(llvm::ArrayRef<std::__1::pair<clang::IdentifierInfo*, clang::SourceLocation> >, bool) const + 331
13 swift                    0x000000010569ed53 swift::ClangImporter::Implementation::loadModuleClang(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >) + 579
14 swift                    0x000000010569f69b swift::ClangImporter::loadModule(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >) + 75
15 swift                    0x000000010514190a swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>, bool) + 954
16 swift                    0x0000000105191deb swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc, bool) + 1787
17 swift                    0x00000001051fa55d swift::SerializedModuleLoaderBase::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, llvm::StringRef, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool, bool) + 1037
18 swift                    0x00000001051fca59 swift::SerializedModuleLoaderBase::loadModule(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >) + 825
19 swift                    0x0000000105141766 swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>, bool) + 534
20 swift                    0x0000000105191deb swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc, bool) + 1787
21 swift                    0x00000001051fa55d swift::SerializedModuleLoaderBase::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, llvm::StringRef, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool, bool) + 1037
22 swift                    0x00000001051fca59 swift::SerializedModuleLoaderBase::loadModule(swift::SourceLoc, llvm::ArrayRef<swift::Located<swift::Identifier> >) + 825
23 swift                    0x00000001054ec734 swift::performImportResolution(swift::SourceFile&) + 3844
24 swift                    0x0000000104804dd8 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 4888
25 swift                    0x00000001046c632d swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6845
26 swift                    0x000000010464ac37 main + 1255
27 libdyld.dylib            0x00007fff6fca3cc9 start + 1
28 libdyld.dylib            0x00000000000004e8 start + 18446603338640640032
@typesanitizer
Copy link

Could you share any additional information about the build setup/any way to reproduce the issue? This looks like a deserialization issue, which often is fixed by cleaning (deletes serialized modules) + rebuilding. As a more drastic step, deleting the DerivedData folder for the project is also an option.

@swift-ci create

@swift-ci
Copy link
Collaborator Author

swift-ci commented Nov 4, 2020

Comment by Eduardo Dias (JIRA)

I think this one was not related to the derived data as I removed the entire dir before each build. I suspect this issue was related to the new ARM64 architecture set on my project dependencies and running on simulators. I managed to solve this issue removing this architecture explicitly on my project settings.

I'm also not able to reproduce it anymore, so I think we can close this one for now

@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. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants