-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
binder: ServerAuthInterceptor might use an Executor that BinderServer has already returned to the pool #10897
Comments
I think I finally understand the problem Mark was pointing out. Today It seems to me that we can't safely release this executor until the last |
…rning security policy executor to the object pool. Addresses grpc#10897.
…rning security policy executor to the object pool. Addresses grpc#10897.
Ah, that does ring a bell w.r.t. to the chat I had with him. #11240 is an attempt to address it. PTAL when you have a chance. |
…rning security policy executor to the object pool. Addresses grpc#10897.
…tart despite the server having shutdown already. Part of grpc#10897.
... returning security policy executor to the object pool. Fixes grpc#10897.
This is a follow-up to #10566.
(note: I'm describing the issue as I recollect it; Chat ate the discussion thread. @markb74 please correct me if I'm wrong)
#10633 introduced the
PendingAuthListener
class and the logic to handleAsyncSecurityPolicy
without blocking any threads. This required anExecutor
to be passed toBinderTransportSecurity
here. In the same PR, we added a shutdown listener to return that executor to the object pool during server shutdown (here).@markb74 commented that this was sub-optimal, and we could instead return the executor during termination. One suggestion was to pass an
Executor
toBinderServer.start
and reuse it throught that server's lifetime. I prototyped it in mateusazis@3f262ca, but ended up with a chicken-and-egg issue inBinderServerBuilder.build
:BinderTransportSecurity.installAuthInterceptor
wants an Executor, but it will only be available onBinderServer
after it is instantiated and startedBinderServer
is only instantiated after the authorization interceptor gets installedAny help here is welcome!
The text was updated successfully, but these errors were encountered: