* Enable logs for error message in call_op_set.h.
The `gpr_log` was commented out from call_op_set.h at PR: https://github.com/grpc/grpc/pull/20681, because of the undefined error. It is probably just missing the header file, so adding the `gpr_log` back.
* Automated change: Fix sanity tests (#31178)
Co-authored-by: nanahpang <nanahpang@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: nanahpang <nanahpang@users.noreply.github.com>
* Reland x2: Make GetDefaultEventEngine return a shared_ptr
* remove thread leak from NativeDNSResolver
This is not going to work for resolvers that support cancellation.
* give resolvers bounded lifetimes
Some resolver own EventEngines. EventEngines cannot run off the end of
the process since they have unjoined threads (problematic in a small set
of environments). This gives resolvers bounded lifetimes, and allows
replacement of resolvers without ASAN issues of deleting resolvers in
active use (occurs in tests).
* fix
* fix windows
* fix surface init test
* fix
* sanitize
* use after move
* the test must wait for the callback to be destroyed
* windows fix: delete the resolver on iomgr shutdown, not before
* Make TimerManager threads non-joinable
On gRPC shutdown, any unjoined TimerManager threads will cause TSAN to
detect thread leaks. This fix resolves issues I saw in end2end test
shutdown in another PR, where a single timer manager thread was always
alive after the test ended.
The long-term solution is to integrate the new ThreadPool here, but this
unblocks me for now.
* backport fix
* fix
* shared_ptr<EventEngine> in EventEngine benchmarks
This is an API change required for subsequent work in using EventEngine
shared_ptrs. It has been landed and reverted with other work multiple
times, so I'm landing it independently.
* Add a provision to allow specification of separate set of channel args for the grpclb channel
* fix asan issue
* review comments
* review comments
* add missing file
* remove unused hdr
* fix sanity
* fix comments
* remove unused hdr
* Reland: "Make GetDefaultEventEngine return a shared_ptr (#30280)"
This reverts commit 45959e7cc1.
* Attempted fix with NoDestruct
* Not a process-wide singleton for the type. Just a NonDestruct
* fix
This works around valgrind memory leaks by giving EventEngines a fixed
lifetime. We eventually want ref-counted EventEngines internally, so this is
a step in the right direction as well.
* [filterstack] Eliminate flags on initial metadata
Instead prefer to pass this data in non-encoded metadata.
Needed to fix MetadataMap::Copy to copy non-encoded metadata (not doing so was unintended).
Removed the flags from call_details because there's not been a use for them there for a very long time.
* Automated change: Fix sanity tests
* fix
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
This functionality is entirely implemented in the C++ bindings layer, and so does not need a flag passed down to core (which core already ignores silently).
This provides a move-only alternative to std::function.
fix oracle and engine factory
fix generate_projects for any_invocable
fix
format & iwyu
Automated change: Fix sanity tests (#30205)
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
This commit adds a new overloaded version of `CreateBinderChannel`, that accepts
an intent URI (which should be able to be parsed by
https://developer.android.com/reference/android/content/Intent#parseUri(java.lang.String,%20int) )
for specifying the component to connect to.
Later we will deprecate the old APIs that accepts `package_name`,
`class_name`, and `action_name` separately. Intent URI seems to be a
better and more flexible way to specify a component to connect to.
`grpc.binder.custom_android_intent_action_name` channel arg is deprecated now.
User should use URI to specify custom action instead.
* [WIP] Precondition ChannelArgs with a default EventEngine
This is a step towards using ChannelArgs as the primary means of
accessing EventEngine instances in gRPC-core. If not explicitly provided
by the application, a default EventEngine will populated into
ChannelArgs during preconditioning.
This is not a final state, we may want to enable ref-counting here
instead of using raw pointers. And a refactoring is in order to enable
GetObject instead of the more verbose
GetPointer<EventEngine>(GRPC_ARG_EVENT_ENGINE).
* Refactor ChannelArgs::GetObject to support non-conforming classes
This allows us to not expose `ChannelArgName` in the public interface.
* Add std::shared_ptr to ChannelArgs; Add EventEngine specialization
* subchannel fix; cleanup
* replace GetSharedPtr with overloads of GetObjectRef
* Automated change: Fix sanity tests
* fix the fixer
* fix raw pointer retrieval from stored shared_ptr
* Make GetObjectRef<EventEngine> work (not general to shared_ptr)
* enable shared_ptr ChannelArg support for shared_from_this
* use new EventEngines for tests (not the default global)
* Automated change: Fix sanity tests
Co-authored-by: drfloob <drfloob@users.noreply.github.com>