Skip to content

[Source compatibility suite] Multiple projects causing compiler crash in tryJoinIfDestroyConsumingUseInSameBlock() #65205

@justice-adams-apple

Description

@justice-adams-apple

Multiple projects are failing to build their debug configurations with the following error:

unexpected memory access.
UNREACHABLE executed at swift/lib/SIL/Utils/MemAccessUtils.cpp:2610!
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.	Program arguments: <ARGS>
1.	Apple Swift version 5.9-dev (LLVM 0e374635717eead, Swift 4e71efce1f56373)
2.	Compiling with the current language version
3.	While evaluating request ExecuteSILPipelineRequest(Run pipelines { Non-Diagnostic Mandatory Optimizations, Serialization, Rest of Onone } on SIL for AsyncHTTPClient)
4.	While running pass #662 SILFunctionTransform "MandatoryARCOpts" on SILFunction "@$s15AsyncHTTPClient0B0C4TaskC9eventLoop6loggerAEy_xG7NIOCore05EventE0_p_7Logging6LoggerVtcfc".
 for 'init(eventLoop:logger:)' (at /Users/ec2-user/jenkins/workspace/swift-main-source-compat-suite-debug/swift-source-compat-suite/project_cache/async-http-client/Sources/AsyncHTTPClient/HTTPHandler.swift:589:9)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  swift-frontend           0x00000001074766b7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1  swift-frontend           0x0000000107475738 llvm::sys::RunSignalHandlers() + 248
2  swift-frontend           0x0000000107476d10 SignalHandler(int) + 288
3  libsystem_platform.dylib 0x00007ff807acedfd _sigtramp + 29
4  libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603370452161056
5  libsystem_c.dylib        0x00007ff807a04d24 abort + 123
6  swift-frontend           0x00000001073b91c3 llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 467
7  swift-frontend           0x0000000102a5df8f swift::visitAccessedAddress(swift::SILInstruction*, llvm::function_ref<void (swift::Operand*)>) + 1023
8  swift-frontend           0x0000000102a5e7a4 swift::mayBeDeinitBarrierNotConsideringSideEffects(swift::SILInstruction*) + 52
9  swift-frontend           0x00000001025889d3 tryJoinIfDestroyConsumingUseInSameBlock(swift::semanticarc::SemanticARCOptVisitor&, swift::CopyValueInst*, swift::DestroyValueInst*, swift::SILValue, swift::Operand*) + 403
10 swift-frontend           0x00000001025884a8 swift::semanticarc::SemanticARCOptVisitor::tryJoiningCopyValueLiveRangeWithOperand(swift::CopyValueInst*) + 472
11 swift-frontend           0x0000000102589342 swift::semanticarc::SemanticARCOptVisitor::visitCopyValueInst(swift::CopyValueInst*) + 66
12 swift-frontend           0x000000010258ee56 swift::semanticarc::SemanticARCOptVisitor::processWorklist() + 278
13 swift-frontend           0x000000010258eebf swift::semanticarc::SemanticARCOptVisitor::optimize() + 15
14 swift-frontend           0x00000001025829ee (anonymous namespace)::SemanticARCOpts::run() + 1342
15 swift-frontend           0x000000010253603f swift::SILPassManager::runPassOnFunction(unsigned int, swift::SILFunction*) + 2591
16 swift-frontend           0x0000000102536d89 swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 1225
17 swift-frontend           0x0000000102533f48 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 72
18 swift-frontend           0x0000000102533ee3 swift::ExecuteSILPipelineRequest::evaluate(swift::Evaluator&, swift::SILPipelineExecutionDescriptor) const + 51
19 swift-frontend           0x000000010255772d swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 29
20 swift-frontend           0x000000010253ff5a llvm::Expected<swift::ExecuteSILPipelineRequest::OutputType> swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest>(swift::ExecuteSILPipelineRequest const&) + 234
21 swift-frontend           0x0000000102534164 swift::executePassPipelinePlan(swift::SILModule*, swift::SILPassPipelinePlan const&, bool, swift::irgen::IRGenModule*) + 68
22 swift-frontend           0x0000000102542262 swift::runSILPassesForOnone(swift::SILModule&) + 82
23 swift-frontend           0x0000000101dd4f55 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 245
24 swift-frontend           0x0000000101c1b47d performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 781
25 swift-frontend           0x0000000101c1a99f swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 751
26 swift-frontend           0x0000000101c1dce0 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 784
27 swift-frontend           0x0000000101c1cb00 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3232
28 swift-frontend           0x0000000101a77dd3 swift::mainEntry(int, char const**) + 1203
29 dyld                     0x00000001147e752e start + 462

The affected projects are:

  • async-http-client
  • Graphiti
  • GRDB.swift
  • Smtp
  • swift-atomics
  • swift-nio-ssl
  • swift-nio-transport-services

This only happens on the debug build of the projects

Expected behavior
Expect the projects to build correctly

Environment (please fill out the following information)
https://ci.swift.org/job/swift-main-source-compat-suite-debug/393/artifact/swift-source-compat-suite/

Additional context
```Apple Swift version 5.9-dev (LLVM 0e374635717eead, Swift 4e71efc)``

Metadata

Metadata

Assignees

No one assigned

    Labels

    SILOptimizerArea → compiler: SIL optimization passesbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwaresource compatibility suiteFlag: An issue that surfaced in the source compatibility suiteswift 5.9

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions