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-11735] Abort Trap 6 build error in Xcode 11.1 and 11.2 #54142

Open
swift-ci opened this issue Nov 8, 2019 · 3 comments
Open

[SR-11735] Abort Trap 6 build error in Xcode 11.1 and 11.2 #54142

swift-ci opened this issue Nov 8, 2019 · 3 comments
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 serialization Area → compiler: Serialization & deserialization

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Nov 8, 2019

Previous ID SR-11735
Radar None
Original Reporter Puty (JIRA User)
Type Bug
Environment

macOS 10.15 (19A602),

Xcode Version 11.2 (11B52),

iPad Pro iPadOS 13.2

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

md5: 6e92a159276301e1900a5fa267915e8b

Issue Description:

This error appears every time when I clean the build folder and rebuild the project. When the error occurs, I need to pull another source code version from the git (it doesn't matter which older version, some branch work some not, but always different branch works), make a clean build folder, then rebuild the application, and then pull the current version of the source code and only build.

This is the only workaround that works. Archive applications always work, only debug build does not.

here is the log from the error:

1. While running pass #0 SILModuleTransform "SerializeSILPass".

2. While serializing declaration 0x7ff2082f3be8 (in module 'MYAPPNAME')

3. failed to serialize anything

0 swift 0x0000000106abba13 PrintStackTraceSignalHandler(void*) + 51

1 swift 0x0000000106abb1e6 SignalHandler(int) + 358

2 libsystem_platform.dylib 0x00007fff6f4d8b1d _sigtramp + 29

3 swift 0x00000001074b3000 (anonymous namespace)::DarwinX86AsmBackend::getCompactUnwindRegNum(unsigned int) const::CU32BitRegs + 117600

4 libsystem_c.dylib 0x00007fff6f3aea08 abort + 120

5 swift 0x000000010339cdba swift::serialization::Serializer::writeDecl(swift::Decl const*) + 68458

6 swift 0x00000001033b342f swift::serialization::Serializer::writeAllDeclsAndTypes() + 62287

7 swift 0x00000001033c03f4 swift::serialization::Serializer::writeAST(llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, bool) + 5364

8 swift 0x00000001033cd330 swift::serialization::Serializer::writeToStream(llvm::raw_ostream&, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::SILModule const*, swift::SerializationOptions const&) + 6016

9 swift 0x00000001033cec0b bool llvm::function_ref<bool (llvm::raw_pwrite_stream&)>::callback_fn<swift::serialize(llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::SerializationOptions const&, swift::SILModule const*)::$_8>(long, llvm::raw_pwrite_stream&) + 139

10 swift 0x00000001026d5729 swift::withOutputFile(swift::DiagnosticEngine&, llvm::StringRef, llvm::function_ref<bool (llvm::raw_pwrite_stream&)>) + 2569

11 swift 0x00000001033cea67 swift::serialize(llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::SerializationOptions const&, swift::SILModule const*) + 311

12 swift 0x00000001027111bb std::_1::function::func<performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation&, std::1::unique_ptr<swift::SILModule, std::_1::default_delete<swift::SILModule> >, bool, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, bool, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*)::$12, std::1::allocator<performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation&, std::1::unique_ptr<swift::SILModule, std::_1::default_delete<swift::SILModule> >, bool, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, bool, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*)::$_12>, void ()>::operator()() + 603

13 swift 0x0000000102eb8c61 SerializeSILPass::run() + 49

14 swift 0x0000000102daf129 swift::SILPassManager::execute() + 7305

15 swift 0x0000000102a0bc0b swift::CompilerInstance::performSILProcessing(swift::SILModule*, swift::UnifiedStatsReporter*) + 1563

16 swift 0x0000000102707375 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 33925

17 swift 0x00000001026fb6e4 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6820

18 swift 0x0000000102688be3 main + 1219

19 libdyld.dylib 0x00007fff6f2d7405 start + 1

error: Abort trap: 6 (in target 'MYAPPNAME' from project 'MYAPPNAME')

I try reinstall xcode (clean reinstall), i try version 11.1 and 11.2 but it doest work.

@beccadax
Copy link
Contributor

@harlanhaskins

@swift-ci
Copy link
Collaborator Author

Comment by Lukáš Putala (JIRA)

Hello,
I have found a solution to this problem. When I create a new project from a template, initialize all the cocoapods and link all the extensions (Api, Shared, etc.) of the project, so it works.

@swift-ci
Copy link
Collaborator Author

Comment by Wilson Gramer (JIRA)

I'm having this issue too — archiving works fine, but building normally does not. I've tried reverting to an older commit and recreating my Xcode project, but neither worked for me on any version of Xcode 11 (I'm unable to test earlier versions because I'm using SwiftUI for part of my project). Here's the error I'm receiving:

*** DESERIALIZATION FAILURE (please include this section in any bug report) *** top-level value not found Cross-reference to module 'SuperHomework' ... BlogPostIntegration

[... omitted for brevity ...]

1. While deserializing SIL function "$s13SuperHomework19BlogPostIntegrationC10AssignmentC2id5title7content4iconAESS_SSSo18NSAttributedStringCSgAA0F4IconOtcfc" 2. While deserializing decl @ 268566 (XREF) in 'SuperHomework' 3. Cross-reference to module 'SuperHomework' ... BlogPostIntegration 4. While reading from 'SuperHomework' 5. While deserializing 'BlogPostIntegration' (ClassDecl @ 264833) in 'SuperHomework'

The entire log file is available [here|https://pastebin.com/raw/uL7QmCvY].

I'll try to come up with a sample project reproducing this error soon. Thanks for your help!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added CompilerCrash and removed crash Bug: A crash, i.e., an abnormal termination of software labels Sep 17, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 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. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software serialization Area → compiler: Serialization & deserialization
Projects
None yet
Development

No branches or pull requests

3 participants