Closed
Description
Description
grpc is failing to build the release configuration with the following error:
Begin Error in Function: '$s4GRPC26ServerStreamingCallHandlerC12sendResponse33_53D77963C723647846B0BCBB52F602B8LL_8metadata7promisey5InputQy__AA15MessageMetadataV7NIOCore16EventLoopPromiseVyytGSgtF'
Found over consume?!
Value: %10 = load_borrow %9 : $*ServerStreamingCallHandler<RequestDeserializer, ResponseSerializer>._CallHandlerState // users: %12, %26, %44, %25, %29
User: end_borrow %10 : $ServerStreamingCallHandler<RequestDeserializer, ResponseSerializer>._CallHandlerState // id: %26
Block: bb4
Consuming Users:
end_borrow %10 : $ServerStreamingCallHandler<RequestDeserializer, ResponseSerializer>._CallHandlerState // id: %29
end_borrow %10 : $ServerStreamingCallHandler<RequestDeserializer, ResponseSerializer>._CallHandlerState // id: %25
end_borrow %10 : $ServerStreamingCallHandler<RequestDeserializer, ResponseSerializer>._CallHandlerState // id: %44
end_borrow %10 : $ServerStreamingCallHandler<RequestDeserializer, ResponseSerializer>._CallHandlerState // id: %26
End Error in Function: '$s4GRPC26ServerStreamingCallHandlerC12sendResponse33_53D77963C723647846B0BCBB52F602B8LL_8metadata7promisey5InputQy__AA15MessageMetadataV7NIOCore16EventLoopPromiseVyytGSgtF'
Found ownership error?!
<unknown>:0: error: fatal error encountered during compilation; please submit a bug report (https://swift.org/contributing/#reporting-bugs)
<unknown>:0: note: triggering standard assertion failure routine
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 6.2-dev (LLVM 2b92dd1ae9a3bc3, Swift f636aa00e00b889)
2. Compiling with effective version 5.10
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, HighLevel,Module+StackPromote, MidLevel,Function, ClosureSpecialize, LowLevel,Function, LateLoopOpt, SIL Debug Info Generator } on SIL for GRPC)
4. While running pass #119274 SILFunctionTransform "CopyPropagation" on SILFunction "@$s4GRPC26ServerStreamingCallHandlerC12sendResponse33_53D77963C723647846B0BCBB52F602B8LL_8metadata7promisey5InputQy__AA15MessageMetadataV7NIOCore16EventLoopPromiseVyytGSgtF".
for 'sendResponse(_:metadata:promise:)' (at /Users/ec2-user/jenkins/workspace/swift-main-source-compat-suite/swift-source-compat-suite/project_cache/grpc-swift/Sources/GRPC/CallHandlers/ServerStreamingCallHandler.swift:226:11)
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 0x000000010807b108 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 40
1 swift-frontend 0x00000001080791a9 llvm::sys::RunSignalHandlers() + 233
2 swift-frontend 0x000000010807b776 SignalHandler(int, __siginfo*, void*) + 278
3 libsystem_platform.dylib 0x00007ff80a501e9d _sigtramp + 29
4 swift-frontend 0x0000000109c87429
5 libsystem_c.dylib 0x00007ff80a3edb19 abort + 126
6 swift-frontend 0x0000000101602057 swift::DiagnosticHelper::Implementation::diagnoseFatalError(char const*, bool) + 599
7 swift-frontend 0x0000000107fe7e98 llvm::report_fatal_error(llvm::Twine const&, bool) + 344
8 swift-frontend 0x0000000107fe7d39 llvm::report_fatal_error(char const*, bool) + 41
9 swift-frontend 0x00000001024edd48 swift::LinearLifetimeChecker::ErrorBuilder::handleError(llvm::function_ref<void ()>&&, bool) const + 552
10 swift-frontend 0x00000001024eba65 swift::LinearLifetimeChecker::checkValueImpl(swift::SILValue, llvm::ArrayRef<swift::Operand*>, llvm::ArrayRef<swift::Operand*>, swift::LinearLifetimeChecker::ErrorBuilder&, std::__1::optional<llvm::function_ref<void (swift::SILBasicBlock*)>>, std::__1::optional<llvm::function_ref<void (swift::Operand*)>>) + 1637
11 swift-frontend 0x00000001024ed0f9 swift::LinearLifetimeChecker::checkValue(swift::SILValue, llvm::ArrayRef<swift::Operand*>, llvm::ArrayRef<swift::Operand*>, swift::LinearLifetimeChecker::ErrorBuilder&) + 73
12 swift-frontend 0x00000001024f4be5 swift::SILValueOwnershipChecker::check() + 725
13 swift-frontend 0x00000001024f70b2 verifySILValueHelper(swift::SILFunction const*, swift::SILValue, swift::LinearLifetimeChecker::ErrorBuilder&, swift::DeadEndBlocks*, swift::GuaranteedPhiVerifier&) + 194
14 swift-frontend 0x00000001024f74fd swift::SILFunction::verifyOwnership(swift::DeadEndBlocks*) const + 717
15 swift-frontend 0x0000000101fe9029 (anonymous namespace)::CopyPropagation::run() + 8921
16 swift-frontend 0x0000000101f08174 swift::SILPassManager::runPassOnFunction(unsigned int, swift::SILFunction*) + 1732
17 swift-frontend 0x0000000101f092d9 swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 1225
18 swift-frontend 0x0000000101f05bd8 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 72
19 swift-frontend 0x0000000101f05b63 swift::ExecuteSILPipelineRequest::evaluate(swift::Evaluator&, swift::SILPipelineExecutionDescriptor) const + 51
20 swift-frontend 0x0000000101f5c46d swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 29
21 swift-frontend 0x0000000101f24985 swift::ExecuteSILPipelineRequest::OutputType swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal<swift::ExecuteSILPipelineRequest>(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()>(swift::ExecuteSILPipelineRequest const&, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal<swift::ExecuteSILPipelineRequest>(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()) + 181
22 swift-frontend 0x0000000101f05e10 swift::executePassPipelinePlan(swift::SILModule*, swift::SILPassPipelinePlan const&, bool, swift::irgen::IRGenModule*) + 64
23 swift-frontend 0x0000000101f3a573 swift::runSILOptimizationPasses(swift::SILModule&) + 163
24 swift-frontend 0x000000010161a7f4 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 260
25 swift-frontend 0x000000010137c7fd 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*) + 765
26 swift-frontend 0x000000010137c177 swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1735
27 swift-frontend 0x0000000101389d4f withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) + 143
28 swift-frontend 0x000000010137df85 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 933
29 swift-frontend 0x000000010137d5c3 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2627
30 swift-frontend 0x0000000101118bfc swift::mainEntry(int, char const**) + 3340
31 dyld 0x00007ff80a13f2cd start + 1805
This seems to only occur when building the release configuration
Reproduction
swift build --disable-sandbox --package-path /Users/ec2-user/jenkins/workspace/swift-main-source-compat-suite/swift-source-compat-suite/project_cache/grpc-swift --verbose --configuration release -Xswiftc -swift-version -Xswiftc 5
Expected behavior
Expected the project to build correctly
Environment
Apple Swift version 6.2-dev (LLVM 2b92dd1ae9a3bc3, Swift f636aa0)
Target: x86_64-apple-macosx13.0
Additional information
https://ci.swift.org/job/swift-main-source-compat-suite/1052