grpc / grpc/grpc-java

BinderTransports may report transportTerminated() despite unfinished work in Executors

Open
#12,373 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

For example, `BinderClientTransport` delays `transportTerminated()` until all in-flight calls complete but it doesn't consider all the work it may have enqueued on all the various Executors. We should either cancel all these tasks or wait for them to complete before declaring the transport terminated. That's because the higher layer `ManagedChannel` contract implies/says that all these Executors can be shutdown after termination. There are two cases:
- `ExecutorService#shutdownNow()` - our Runnables could be returned from `shutdownNow()` without having executed. Callers of `execute` don't really expect this. I can imagine it could cause a resource leak.
- `ExecutorService#shutdown()` - less likely to be a problem.

BinderServerTransport seems to have the same problem.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.