grpc-swift: EXC_BAD_INSTRUCTION in GRPC.ClientResponseChannelHandler.performTimeout
New Issue Checklist
- Updated grpc-swift to the latest version
- I read the Contribution Guidelines
- I searched for existing GitHub issues(especially, there are many resolved issues related to SSL)
Issue Description
grpc-swift on the nio
branch crashes with an EXC_BAD_INSTRUCTION
when built with Xcode 11.2 beta, on both iOS 13.1 and 13.2.
Thread 1: EXC_BAD_INSTRUCTION (code=1, subcode=0x8)
in GRPC.ClientResponseChannelHandler.performTimeout
Complete output when running grpc-swift, including the stack trace and command used
2019-10-07T14:29:27-0700 info: making EventLoopGroup for best network preference 2019-10-07T14:29:27-0700 info: 'best' NetworkImplementation is .networkFramework 2019-10-07T14:29:27-0700 info: connection_id=8A5017CD-126D-4C09-9149-3E4A38A00F69 attempting to connect to hostAndPort("host.example.com", 8001) 2019-10-07T14:29:27-0700 info: connectivity state change: idle to connecting 2019-10-07T14:29:27-0700 info: making client bootstrap with event loop group of type NIOTSEventLoop 2019-10-07T14:29:27-0700 info: connection_id=8A5017CD-126D-4C09-9149-3E4A38A00F69 setting connect timeout to 20.0 seconds 2019-10-07T14:29:27-0700 info: request_id=99A22272-CD84-4C62-9CE2-9FFE9DCB7AEC making bidirectional streaming call to '/p1.RelayAPI/RelayStream', request type: P1RelayRequest, response type: P1RelayResponse (lldb)
#0 0x00000001030062c0 in method descriptor for ClientResponseChannelHandler.performTimeout(error:) () #1 0x000000010242bbcc in BaseClientCall.init(connection:responseHandler:requestHandler:logger:) at .../Library/Developer/Xcode/DerivedData/p1-dcjnosvwtrwjseaarvxizkaclqbh/SourcePackages/checkouts/grpc-swift/Sources/GRPC/ClientCalls/BaseClientCall.swift:115 #2 0x000000010242f768 in BidirectionalStreamingCall.init(connection:path:callOptions:errorDelegate:handler:) at .../Library/Developer/Xcode/DerivedData/p1-dcjnosvwtrwjseaarvxizkaclqbh/SourcePackages/checkouts/grpc-swift/Sources/GRPC/ClientCalls/BidirectionalStreamingCall.swift:60 #3 0x000000010242ed28 in BidirectionalStreamingCall.__allocating_init(connection:path:callOptions:errorDelegate:handler:) () #4 0x000000010245c3b8 in GRPCClient.makeBidirectionalStreamingCall<A, B>(path:callOptions:requestType:responseType:handler:) at .../Library/Developer/Xcode/DerivedData/p1-dcjnosvwtrwjseaarvxizkaclqbh/SourcePackages/checkouts/grpc-swift/Sources/GRPC/GRPCClient.swift:79 #5 0x00000001022641a0 in P1RelayAPIServiceClient.relayStream(callOptions:handler:) at .../packages/Protos/Sources/Protos/relay.grpc.swift:59
Environment
Key | Value |
---|---|
OS Version | 13.2 beta (17B5059g) |
Swift Version | 5.1.1 |
Xcode Version | 11.2 beta (11B41) |
gRPC-Swift Version | nio @ 38db19abbc |
protoc Version |
3.10.0 |
protoc-gen-swift Version |
1.7.0 |
protoc-gen-swiftgrpc Version |
nio @ 38db19abbc |
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16
Commits related to this issue
- Workaround for SR-11564 Motivation: gRPC Swift crashes when running any RPC on iOS when built with Xcode 11.2 beta (see issue: #605). Modifications: - Add methods `override`ing the `scheduleTimeou... — committed to glbrntt/grpc-swift by glbrntt 5 years ago
- Workaround for SR-11564 (#608) Motivation: gRPC Swift crashes when running any RPC on iOS when built with Xcode 11.2 beta (see issue: #605). Modifications: - Add methods `override`ing the `... — committed to grpc/grpc-swift by glbrntt 5 years ago
We found a workaround.
Set
DEAD_CODE_STRIPPING = NO
in the app’s target fixes the crash.Thanks for filing this @ydnar, it appears to be a Swift bug: https://bugs.swift.org/projects/SR/issues/SR-11564