Revert "Posix event engine tcp client (#31074)" (#31452)

This reverts commit 390ae5d412.
pull/31455/head
Vignesh Babu 2 years ago committed by GitHub
parent 7229bea2fd
commit d760c1fef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 124
      CMakeLists.txt
  2. 8
      Makefile
  3. 67
      build_autogenerated.yaml
  4. 4
      config.m4
  5. 4
      config.w32
  6. 8
      gRPC-C++.podspec
  7. 12
      gRPC-Core.podspec
  8. 8
      grpc.gemspec
  9. 8
      grpc.gyp
  10. 8
      package.xml
  11. 10
      src/core/BUILD
  12. 14
      src/core/lib/event_engine/poller.h
  13. 25
      src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc
  14. 4
      src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h
  15. 40
      src/core/lib/event_engine/posix_engine/ev_poll_posix.cc
  16. 4
      src/core/lib/event_engine/posix_engine/ev_poll_posix.h
  17. 331
      src/core/lib/event_engine/posix_engine/posix_engine.cc
  18. 76
      src/core/lib/event_engine/posix_engine/posix_engine.h
  19. 4
      src/python/grpcio/grpc_core_dependencies.py
  20. 26
      test/core/event_engine/posix/BUILD
  21. 222
      test/core/event_engine/posix/posix_event_engine_connect_test.cc
  22. 5
      test/core/event_engine/test_suite/BUILD
  23. 14
      test/core/event_engine/test_suite/event_engine_test.cc
  24. 25
      test/core/event_engine/test_suite/event_engine_test.h
  25. 10
      test/core/event_engine/test_suite/posix_event_engine_test.cc
  26. 8
      tools/doxygen/Doxyfile.c++.internal
  27. 8
      tools/doxygen/Doxyfile.core.internal
  28. 30
      tools/run_tests/generated/tests.json

124
CMakeLists.txt generated

@ -1021,9 +1021,7 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_cxx latch_test)
add_dependencies(buildtests_cxx lb_get_cpu_stats_test)
add_dependencies(buildtests_cxx lb_load_data_store_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx lock_free_event_test)
endif()
add_dependencies(buildtests_cxx lock_free_event_test)
add_dependencies(buildtests_cxx log_test)
add_dependencies(buildtests_cxx loop_test)
add_dependencies(buildtests_cxx match_test)
@ -1071,9 +1069,6 @@ if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx posix_endpoint_test)
endif()
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx posix_event_engine_connect_test)
endif()
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx posix_event_engine_test)
endif()
@ -2090,13 +2085,10 @@ add_library(grpc
src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc
src/core/lib/event_engine/posix_engine/internal_errqueue.cc
src/core/lib/event_engine/posix_engine/lockfree_event.cc
src/core/lib/event_engine/posix_engine/posix_endpoint.cc
src/core/lib/event_engine/posix_engine/posix_engine.cc
src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
src/core/lib/event_engine/posix_engine/timer.cc
src/core/lib/event_engine/posix_engine/timer_heap.cc
src/core/lib/event_engine/posix_engine/timer_manager.cc
src/core/lib/event_engine/posix_engine/traced_buffer_list.cc
src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc
src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc
src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc
@ -2112,7 +2104,6 @@ add_library(grpc
src/core/lib/event_engine/windows/windows_engine.cc
src/core/lib/experiments/config.cc
src/core/lib/experiments/experiments.cc
src/core/lib/gprpp/load_file.cc
src/core/lib/gprpp/status_helper.cc
src/core/lib/gprpp/time.cc
src/core/lib/gprpp/time_averaged_stats.cc
@ -2745,13 +2736,10 @@ add_library(grpc_unsecure
src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc
src/core/lib/event_engine/posix_engine/internal_errqueue.cc
src/core/lib/event_engine/posix_engine/lockfree_event.cc
src/core/lib/event_engine/posix_engine/posix_endpoint.cc
src/core/lib/event_engine/posix_engine/posix_engine.cc
src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
src/core/lib/event_engine/posix_engine/timer.cc
src/core/lib/event_engine/posix_engine/timer_heap.cc
src/core/lib/event_engine/posix_engine/timer_manager.cc
src/core/lib/event_engine/posix_engine/traced_buffer_list.cc
src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc
src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc
src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc
@ -2767,7 +2755,6 @@ add_library(grpc_unsecure
src/core/lib/event_engine/windows/windows_engine.cc
src/core/lib/experiments/config.cc
src/core/lib/experiments/experiments.cc
src/core/lib/gprpp/load_file.cc
src/core/lib/gprpp/status_helper.cc
src/core/lib/gprpp/time.cc
src/core/lib/gprpp/time_averaged_stats.cc
@ -13203,41 +13190,39 @@ target_link_libraries(lb_load_data_store_test
endif()
if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_executable(lock_free_event_test
test/core/event_engine/posix/lock_free_event_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
add_executable(lock_free_event_test
test/core/event_engine/posix/lock_free_event_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
target_include_directories(lock_free_event_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_include_directories(lock_free_event_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(lock_free_event_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
)
target_link_libraries(lock_free_event_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
)
endif()
endif()
if(gRPC_BUILD_TESTS)
@ -14734,6 +14719,11 @@ if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_executable(posix_endpoint_test
src/core/lib/event_engine/posix_engine/posix_endpoint.cc
src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
src/core/lib/event_engine/posix_engine/traced_buffer_list.cc
src/core/lib/gprpp/load_file.cc
src/core/lib/iomgr/socket_mutator.cc
test/core/event_engine/posix/posix_endpoint_test.cc
test/core/event_engine/posix/posix_engine_test_utils.cc
test/core/event_engine/test_suite/event_engine_test.cc
@ -14769,56 +14759,14 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
)
endif()
endif()
if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_executable(posix_event_engine_connect_test
test/core/event_engine/posix/posix_event_engine_connect_test.cc
test/core/event_engine/test_suite/event_engine_test.cc
test/core/event_engine/test_suite/event_engine_test_utils.cc
test/core/event_engine/test_suite/oracle_event_engine_posix.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
target_include_directories(posix_event_engine_connect_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(posix_event_engine_connect_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
)
endif()
endif()
if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_executable(posix_event_engine_test
test/core/event_engine/test_suite/client_test.cc
test/core/event_engine/test_suite/event_engine_test.cc
test/core/event_engine/test_suite/event_engine_test_utils.cc
test/core/event_engine/test_suite/oracle_event_engine_posix.cc
test/core/event_engine/test_suite/posix_event_engine_test.cc
test/core/event_engine/test_suite/timer_test.cc
third_party/googletest/googletest/src/gtest-all.cc
@ -18023,6 +17971,8 @@ if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_executable(tcp_posix_socket_utils_test
src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
src/core/lib/iomgr/socket_mutator.cc
test/core/event_engine/posix/tcp_posix_socket_utils_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
@ -18271,6 +18221,7 @@ endif()
if(gRPC_BUILD_TESTS)
add_executable(test_core_gprpp_load_file_test
src/core/lib/gprpp/load_file.cc
test/core/gprpp/load_file_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
@ -19269,6 +19220,7 @@ if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_executable(traced_buffer_list_test
src/core/lib/event_engine/posix_engine/traced_buffer_list.cc
test/core/event_engine/posix/traced_buffer_list_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc

8
Makefile generated

@ -1399,13 +1399,10 @@ LIBGRPC_SRC = \
src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc \
src/core/lib/event_engine/posix_engine/internal_errqueue.cc \
src/core/lib/event_engine/posix_engine/lockfree_event.cc \
src/core/lib/event_engine/posix_engine/posix_endpoint.cc \
src/core/lib/event_engine/posix_engine/posix_engine.cc \
src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc \
src/core/lib/event_engine/posix_engine/timer.cc \
src/core/lib/event_engine/posix_engine/timer_heap.cc \
src/core/lib/event_engine/posix_engine/timer_manager.cc \
src/core/lib/event_engine/posix_engine/traced_buffer_list.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc \
@ -1421,7 +1418,6 @@ LIBGRPC_SRC = \
src/core/lib/event_engine/windows/windows_engine.cc \
src/core/lib/experiments/config.cc \
src/core/lib/experiments/experiments.cc \
src/core/lib/gprpp/load_file.cc \
src/core/lib/gprpp/status_helper.cc \
src/core/lib/gprpp/time.cc \
src/core/lib/gprpp/time_averaged_stats.cc \
@ -1917,13 +1913,10 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc \
src/core/lib/event_engine/posix_engine/internal_errqueue.cc \
src/core/lib/event_engine/posix_engine/lockfree_event.cc \
src/core/lib/event_engine/posix_engine/posix_endpoint.cc \
src/core/lib/event_engine/posix_engine/posix_engine.cc \
src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc \
src/core/lib/event_engine/posix_engine/timer.cc \
src/core/lib/event_engine/posix_engine/timer_heap.cc \
src/core/lib/event_engine/posix_engine/timer_manager.cc \
src/core/lib/event_engine/posix_engine/traced_buffer_list.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc \
@ -1939,7 +1932,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/event_engine/windows/windows_engine.cc \
src/core/lib/experiments/config.cc \
src/core/lib/experiments/experiments.cc \
src/core/lib/gprpp/load_file.cc \
src/core/lib/gprpp/status_helper.cc \
src/core/lib/gprpp/time.cc \
src/core/lib/gprpp/time_averaged_stats.cc \

@ -756,14 +756,11 @@ libs:
- src/core/lib/event_engine/posix_engine/event_poller_posix_default.h
- src/core/lib/event_engine/posix_engine/internal_errqueue.h
- src/core/lib/event_engine/posix_engine/lockfree_event.h
- src/core/lib/event_engine/posix_engine/posix_endpoint.h
- src/core/lib/event_engine/posix_engine/posix_engine.h
- src/core/lib/event_engine/posix_engine/posix_engine_closure.h
- src/core/lib/event_engine/posix_engine/tcp_socket_utils.h
- src/core/lib/event_engine/posix_engine/timer.h
- src/core/lib/event_engine/posix_engine/timer_heap.h
- src/core/lib/event_engine/posix_engine/timer_manager.h
- src/core/lib/event_engine/posix_engine/traced_buffer_list.h
- src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h
- src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h
- src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h
@ -785,7 +782,6 @@ libs:
- src/core/lib/gprpp/cpp_impl_of.h
- src/core/lib/gprpp/debug_location.h
- src/core/lib/gprpp/dual_ref_counted.h
- src/core/lib/gprpp/load_file.h
- src/core/lib/gprpp/manual_constructor.h
- src/core/lib/gprpp/match.h
- src/core/lib/gprpp/notification.h
@ -1483,13 +1479,10 @@ libs:
- src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc
- src/core/lib/event_engine/posix_engine/internal_errqueue.cc
- src/core/lib/event_engine/posix_engine/lockfree_event.cc
- src/core/lib/event_engine/posix_engine/posix_endpoint.cc
- src/core/lib/event_engine/posix_engine/posix_engine.cc
- src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
- src/core/lib/event_engine/posix_engine/timer.cc
- src/core/lib/event_engine/posix_engine/timer_heap.cc
- src/core/lib/event_engine/posix_engine/timer_manager.cc
- src/core/lib/event_engine/posix_engine/traced_buffer_list.cc
- src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc
- src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc
- src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc
@ -1505,7 +1498,6 @@ libs:
- src/core/lib/event_engine/windows/windows_engine.cc
- src/core/lib/experiments/config.cc
- src/core/lib/experiments/experiments.cc
- src/core/lib/gprpp/load_file.cc
- src/core/lib/gprpp/status_helper.cc
- src/core/lib/gprpp/time.cc
- src/core/lib/gprpp/time_averaged_stats.cc
@ -2020,14 +2012,11 @@ libs:
- src/core/lib/event_engine/posix_engine/event_poller_posix_default.h
- src/core/lib/event_engine/posix_engine/internal_errqueue.h
- src/core/lib/event_engine/posix_engine/lockfree_event.h
- src/core/lib/event_engine/posix_engine/posix_endpoint.h
- src/core/lib/event_engine/posix_engine/posix_engine.h
- src/core/lib/event_engine/posix_engine/posix_engine_closure.h
- src/core/lib/event_engine/posix_engine/tcp_socket_utils.h
- src/core/lib/event_engine/posix_engine/timer.h
- src/core/lib/event_engine/posix_engine/timer_heap.h
- src/core/lib/event_engine/posix_engine/timer_manager.h
- src/core/lib/event_engine/posix_engine/traced_buffer_list.h
- src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h
- src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h
- src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h
@ -2049,7 +2038,6 @@ libs:
- src/core/lib/gprpp/cpp_impl_of.h
- src/core/lib/gprpp/debug_location.h
- src/core/lib/gprpp/dual_ref_counted.h
- src/core/lib/gprpp/load_file.h
- src/core/lib/gprpp/manual_constructor.h
- src/core/lib/gprpp/match.h
- src/core/lib/gprpp/notification.h
@ -2393,13 +2381,10 @@ libs:
- src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc
- src/core/lib/event_engine/posix_engine/internal_errqueue.cc
- src/core/lib/event_engine/posix_engine/lockfree_event.cc
- src/core/lib/event_engine/posix_engine/posix_endpoint.cc
- src/core/lib/event_engine/posix_engine/posix_engine.cc
- src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
- src/core/lib/event_engine/posix_engine/timer.cc
- src/core/lib/event_engine/posix_engine/timer_heap.cc
- src/core/lib/event_engine/posix_engine/timer_manager.cc
- src/core/lib/event_engine/posix_engine/traced_buffer_list.cc
- src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc
- src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc
- src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc
@ -2415,7 +2400,6 @@ libs:
- src/core/lib/event_engine/windows/windows_engine.cc
- src/core/lib/experiments/config.cc
- src/core/lib/experiments/experiments.cc
- src/core/lib/gprpp/load_file.cc
- src/core/lib/gprpp/status_helper.cc
- src/core/lib/gprpp/time.cc
- src/core/lib/gprpp/time_averaged_stats.cc
@ -7806,10 +7790,6 @@ targets:
- test/core/event_engine/posix/lock_free_event_test.cc
deps:
- grpc_test_util
platforms:
- linux
- posix
- mac
uses_polling: false
- name: log_test
gtest: true
@ -8508,11 +8488,21 @@ targets:
build: test
language: c++
headers:
- src/core/lib/event_engine/posix_engine/posix_endpoint.h
- src/core/lib/event_engine/posix_engine/tcp_socket_utils.h
- src/core/lib/event_engine/posix_engine/traced_buffer_list.h
- src/core/lib/gprpp/load_file.h
- src/core/lib/iomgr/socket_mutator.h
- test/core/event_engine/posix/posix_engine_test_utils.h
- test/core/event_engine/test_suite/event_engine_test.h
- test/core/event_engine/test_suite/event_engine_test_utils.h
- test/core/event_engine/test_suite/oracle_event_engine_posix.h
src:
- src/core/lib/event_engine/posix_engine/posix_endpoint.cc
- src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
- src/core/lib/event_engine/posix_engine/traced_buffer_list.cc
- src/core/lib/gprpp/load_file.cc
- src/core/lib/iomgr/socket_mutator.cc
- test/core/event_engine/posix/posix_endpoint_test.cc
- test/core/event_engine/posix/posix_engine_test_utils.cc
- test/core/event_engine/test_suite/event_engine_test.cc
@ -8524,25 +8514,6 @@ targets:
- linux
- posix
- mac
- name: posix_event_engine_connect_test
gtest: true
build: test
language: c++
headers:
- test/core/event_engine/test_suite/event_engine_test.h
- test/core/event_engine/test_suite/event_engine_test_utils.h
- test/core/event_engine/test_suite/oracle_event_engine_posix.h
src:
- test/core/event_engine/posix/posix_event_engine_connect_test.cc
- test/core/event_engine/test_suite/event_engine_test.cc
- test/core/event_engine/test_suite/event_engine_test_utils.cc
- test/core/event_engine/test_suite/oracle_event_engine_posix.cc
deps:
- grpc_test_util
platforms:
- linux
- posix
- mac
- name: posix_event_engine_test
gtest: true
build: test
@ -8550,12 +8521,9 @@ targets:
headers:
- test/core/event_engine/test_suite/event_engine_test.h
- test/core/event_engine/test_suite/event_engine_test_utils.h
- test/core/event_engine/test_suite/oracle_event_engine_posix.h
src:
- test/core/event_engine/test_suite/client_test.cc
- test/core/event_engine/test_suite/event_engine_test.cc
- test/core/event_engine/test_suite/event_engine_test_utils.cc
- test/core/event_engine/test_suite/oracle_event_engine_posix.cc
- test/core/event_engine/test_suite/posix_event_engine_test.cc
- test/core/event_engine/test_suite/timer_test.cc
deps:
@ -8564,6 +8532,7 @@ targets:
- linux
- posix
- mac
uses_polling: false
- name: promise_factory_test
gtest: true
build: test
@ -10007,8 +9976,12 @@ targets:
gtest: true
build: test
language: c++
headers: []
headers:
- src/core/lib/event_engine/posix_engine/tcp_socket_utils.h
- src/core/lib/iomgr/socket_mutator.h
src:
- src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
- src/core/lib/iomgr/socket_mutator.cc
- test/core/event_engine/posix/tcp_posix_socket_utils_test.cc
deps:
- grpc_test_util
@ -10136,8 +10109,10 @@ targets:
gtest: true
build: test
language: c++
headers: []
headers:
- src/core/lib/gprpp/load_file.h
src:
- src/core/lib/gprpp/load_file.cc
- test/core/gprpp/load_file_test.cc
deps:
- grpc_test_util
@ -10557,8 +10532,10 @@ targets:
gtest: true
build: test
language: c++
headers: []
headers:
- src/core/lib/event_engine/posix_engine/traced_buffer_list.h
src:
- src/core/lib/event_engine/posix_engine/traced_buffer_list.cc
- test/core/event_engine/posix/traced_buffer_list_test.cc
deps:
- grpc_test_util

4
config.m4 generated

@ -481,13 +481,10 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc \
src/core/lib/event_engine/posix_engine/internal_errqueue.cc \
src/core/lib/event_engine/posix_engine/lockfree_event.cc \
src/core/lib/event_engine/posix_engine/posix_endpoint.cc \
src/core/lib/event_engine/posix_engine/posix_engine.cc \
src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc \
src/core/lib/event_engine/posix_engine/timer.cc \
src/core/lib/event_engine/posix_engine/timer_heap.cc \
src/core/lib/event_engine/posix_engine/timer_manager.cc \
src/core/lib/event_engine/posix_engine/traced_buffer_list.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc \
@ -537,7 +534,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/gprpp/fork.cc \
src/core/lib/gprpp/global_config_env.cc \
src/core/lib/gprpp/host_port.cc \
src/core/lib/gprpp/load_file.cc \
src/core/lib/gprpp/mpscq.cc \
src/core/lib/gprpp/stat_posix.cc \
src/core/lib/gprpp/stat_windows.cc \

4
config.w32 generated

@ -447,13 +447,10 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\event_engine\\posix_engine\\event_poller_posix_default.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\internal_errqueue.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\lockfree_event.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\posix_endpoint.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\posix_engine.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\tcp_socket_utils.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\timer.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\timer_heap.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\timer_manager.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\traced_buffer_list.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\wakeup_fd_eventfd.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\wakeup_fd_pipe.cc " +
"src\\core\\lib\\event_engine\\posix_engine\\wakeup_fd_posix_default.cc " +
@ -503,7 +500,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\gprpp\\fork.cc " +
"src\\core\\lib\\gprpp\\global_config_env.cc " +
"src\\core\\lib\\gprpp\\host_port.cc " +
"src\\core\\lib\\gprpp\\load_file.cc " +
"src\\core\\lib\\gprpp\\mpscq.cc " +
"src\\core\\lib\\gprpp\\stat_posix.cc " +
"src\\core\\lib\\gprpp\\stat_windows.cc " +

8
gRPC-C++.podspec generated

@ -696,14 +696,11 @@ Pod::Spec.new do |s|
'src/core/lib/event_engine/posix_engine/event_poller_posix_default.h',
'src/core/lib/event_engine/posix_engine/internal_errqueue.h',
'src/core/lib/event_engine/posix_engine/lockfree_event.h',
'src/core/lib/event_engine/posix_engine/posix_endpoint.h',
'src/core/lib/event_engine/posix_engine/posix_engine.h',
'src/core/lib/event_engine/posix_engine/posix_engine_closure.h',
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.h',
'src/core/lib/event_engine/posix_engine/timer.h',
'src/core/lib/event_engine/posix_engine/timer_heap.h',
'src/core/lib/event_engine/posix_engine/timer_manager.h',
'src/core/lib/event_engine/posix_engine/traced_buffer_list.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h',
@ -739,7 +736,6 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/global_config_env.h',
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.h',
'src/core/lib/gprpp/load_file.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/match.h',
'src/core/lib/gprpp/memory.h',
@ -1576,14 +1572,11 @@ Pod::Spec.new do |s|
'src/core/lib/event_engine/posix_engine/event_poller_posix_default.h',
'src/core/lib/event_engine/posix_engine/internal_errqueue.h',
'src/core/lib/event_engine/posix_engine/lockfree_event.h',
'src/core/lib/event_engine/posix_engine/posix_endpoint.h',
'src/core/lib/event_engine/posix_engine/posix_engine.h',
'src/core/lib/event_engine/posix_engine/posix_engine_closure.h',
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.h',
'src/core/lib/event_engine/posix_engine/timer.h',
'src/core/lib/event_engine/posix_engine/timer_heap.h',
'src/core/lib/event_engine/posix_engine/timer_manager.h',
'src/core/lib/event_engine/posix_engine/traced_buffer_list.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h',
@ -1619,7 +1612,6 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/global_config_env.h',
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.h',
'src/core/lib/gprpp/load_file.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/match.h',
'src/core/lib/gprpp/memory.h',

12
gRPC-Core.podspec generated

@ -1074,21 +1074,15 @@ Pod::Spec.new do |s|
'src/core/lib/event_engine/posix_engine/internal_errqueue.h',
'src/core/lib/event_engine/posix_engine/lockfree_event.cc',
'src/core/lib/event_engine/posix_engine/lockfree_event.h',
'src/core/lib/event_engine/posix_engine/posix_endpoint.cc',
'src/core/lib/event_engine/posix_engine/posix_endpoint.h',
'src/core/lib/event_engine/posix_engine/posix_engine.cc',
'src/core/lib/event_engine/posix_engine/posix_engine.h',
'src/core/lib/event_engine/posix_engine/posix_engine_closure.h',
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc',
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.h',
'src/core/lib/event_engine/posix_engine/timer.cc',
'src/core/lib/event_engine/posix_engine/timer.h',
'src/core/lib/event_engine/posix_engine/timer_heap.cc',
'src/core/lib/event_engine/posix_engine/timer_heap.h',
'src/core/lib/event_engine/posix_engine/timer_manager.cc',
'src/core/lib/event_engine/posix_engine/timer_manager.h',
'src/core/lib/event_engine/posix_engine/traced_buffer_list.cc',
'src/core/lib/event_engine/posix_engine/traced_buffer_list.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc',
@ -1173,8 +1167,6 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.cc',
'src/core/lib/gprpp/host_port.h',
'src/core/lib/gprpp/load_file.cc',
'src/core/lib/gprpp/load_file.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/match.h',
'src/core/lib/gprpp/memory.h',
@ -2217,14 +2209,11 @@ Pod::Spec.new do |s|
'src/core/lib/event_engine/posix_engine/event_poller_posix_default.h',
'src/core/lib/event_engine/posix_engine/internal_errqueue.h',
'src/core/lib/event_engine/posix_engine/lockfree_event.h',
'src/core/lib/event_engine/posix_engine/posix_endpoint.h',
'src/core/lib/event_engine/posix_engine/posix_engine.h',
'src/core/lib/event_engine/posix_engine/posix_engine_closure.h',
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.h',
'src/core/lib/event_engine/posix_engine/timer.h',
'src/core/lib/event_engine/posix_engine/timer_heap.h',
'src/core/lib/event_engine/posix_engine/timer_manager.h',
'src/core/lib/event_engine/posix_engine/traced_buffer_list.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h',
'src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h',
@ -2260,7 +2249,6 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/global_config_env.h',
'src/core/lib/gprpp/global_config_generic.h',
'src/core/lib/gprpp/host_port.h',
'src/core/lib/gprpp/load_file.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/match.h',
'src/core/lib/gprpp/memory.h',

8
grpc.gemspec generated

@ -985,21 +985,15 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/event_engine/posix_engine/internal_errqueue.h )
s.files += %w( src/core/lib/event_engine/posix_engine/lockfree_event.cc )
s.files += %w( src/core/lib/event_engine/posix_engine/lockfree_event.h )
s.files += %w( src/core/lib/event_engine/posix_engine/posix_endpoint.cc )
s.files += %w( src/core/lib/event_engine/posix_engine/posix_endpoint.h )
s.files += %w( src/core/lib/event_engine/posix_engine/posix_engine.cc )
s.files += %w( src/core/lib/event_engine/posix_engine/posix_engine.h )
s.files += %w( src/core/lib/event_engine/posix_engine/posix_engine_closure.h )
s.files += %w( src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc )
s.files += %w( src/core/lib/event_engine/posix_engine/tcp_socket_utils.h )
s.files += %w( src/core/lib/event_engine/posix_engine/timer.cc )
s.files += %w( src/core/lib/event_engine/posix_engine/timer.h )
s.files += %w( src/core/lib/event_engine/posix_engine/timer_heap.cc )
s.files += %w( src/core/lib/event_engine/posix_engine/timer_heap.h )
s.files += %w( src/core/lib/event_engine/posix_engine/timer_manager.cc )
s.files += %w( src/core/lib/event_engine/posix_engine/timer_manager.h )
s.files += %w( src/core/lib/event_engine/posix_engine/traced_buffer_list.cc )
s.files += %w( src/core/lib/event_engine/posix_engine/traced_buffer_list.h )
s.files += %w( src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc )
s.files += %w( src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h )
s.files += %w( src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc )
@ -1084,8 +1078,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gprpp/global_config_generic.h )
s.files += %w( src/core/lib/gprpp/host_port.cc )
s.files += %w( src/core/lib/gprpp/host_port.h )
s.files += %w( src/core/lib/gprpp/load_file.cc )
s.files += %w( src/core/lib/gprpp/load_file.h )
s.files += %w( src/core/lib/gprpp/manual_constructor.h )
s.files += %w( src/core/lib/gprpp/match.h )
s.files += %w( src/core/lib/gprpp/memory.h )

8
grpc.gyp generated

@ -813,13 +813,10 @@
'src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc',
'src/core/lib/event_engine/posix_engine/internal_errqueue.cc',
'src/core/lib/event_engine/posix_engine/lockfree_event.cc',
'src/core/lib/event_engine/posix_engine/posix_endpoint.cc',
'src/core/lib/event_engine/posix_engine/posix_engine.cc',
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc',
'src/core/lib/event_engine/posix_engine/timer.cc',
'src/core/lib/event_engine/posix_engine/timer_heap.cc',
'src/core/lib/event_engine/posix_engine/timer_manager.cc',
'src/core/lib/event_engine/posix_engine/traced_buffer_list.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc',
@ -835,7 +832,6 @@
'src/core/lib/event_engine/windows/windows_engine.cc',
'src/core/lib/experiments/config.cc',
'src/core/lib/experiments/experiments.cc',
'src/core/lib/gprpp/load_file.cc',
'src/core/lib/gprpp/status_helper.cc',
'src/core/lib/gprpp/time.cc',
'src/core/lib/gprpp/time_averaged_stats.cc',
@ -1278,13 +1274,10 @@
'src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc',
'src/core/lib/event_engine/posix_engine/internal_errqueue.cc',
'src/core/lib/event_engine/posix_engine/lockfree_event.cc',
'src/core/lib/event_engine/posix_engine/posix_endpoint.cc',
'src/core/lib/event_engine/posix_engine/posix_engine.cc',
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc',
'src/core/lib/event_engine/posix_engine/timer.cc',
'src/core/lib/event_engine/posix_engine/timer_heap.cc',
'src/core/lib/event_engine/posix_engine/timer_manager.cc',
'src/core/lib/event_engine/posix_engine/traced_buffer_list.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc',
@ -1300,7 +1293,6 @@
'src/core/lib/event_engine/windows/windows_engine.cc',
'src/core/lib/experiments/config.cc',
'src/core/lib/experiments/experiments.cc',
'src/core/lib/gprpp/load_file.cc',
'src/core/lib/gprpp/status_helper.cc',
'src/core/lib/gprpp/time.cc',
'src/core/lib/gprpp/time_averaged_stats.cc',

8
package.xml generated

@ -967,21 +967,15 @@
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/internal_errqueue.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/lockfree_event.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/lockfree_event.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/posix_endpoint.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/posix_endpoint.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/posix_engine.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/posix_engine.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/posix_engine_closure.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/timer.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/timer.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/timer_heap.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/timer_heap.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/timer_manager.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/timer_manager.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/traced_buffer_list.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/traced_buffer_list.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc" role="src" />
@ -1066,8 +1060,6 @@
<file baseinstalldir="/" name="src/core/lib/gprpp/global_config_generic.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/host_port.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/host_port.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/load_file.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/load_file.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/manual_constructor.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/match.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/memory.h" role="src" />

@ -1462,6 +1462,7 @@ grpc_cc_library(
"absl/status",
"absl/status:statusor",
"absl/strings",
"absl/synchronization",
],
deps = [
"event_engine_poller",
@ -1495,6 +1496,7 @@ grpc_cc_library(
"absl/status",
"absl/status:statusor",
"absl/strings",
"absl/synchronization",
],
deps = [
"common_event_engine_closures",
@ -1585,7 +1587,6 @@ grpc_cc_library(
"absl/types:optional",
],
deps = [
"event_engine_common",
"experiments",
"iomgr_port",
"load_file",
@ -1664,12 +1665,8 @@ grpc_cc_library(
hdrs = ["lib/event_engine/posix_engine/posix_engine.h"],
external_deps = [
"absl/base:core_headers",
"absl/cleanup",
"absl/container:flat_hash_map",
"absl/container:flat_hash_set",
"absl/functional:any_invocable",
"absl/hash",
"absl/meta:type_traits",
"absl/status",
"absl/status:statusor",
"absl/strings",
@ -1683,11 +1680,8 @@ grpc_cc_library(
"experiments",
"init_internally",
"iomgr_port",
"posix_event_engine_closure",
"posix_event_engine_endpoint",
"posix_event_engine_event_poller",
"posix_event_engine_poller_posix_default",
"posix_event_engine_tcp_socket_utils",
"posix_event_engine_timer",
"posix_event_engine_timer_manager",
"//:event_engine_base_hdrs",

@ -40,16 +40,10 @@ class Poller {
// polling.
//
// Returns:
// * Poller::WorkResult::kKicked if it was Kicked. A poller that was Kicked
// may still process some events and if so, it may have run the
// schedule_poll_again callback function synchronously. When the poller
// returns Poller::WorkResult::kKicked tts upto the user to determine
// if the schedule_poll_again callback has run or not.
// * Poller::WorkResult::kDeadlineExceeded if timeout occurred. The
// schedule_poll_again callback is not run in this case.
// * Poller::WorkResult::kOk, otherwise indicating that the
// schedule_poll_again callback function was run synchonously before some
// events were processed.
// * Poller::WorkResult::kKicked if it was Kicked.
// * Poller::WorkResult::kDeadlineExceeded if timeout occurred
// * Poller::WorkResult::kOk, otherwise indicating that the callback function
// was run synchonously before some events were processed.
virtual WorkResult Work(EventEngine::Duration timeout,
absl::FunctionRef<void()> schedule_poll_again) = 0;
// Trigger the threads executing Work(..) to break out as soon as possible.

@ -40,6 +40,8 @@
#include <sys/socket.h>
#include <unistd.h>
#include "absl/synchronization/mutex.h"
#include "src/core/lib/event_engine/posix_engine/event_poller.h"
#include "src/core/lib/event_engine/posix_engine/lockfree_event.h"
#include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h"
@ -47,7 +49,6 @@
#include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h"
#include "src/core/lib/gprpp/fork.h"
#include "src/core/lib/gprpp/strerror.h"
#include "src/core/lib/gprpp/sync.h"
using ::grpc_event_engine::posix_engine::LockfreeEvent;
using ::grpc_event_engine::posix_engine::WakeupFd;
@ -137,7 +138,7 @@ class Epoll1EventHandle : public EventHandle {
error_closure_->SetReady();
}
}
grpc_core::Mutex* mu() { return &mu_; }
absl::Mutex* mu() { return &mu_; }
LockfreeEvent* ReadClosure() { return read_closure_.get(); }
LockfreeEvent* WriteClosure() { return write_closure_.get(); }
LockfreeEvent* ErrorClosure() { return error_closure_.get(); }
@ -148,7 +149,7 @@ class Epoll1EventHandle : public EventHandle {
void HandleShutdownInternal(absl::Status why, bool releasing_fd);
// See Epoll1Poller::ShutdownHandle for explanation on why a mutex is
// required.
grpc_core::Mutex mu_;
absl::Mutex mu_;
int fd_;
// See Epoll1Poller::SetPendingActions for explanation on why pending_<***>_
// need to be atomic.
@ -306,7 +307,7 @@ void Epoll1EventHandle::OrphanHandle(PosixEngineClosure* on_done,
{
// See Epoll1Poller::ShutdownHandle for explanation on why a mutex is
// required here.
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
read_closure_->DestroyEvent();
write_closure_->DestroyEvent();
error_closure_->DestroyEvent();
@ -315,7 +316,7 @@ void Epoll1EventHandle::OrphanHandle(PosixEngineClosure* on_done,
pending_write_.store(false, std::memory_order_release);
pending_error_.store(false, std::memory_order_release);
{
grpc_core::MutexLock lock(&poller_->mu_);
absl::MutexLock lock(&poller_->mu_);
poller_->free_epoll1_handles_list_.push_back(this);
}
if (on_done != nullptr) {
@ -373,7 +374,7 @@ Epoll1Poller::~Epoll1Poller() {
g_epoll_set_.epfd = -1;
}
{
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
while (!free_epoll1_handles_list_.empty()) {
Epoll1EventHandle* handle = reinterpret_cast<Epoll1EventHandle*>(
free_epoll1_handles_list_.front());
@ -387,7 +388,7 @@ EventHandle* Epoll1Poller::CreateHandle(int fd, absl::string_view /*name*/,
bool track_err) {
Epoll1EventHandle* new_handle = nullptr;
{
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
if (free_epoll1_handles_list_.empty()) {
new_handle = new Epoll1EventHandle(fd, this);
} else {
@ -486,7 +487,7 @@ void Epoll1EventHandle::ShutdownHandle(absl::Status why) {
// in parallel is not safe because some of the lockfree event types e.g, read,
// write, error may-not have called SetShutdown when DestroyEvent gets
// called in the OrphanHandle method.
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
HandleShutdownInternal(why, false);
}
@ -520,20 +521,18 @@ Poller::WorkResult Epoll1Poller::Work(
EventEngine::Duration timeout,
absl::FunctionRef<void()> schedule_poll_again) {
Events pending_events;
bool was_kicked_ext = false;
if (g_epoll_set_.cursor == g_epoll_set_.num_events) {
if (DoEpollWait(timeout) == 0) {
return Poller::WorkResult::kDeadlineExceeded;
}
}
{
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
// If was_kicked_ is true, collect all pending events in this iteration.
if (ProcessEpollEvents(
was_kicked_ ? INT_MAX : MAX_EPOLL_EVENTS_HANDLED_PER_ITERATION,
pending_events)) {
was_kicked_ = false;
was_kicked_ext = true;
}
if (pending_events.empty()) {
return Poller::WorkResult::kKicked;
@ -545,11 +544,11 @@ Poller::WorkResult Epoll1Poller::Work(
for (auto& it : pending_events) {
it->ExecutePendingActions();
}
return was_kicked_ext ? Poller::WorkResult::kKicked : Poller::WorkResult::kOk;
return Poller::WorkResult::kOk;
}
void Epoll1Poller::Kick() {
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
if (was_kicked_) {
return;
}

@ -24,6 +24,7 @@
#include "absl/container/inlined_vector.h"
#include "absl/functional/function_ref.h"
#include "absl/strings/string_view.h"
#include "absl/synchronization/mutex.h"
#include <grpc/event_engine/event_engine.h>
@ -31,7 +32,6 @@
#include "src/core/lib/event_engine/posix_engine/event_poller.h"
#include "src/core/lib/event_engine/posix_engine/internal_errqueue.h"
#include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/port.h"
#ifdef GRPC_LINUX_EPOLL
@ -110,7 +110,7 @@ class Epoll1Poller : public PosixEventPoller {
#else
struct EpollSet {};
#endif
grpc_core::Mutex mu_;
absl::Mutex mu_;
Scheduler* scheduler_;
// A singleton epoll set
EpollSet g_epoll_set_;

@ -49,6 +49,8 @@
#include <sys/socket.h>
#include <unistd.h>
#include "absl/synchronization/mutex.h"
#include <grpc/support/alloc.h>
#include "src/core/lib/event_engine/common_closures.h"
@ -58,7 +60,6 @@
#include "src/core/lib/gprpp/fork.h"
#include "src/core/lib/gprpp/global_config.h"
#include "src/core/lib/gprpp/strerror.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/time.h"
GPR_GLOBAL_CONFIG_DECLARE_STRING(grpc_poll_strategy);
@ -99,7 +100,7 @@ class PollEventHandle : public EventHandle {
write_closure_(
reinterpret_cast<PosixEngineClosure*>(kClosureNotReady)) {
poller_->Ref();
grpc_core::MutexLock lock(&poller_->mu_);
absl::MutexLock lock(&poller_->mu_);
poller_->PollerHandlesListAddHandle(this);
}
PollPoller* Poller() override { return poller_; }
@ -117,7 +118,7 @@ class PollEventHandle : public EventHandle {
return false;
}
void ForceRemoveHandleFromPoller() {
grpc_core::MutexLock lock(&poller_->mu_);
absl::MutexLock lock(&poller_->mu_);
poller_->PollerHandlesListRemoveHandle(this);
}
int WrappedFd() override { return fd_; }
@ -154,13 +155,13 @@ class PollEventHandle : public EventHandle {
void SetWritable() override;
void SetHasError() override;
bool IsHandleShutdown() override {
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
return is_shutdown_;
};
inline void ExecutePendingActions() {
int kick = 0;
{
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
if ((pending_actions_ & 1UL)) {
if (SetReadyLocked(&read_closure_)) {
kick = 1;
@ -195,7 +196,7 @@ class PollEventHandle : public EventHandle {
}
}
~PollEventHandle() override = default;
grpc_core::Mutex* mu() ABSL_LOCK_RETURNED(mu_) { return &mu_; }
absl::Mutex* mu() ABSL_LOCK_RETURNED(mu_) { return &mu_; }
PollPoller::HandlesList& ForkFdListPos() { return fork_fd_list_; }
PollPoller::HandlesList& PollerHandlesListPos() {
return poller_handles_list_;
@ -210,7 +211,7 @@ class PollEventHandle : public EventHandle {
int NotifyOnLocked(PosixEngineClosure** st, PosixEngineClosure* closure);
// See Epoll1Poller::ShutdownHandle for explanation on why a mutex is
// required.
grpc_core::Mutex mu_;
absl::Mutex mu_;
std::atomic<int> ref_count_{1};
int fd_;
int pending_actions_;
@ -360,11 +361,11 @@ EventHandle* PollPoller::CreateHandle(int fd, absl::string_view /*name*/,
}
void PollEventHandle::OrphanHandle(PosixEngineClosure* on_done, int* release_fd,
absl::string_view /*reason*/) {
absl::string_view /* reason */) {
ForkFdListRemoveHandle(this);
ForceRemoveHandleFromPoller();
{
grpc_core::ReleasableMutexLock lock(&mu_);
absl::ReleasableMutexLock lock(&mu_);
on_done_ = on_done;
released_ = release_fd != nullptr;
if (release_fd != nullptr) {
@ -447,7 +448,7 @@ void PollEventHandle::ShutdownHandle(absl::Status why) {
// of a closure which calls OrphanHandle or poller->Shutdown() prematurely.
Ref();
{
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
// only shutdown once
if (!is_shutdown_) {
is_shutdown_ = true;
@ -468,7 +469,7 @@ void PollEventHandle::NotifyOnRead(PosixEngineClosure* on_read) {
// poller->Shutdown() prematurely.
Ref();
{
grpc_core::ReleasableMutexLock lock(&mu_);
absl::ReleasableMutexLock lock(&mu_);
if (NotifyOnLocked(&read_closure_, on_read)) {
lock.Release();
// NotifyOnLocked immediately scheduled some closure. It would have set
@ -490,7 +491,7 @@ void PollEventHandle::NotifyOnWrite(PosixEngineClosure* on_write) {
// poller->Shutdown() prematurely.
Ref();
{
grpc_core::ReleasableMutexLock lock(&mu_);
absl::ReleasableMutexLock lock(&mu_);
if (NotifyOnLocked(&write_closure_, on_write)) {
lock.Release();
// NotifyOnLocked immediately scheduled some closure. It would have set
@ -516,7 +517,7 @@ void PollEventHandle::NotifyOnError(PosixEngineClosure* on_error) {
void PollEventHandle::SetReadable() {
Ref();
{
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
SetReadyLocked(&read_closure_);
}
Unref();
@ -525,7 +526,7 @@ void PollEventHandle::SetReadable() {
void PollEventHandle::SetWritable() {
Ref();
{
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
SetReadyLocked(&write_closure_);
}
Unref();
@ -569,7 +570,7 @@ bool PollEventHandle::EndPollLocked(bool got_read, bool got_write) {
}
void PollPoller::KickExternal(bool ext) {
grpc_core::MutexLock lock(&mu_);
absl::MutexLock lock(&mu_);
if (was_kicked_) {
if (ext) {
was_kicked_ext_ = true;
@ -648,7 +649,6 @@ Poller::WorkResult PollPoller::Work(
bool was_kicked_ext = false;
PollEventHandle* watcher_space[inline_elements];
Events pending_events;
pending_events.clear();
int timeout_ms =
static_cast<int>(grpc_event_engine::experimental::Milliseconds(timeout));
mu_.Lock();
@ -684,7 +684,7 @@ Poller::WorkResult PollPoller::Work(
PollEventHandle* head = poll_handles_list_head_;
while (head != nullptr) {
{
grpc_core::MutexLock lock(head->mu());
absl::MutexLock lock(head->mu());
// There shouldn't be any orphaned fds at this point. This is because
// prior to marking a handle as orphaned it is first removed from
// poll handle list for the poller under the poller lock.
@ -733,7 +733,7 @@ Poller::WorkResult PollPoller::Work(
for (i = 1; i < pfd_count; i++) {
PollEventHandle* head = watchers[i];
int watch_mask;
grpc_core::ReleasableMutexLock lock(head->mu());
absl::ReleasableMutexLock lock(head->mu());
if (head->IsWatched(watch_mask)) {
head->SetWatched(-1);
// This fd was Watched with a watch mask > 0.
@ -772,7 +772,7 @@ Poller::WorkResult PollPoller::Work(
for (i = 1; i < pfd_count; i++) {
PollEventHandle* head = watchers[i];
int watch_mask;
grpc_core::ReleasableMutexLock lock(head->mu());
absl::ReleasableMutexLock lock(head->mu());
if (!head->IsWatched(watch_mask) || watch_mask == 0) {
// IsWatched will be false if an orphan was invoked on the
// handle while it was being polled. If watch_mask is 0, then the fd
@ -828,7 +828,7 @@ Poller::WorkResult PollPoller::Work(
for (auto& it : pending_events) {
it->ExecutePendingActions();
}
return was_kicked_ext ? Poller::WorkResult::kKicked : Poller::WorkResult::kOk;
return Poller::WorkResult::kOk;
}
void PollPoller::Shutdown() {

@ -24,13 +24,13 @@
#include "absl/base/thread_annotations.h"
#include "absl/functional/function_ref.h"
#include "absl/strings/string_view.h"
#include "absl/synchronization/mutex.h"
#include <grpc/event_engine/event_engine.h>
#include "src/core/lib/event_engine/poller.h"
#include "src/core/lib/event_engine/posix_engine/event_poller.h"
#include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h"
#include "src/core/lib/gprpp/sync.h"
namespace grpc_event_engine {
namespace posix_engine {
@ -74,7 +74,7 @@ class PollPoller : public PosixEventPoller {
PollEventHandle* next = nullptr;
PollEventHandle* prev = nullptr;
};
grpc_core::Mutex mu_;
absl::Mutex mu_;
Scheduler* scheduler_;
std::atomic<int> ref_count_{1};
bool use_phony_poll_;

@ -15,24 +15,17 @@
#include "src/core/lib/event_engine/posix_engine/posix_engine.h"
#include <algorithm>
#include <atomic>
#include <chrono>
#include <cstring>
#include <memory>
#include <string>
#include <utility>
#include "absl/cleanup/cleanup.h"
#include "absl/container/flat_hash_set.h"
#include "absl/functional/any_invocable.h"
#include "absl/meta/type_traits.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include <grpc/event_engine/event_engine.h>
#include <grpc/event_engine/memory_allocator.h>
#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
@ -44,13 +37,7 @@
#include "src/core/lib/gprpp/sync.h"
#ifdef GRPC_POSIX_SOCKET_TCP
#include <errno.h> // IWYU pragma: keep
#include <stdint.h> // IWYU pragma: keep
#include <sys/socket.h> // IWYU pragma: keep
#include "src/core/lib/event_engine/posix_engine/event_poller.h"
#include "src/core/lib/event_engine/posix_engine/event_poller_posix_default.h"
#include "src/core/lib/event_engine/posix_engine/posix_endpoint.h"
#endif // GRPC_POSIX_SOCKET_TCP
using namespace std::chrono_literals;
@ -59,233 +46,7 @@ namespace grpc_event_engine {
namespace experimental {
#ifdef GRPC_POSIX_SOCKET_TCP
using ::grpc_event_engine::posix_engine::EventHandle;
using ::grpc_event_engine::posix_engine::PosixEngineClosure;
using ::grpc_event_engine::posix_engine::PosixEventPoller;
using ::grpc_event_engine::posix_engine::PosixSocketWrapper;
using ::grpc_event_engine::posix_engine::PosixTcpOptions;
using ::grpc_event_engine::posix_engine::SockaddrToString;
using ::grpc_event_engine::posix_engine::TcpOptionsFromEndpointConfig;
void AsyncConnect::Start(EventEngine::Duration timeout) {
on_writable_ = PosixEngineClosure::ToPermanentClosure(
[this](absl::Status status) { OnWritable(std::move(status)); });
alarm_handle_ = engine_->RunAfter(timeout, [this]() {
OnTimeoutExpired(absl::DeadlineExceededError("connect() timed out"));
});
fd_->NotifyOnWrite(on_writable_);
}
AsyncConnect ::~AsyncConnect() { delete on_writable_; }
void AsyncConnect::OnTimeoutExpired(absl::Status status) {
bool done = false;
{
grpc_core::MutexLock lock(&mu_);
if (fd_ != nullptr) {
fd_->ShutdownHandle(std::move(status));
}
done = (--refs_ == 0);
}
if (done) {
delete this;
}
}
void AsyncConnect::OnWritable(absl::Status status)
ABSL_NO_THREAD_SAFETY_ANALYSIS {
int so_error = 0;
socklen_t so_error_size;
int err;
int done;
int consumed_refs = 1;
EventHandle* fd;
absl::StatusOr<std::unique_ptr<EventEngine::Endpoint>> ep;
mu_.Lock();
GPR_ASSERT(fd_ != nullptr);
fd = std::exchange(fd_, nullptr);
bool connect_cancelled = connect_cancelled_;
if (fd->IsHandleShutdown() && status.ok()) {
if (!connect_cancelled) {
// status is OK and handle has been shutdown but the connect was not
// cancelled. This can happen if the timeout expired and the while the
// OnWritable just started executing.
status = absl::DeadlineExceededError("connect() timed out");
} else {
// This can happen if the connection was cancelled while the OnWritable
// just started executing.
status = absl::FailedPreconditionError("Connection cancelled");
}
}
mu_.Unlock();
if (engine_->Cancel(alarm_handle_)) {
++consumed_refs;
}
auto on_writable_finish = absl::MakeCleanup([&]() -> void {
mu_.AssertHeld();
if (!connect_cancelled) {
reinterpret_cast<PosixEventEngine*>(engine_.get())
->OnConnectFinishInternal(connection_handle_);
}
if (fd != nullptr) {
fd->OrphanHandle(nullptr, nullptr, "tcp_client_orphan");
fd = nullptr;
}
if (!status.ok()) {
ep = absl::CancelledError(
absl::StrCat("Failed to connect to remote host: ", resolved_addr_str_,
" with error: ", status.ToString()));
}
// Run the OnConnect callback asynchronously.
if (!connect_cancelled) {
executor_->Run(
[ep = std::move(ep), on_connect = std::move(on_connect_)]() mutable {
if (on_connect) {
on_connect(std::move(ep));
}
});
}
done = ((refs_ -= consumed_refs) == 0);
mu_.Unlock();
if (done) {
delete this;
}
});
mu_.Lock();
if (!status.ok() || connect_cancelled) {
return;
}
do {
so_error_size = sizeof(so_error);
err = getsockopt(fd->WrappedFd(), SOL_SOCKET, SO_ERROR, &so_error,
&so_error_size);
} while (err < 0 && errno == EINTR);
if (err < 0) {
status = absl::FailedPreconditionError(
absl::StrCat("getsockopt: ", std::strerror(errno)));
return;
}
switch (so_error) {
case 0:
ep = CreatePosixEndpoint(fd, nullptr, engine_, std::move(allocator_),
options_);
fd = nullptr;
break;
case ENOBUFS:
// We will get one of these errors if we have run out of
// memory in the kernel for the data structures allocated
// when you connect a socket. If this happens it is very
// likely that if we wait a little bit then try again the
// connection will work (since other programs or this
// program will close their network connections and free up
// memory). This does _not_ indicate that there is anything
// wrong with the server we are connecting to, this is a
// local problem.
// If you are looking at this code, then chances are that
// your program or another program on the same computer
// opened too many network connections. The "easy" fix:
// don't do that!
gpr_log(GPR_ERROR, "kernel out of buffers");
mu_.Unlock();
fd->NotifyOnWrite(on_writable_);
// Don't run the cleanup function for this case.
std::move(on_writable_finish).Cancel();
return;
case ECONNREFUSED:
// This error shouldn't happen for anything other than connect().
status = absl::FailedPreconditionError(
absl::StrCat("connect: ", std::strerror(so_error)));
break;
default:
// We don't really know which syscall triggered the problem here, so
// punt by reporting getsockopt().
status = absl::FailedPreconditionError(
absl::StrCat("getsockopt(SO_ERROR): ", std::strerror(so_error)));
break;
}
}
EventEngine::ConnectionHandle PosixEventEngine::ConnectInternal(
PosixSocketWrapper sock, OnConnectCallback on_connect, ResolvedAddress addr,
MemoryAllocator&& allocator, const PosixTcpOptions& options,
Duration timeout) {
int err;
int saved_errno;
do {
err = connect(sock.Fd(), addr.address(), addr.size());
} while (err < 0 && errno == EINTR);
saved_errno = errno;
auto addr_uri = SockaddrToString(&addr, true);
if (!addr_uri.ok()) {
Run([on_connect = std::move(on_connect),
ep = absl::FailedPreconditionError(absl::StrCat(
"connect failed: ", "invalid addr: ",
addr_uri.value()))]() mutable { on_connect(std::move(ep)); });
return {0, 0};
}
std::string name = absl::StrCat("tcp-client:", addr_uri.value());
PosixEventPoller* poller = poller_manager_->Poller();
EventHandle* handle =
poller->CreateHandle(sock.Fd(), name, poller->CanTrackErrors());
int64_t connection_id = 0;
if (saved_errno == EWOULDBLOCK || saved_errno == EINPROGRESS) {
// Connection is still in progress.
connection_id = last_connection_id_.fetch_add(1, std::memory_order_acq_rel);
}
if (err >= 0) {
// Connection already succeded. Return 0 to discourage any cancellation
// attempts.
Run([on_connect = std::move(on_connect),
ep = CreatePosixEndpoint(handle, nullptr, shared_from_this(),
std::move(allocator), options)]() mutable {
on_connect(std::move(ep));
});
return {0, 0};
}
if (saved_errno != EWOULDBLOCK && saved_errno != EINPROGRESS) {
// Connection already failed. Return 0 to discourage any cancellation
// attempts.
handle->OrphanHandle(nullptr, nullptr, "tcp_client_connect_error");
Run([on_connect = std::move(on_connect),
ep = absl::FailedPreconditionError(
absl::StrCat("connect failed: ", "addr: ", addr_uri.value(),
" error: ", std::strerror(saved_errno)))]() mutable {
on_connect(std::move(ep));
});
return {0, 0};
}
AsyncConnect* ac = new AsyncConnect(
std::move(on_connect), shared_from_this(), executor_.get(), handle,
std::move(allocator), options, addr_uri.value(), connection_id);
int shard_number = connection_id % connection_shards_.size();
struct ConnectionShard* shard = &connection_shards_[shard_number];
{
grpc_core::MutexLock lock(&shard->mu);
shard->pending_connections.insert_or_assign(connection_id, ac);
}
// Start asynchronous connect and return the connection id.
ac->Start(timeout);
return {static_cast<intptr_t>(connection_id), 0};
}
void PosixEventEngine::OnConnectFinishInternal(int connection_handle) {
int shard_number = connection_handle % connection_shards_.size();
struct ConnectionShard* shard = &connection_shards_[shard_number];
{
grpc_core::MutexLock lock(&shard->mu);
shard->pending_connections.erase(connection_handle);
}
}
using grpc_event_engine::posix_engine::PosixEventPoller;
PosixEnginePollerManager::PosixEnginePollerManager(
std::shared_ptr<ThreadPool> executor)
@ -330,14 +91,12 @@ PosixEnginePollerManager::~PosixEnginePollerManager() {
}
PosixEventEngine::PosixEventEngine(PosixEventPoller* poller)
: connection_shards_(std::max(2 * gpr_cpu_num_cores(), 1u)),
executor_(std::make_shared<ThreadPool>()) {
: executor_(std::make_shared<ThreadPool>()) {
poller_manager_ = std::make_shared<PosixEnginePollerManager>(poller);
}
PosixEventEngine::PosixEventEngine()
: connection_shards_(std::max(2 * gpr_cpu_num_cores(), 1u)),
executor_(std::make_shared<ThreadPool>()) {
: executor_(std::make_shared<ThreadPool>()) {
if (grpc_core::IsPosixEventEngineEnablePollingEnabled()) {
poller_manager_ = std::make_shared<PosixEnginePollerManager>(executor_);
if (poller_manager_->Poller() != nullptr) {
@ -477,87 +236,15 @@ bool PosixEventEngine::IsWorkerThread() {
GPR_ASSERT(false && "unimplemented");
}
bool PosixEventEngine::CancelConnect(EventEngine::ConnectionHandle handle) {
#ifdef GRPC_POSIX_SOCKET_TCP
int connection_handle = handle.keys[0];
if (connection_handle <= 0) {
return false;
}
int shard_number = connection_handle % connection_shards_.size();
struct ConnectionShard* shard = &connection_shards_[shard_number];
AsyncConnect* ac = nullptr;
{
grpc_core::MutexLock lock(&shard->mu);
auto it = shard->pending_connections.find(connection_handle);
if (it != shard->pending_connections.end()) {
ac = it->second;
GPR_ASSERT(ac != nullptr);
// Trying to acquire ac->mu here would could cause a deadlock because
// the OnWritable method tries to acquire the two mutexes used
// here in the reverse order. But we dont need to acquire ac->mu before
// incrementing ac->refs here. This is because the OnWritable
// method decrements ac->refs only after deleting the connection handle
// from the corresponding hashmap. If the code enters here, it means
// that deletion hasn't happened yet. The deletion can only happen after
// the corresponding g_shard_mu is unlocked.
++ac->refs_;
// Remove connection from list of active connections.
shard->pending_connections.erase(it);
}
}
if (ac == nullptr) {
return false;
}
ac->mu_.Lock();
bool connection_cancel_success = (ac->fd_ != nullptr);
if (connection_cancel_success) {
// Connection is still pending. The OnWritable callback hasn't executed
// yet because ac->fd != nullptr.
ac->connect_cancelled_ = true;
// Shutdown the fd. This would cause OnWritable to run as soon as
// possible. We dont need to pass a custom error here because it wont be
// used since the on_connect_closure is not run if connect cancellation is
// successfull.
ac->fd_->ShutdownHandle(
absl::FailedPreconditionError("Connection cancelled"));
}
bool done = (--ac->refs_ == 0);
ac->mu_.Unlock();
if (done) {
delete ac;
}
return connection_cancel_success;
#else // GRPC_POSIX_SOCKET_TCP
GPR_ASSERT(false &&
"EventEngine::CancelConnect is not supported on this platform");
#endif // GRPC_POSIX_SOCKET_TCP
bool PosixEventEngine::CancelConnect(EventEngine::ConnectionHandle /*handle*/) {
GPR_ASSERT(false && "unimplemented");
}
EventEngine::ConnectionHandle PosixEventEngine::Connect(
OnConnectCallback on_connect, const ResolvedAddress& addr,
const EndpointConfig& args, MemoryAllocator memory_allocator,
Duration timeout) {
#ifdef GRPC_POSIX_SOCKET_TCP
if (!grpc_core::IsPosixEventEngineEnablePollingEnabled()) {
GPR_ASSERT(
false &&
"EventEngine::Connect is not supported because polling is not enabled");
}
GPR_ASSERT(poller_manager_ != nullptr);
PosixTcpOptions options = TcpOptionsFromEndpointConfig(args);
absl::StatusOr<PosixSocketWrapper::PosixSocketCreateResult> socket =
PosixSocketWrapper::CreateAndPrepareTcpClientSocket(options, addr);
if (!socket.ok()) {
Run([on_connect = std::move(on_connect),
status = socket.status()]() mutable { on_connect(status); });
return {0, 0};
}
return ConnectInternal((*socket).sock, std::move(on_connect),
(*socket).mapped_target_addr,
std::move(memory_allocator), options, timeout);
#else // GRPC_POSIX_SOCKET_TCP
GPR_ASSERT(false && "EventEngine::Connect is not supported on this platform");
#endif // GRPC_POSIX_SOCKET_TCP
OnConnectCallback /*on_connect*/, const ResolvedAddress& /*addr*/,
const EndpointConfig& /*args*/, MemoryAllocator /*memory_allocator*/,
Duration /*timeout*/) {
GPR_ASSERT(false && "unimplemented");
}
absl::StatusOr<std::unique_ptr<EventEngine::Listener>>

@ -15,17 +15,13 @@
#define GRPC_CORE_LIB_EVENT_ENGINE_POSIX_ENGINE_POSIX_ENGINE_H
#include <grpc/support/port_platform.h>
#include <stdint.h>
#include <atomic>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/base/thread_annotations.h"
#include "absl/container/flat_hash_map.h"
#include "absl/functional/any_invocable.h"
#include "absl/hash/hash.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
@ -42,58 +38,10 @@
#include "src/core/lib/iomgr/port.h"
#include "src/core/lib/surface/init_internally.h"
#ifdef GRPC_POSIX_SOCKET_TCP
#include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h"
#include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h"
#endif // GRPC_POSIX_SOCKET_TCP
namespace grpc_event_engine {
namespace experimental {
#ifdef GRPC_POSIX_SOCKET_TCP
// A helper class to handle asynchronous connect operations.
class AsyncConnect {
public:
AsyncConnect(EventEngine::OnConnectCallback on_connect,
std::shared_ptr<EventEngine> engine, ThreadPool* executor,
grpc_event_engine::posix_engine::EventHandle* fd,
MemoryAllocator&& allocator,
const grpc_event_engine::posix_engine::PosixTcpOptions& options,
std::string resolved_addr_str, int64_t connection_handle)
: on_connect_(std::move(on_connect)),
engine_(engine),
executor_(executor),
fd_(fd),
allocator_(std::move(allocator)),
options_(options),
resolved_addr_str_(resolved_addr_str),
connection_handle_(connection_handle),
connect_cancelled_(false) {}
void Start(EventEngine::Duration timeout);
~AsyncConnect();
private:
friend class PosixEventEngine;
void OnTimeoutExpired(absl::Status status);
void OnWritable(absl::Status status) ABSL_NO_THREAD_SAFETY_ANALYSIS;
grpc_core::Mutex mu_;
grpc_event_engine::posix_engine::PosixEngineClosure* on_writable_ = nullptr;
EventEngine::OnConnectCallback on_connect_;
std::shared_ptr<EventEngine> engine_;
ThreadPool* executor_;
EventEngine::TaskHandle alarm_handle_;
int refs_{2};
grpc_event_engine::posix_engine::EventHandle* fd_;
MemoryAllocator allocator_;
grpc_event_engine::posix_engine::PosixTcpOptions options_;
std::string resolved_addr_str_;
int64_t connection_handle_;
bool connect_cancelled_;
};
// A helper class to manager lifetime of the poller associated with the
// posix event engine.
class PosixEnginePollerManager
@ -205,28 +153,8 @@ class PosixEventEngine final : public EventEngine,
absl::AnyInvocable<void()> cb);
#ifdef GRPC_POSIX_SOCKET_TCP
friend class AsyncConnect;
struct ConnectionShard {
grpc_core::Mutex mu;
absl::flat_hash_map<int64_t, AsyncConnect*> pending_connections
ABSL_GUARDED_BY(&mu);
};
static void PollerWorkInternal(
std::shared_ptr<PosixEnginePollerManager> poller_manager);
ConnectionHandle ConnectInternal(
grpc_event_engine::posix_engine::PosixSocketWrapper sock,
OnConnectCallback on_connect, ResolvedAddress addr,
MemoryAllocator&& allocator,
const grpc_event_engine::posix_engine::PosixTcpOptions& options,
Duration timeout);
void OnConnectFinishInternal(int connection_handle);
std::vector<ConnectionShard> connection_shards_;
std::atomic<int64_t> last_connection_id_{1};
#endif // GRPC_POSIX_SOCKET_TCP
grpc_core::Mutex mu_;

@ -456,13 +456,10 @@ CORE_SOURCE_FILES = [
'src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc',
'src/core/lib/event_engine/posix_engine/internal_errqueue.cc',
'src/core/lib/event_engine/posix_engine/lockfree_event.cc',
'src/core/lib/event_engine/posix_engine/posix_endpoint.cc',
'src/core/lib/event_engine/posix_engine/posix_engine.cc',
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc',
'src/core/lib/event_engine/posix_engine/timer.cc',
'src/core/lib/event_engine/posix_engine/timer_heap.cc',
'src/core/lib/event_engine/posix_engine/timer_manager.cc',
'src/core/lib/event_engine/posix_engine/traced_buffer_list.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc',
'src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc',
@ -512,7 +509,6 @@ CORE_SOURCE_FILES = [
'src/core/lib/gprpp/fork.cc',
'src/core/lib/gprpp/global_config_env.cc',
'src/core/lib/gprpp/host_port.cc',
'src/core/lib/gprpp/load_file.cc',
'src/core/lib/gprpp/mpscq.cc',
'src/core/lib/gprpp/stat_posix.cc',
'src/core/lib/gprpp/stat_windows.cc',

@ -104,9 +104,6 @@ grpc_cc_test(
srcs = ["lock_free_event_test.cc"],
external_deps = ["gtest"],
language = "C++",
tags = [
"no_windows",
],
uses_event_engine = True,
uses_polling = False,
deps = [
@ -194,26 +191,3 @@ grpc_cc_test(
"//test/core/util:grpc_test_util",
],
)
grpc_cc_test(
name = "posix_event_engine_connect_test",
srcs = ["posix_event_engine_connect_test.cc"],
external_deps = ["gtest"],
language = "C++",
tags = [
"no_windows",
],
uses_event_engine = True,
uses_polling = True,
deps = [
"//src/core:event_engine_poller",
"//src/core:posix_event_engine",
"//src/core:posix_event_engine_closure",
"//src/core:posix_event_engine_endpoint",
"//src/core:posix_event_engine_event_poller",
"//src/core:posix_event_engine_poller_posix_default",
"//test/core/event_engine/test_suite:conformance_test_base_lib",
"//test/core/event_engine/test_suite:oracle_event_engine_posix",
"//test/core/util:grpc_test_util",
],
)

@ -1,222 +0,0 @@
// Copyright 2022 gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <unistd.h>
#include <algorithm>
#include <chrono>
#include <cstring>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "gtest/gtest.h"
#include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/event_engine/channel_args_endpoint_config.h"
#include "src/core/lib/event_engine/posix_engine/posix_engine.h"
#include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h"
#include "src/core/lib/experiments/experiments.h"
#include "src/core/lib/gprpp/notification.h"
#include "src/core/lib/resource_quota/memory_quota.h"
#include "src/core/lib/resource_quota/resource_quota.h"
#include "test/core/event_engine/test_suite/event_engine_test_utils.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
namespace grpc_event_engine {
namespace posix_engine {
using ::grpc_event_engine::experimental::ChannelArgsEndpointConfig;
using ::grpc_event_engine::experimental::EventEngine;
using ::grpc_event_engine::experimental::PosixEventEngine;
using ::grpc_event_engine::experimental::URIToResolvedAddress;
using ::grpc_event_engine::experimental::WaitForSingleOwner;
using namespace std::chrono_literals;
namespace {
// Creates a server socket listening for one connection on a specific port. It
// then creates another client socket connected to the server socket. This fills
// up the kernel listen queue on the server socket. Any subsequent attempts to
// connect to the server socket will be pending indefinitely. This can be used
// to test Connection timeouts and cancellation attempts.
std::vector<int> CreateConnectedSockets(
EventEngine::ResolvedAddress resolved_addr) {
int server_socket;
int opt = -1;
int client_socket;
int one = 1;
int flags;
std::vector<int> ret_sockets;
// Creating a new socket file descriptor.
if ((server_socket = socket(AF_INET6, SOCK_STREAM, 0)) <= 0) {
gpr_log(GPR_ERROR, "Error creating socket: %s", std::strerror(errno));
abort();
}
// MacOS builds fail if SO_REUSEADDR and SO_REUSEPORT are set in the same
// setsockopt syscall. So they are set separately one after the other.
if (setsockopt(server_socket, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt))) {
gpr_log(GPR_ERROR, "Error setsockopt(SO_REUSEADDR): %s",
std::strerror(errno));
abort();
}
if (setsockopt(server_socket, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) {
gpr_log(GPR_ERROR, "Error setsockopt(SO_REUSEPORT): %s",
std::strerror(errno));
abort();
}
// Bind the new socket to server address.
if (bind(server_socket, resolved_addr.address(), resolved_addr.size()) < 0) {
gpr_log(GPR_ERROR, "Error bind: %s", std::strerror(errno));
abort();
}
// Set the new socket to listen for one active connection at a time.
// accept() is intentionally not called on the socket. This allows the
// connection queue to build up.
if (listen(server_socket, 1) < 0) {
gpr_log(GPR_ERROR, "Error listen: %s", std::strerror(errno));
abort();
}
ret_sockets.push_back(server_socket);
// Create and connect client sockets until the connection attempt times out.
// Even if the backlog specified to listen is 1, the kernel continues to
// accept a certain number of SYN packets before dropping them. This loop
// attempts to identify the number of new connection attempts that will
// be allowed by the kernel before any subsequent connection attempts
// become pending indefinitely.
while (true) {
client_socket = socket(AF_INET6, SOCK_STREAM, 0);
setsockopt(client_socket, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
// Make fd non-blocking.
flags = fcntl(client_socket, F_GETFL, 0);
EXPECT_EQ(fcntl(client_socket, F_SETFL, flags | O_NONBLOCK), 0);
if (connect(client_socket,
const_cast<struct sockaddr*>(resolved_addr.address()),
resolved_addr.size()) == -1) {
if (errno == EINPROGRESS) {
struct pollfd pfd;
pfd.fd = client_socket;
pfd.events = POLLOUT;
pfd.revents = 0;
int ret = poll(&pfd, 1, 1000);
if (ret == -1) {
gpr_log(GPR_ERROR, "poll() failed during connect; errno=%d", errno);
abort();
} else if (ret == 0) {
// current connection attempt timed out. It indicates that the
// kernel will cause any subsequent connection attempts to
// become pending indefinitely.
ret_sockets.push_back(client_socket);
return ret_sockets;
}
} else {
gpr_log(GPR_ERROR, "Failed to connect to the server (errno=%d)", errno);
abort();
}
}
ret_sockets.push_back(client_socket);
}
return ret_sockets;
}
} // namespace
TEST(PosixEventEngineTest, IndefiniteConnectTimeoutOrRstTest) {
std::string target_addr = absl::StrCat(
"ipv6:[::1]:", std::to_string(grpc_pick_unused_port_or_die()));
auto resolved_addr = URIToResolvedAddress(target_addr);
std::shared_ptr<EventEngine> posix_ee = std::make_shared<PosixEventEngine>();
std::string resolved_addr_str =
SockaddrToString(&resolved_addr, true).value();
auto sockets = CreateConnectedSockets(resolved_addr);
grpc_core::Notification signal;
grpc_core::ChannelArgs args;
auto quota = grpc_core::ResourceQuota::Default();
args = args.Set(GRPC_ARG_RESOURCE_QUOTA, quota);
ChannelArgsEndpointConfig config(args);
auto memory_quota = absl::make_unique<grpc_core::MemoryQuota>("bar");
posix_ee->Connect(
[&signal](absl::StatusOr<std::unique_ptr<EventEngine::Endpoint>> status) {
EXPECT_EQ(status.status().code(), absl::StatusCode::kCancelled);
signal.Notify();
},
URIToResolvedAddress(target_addr), config,
memory_quota->CreateMemoryAllocator("conn-1"), 3s);
signal.WaitForNotification();
for (auto sock : sockets) {
close(sock);
}
WaitForSingleOwner(std::move(posix_ee));
}
TEST(PosixEventEngineTest, IndefiniteConnectCancellationTest) {
std::string target_addr = absl::StrCat(
"ipv6:[::1]:", std::to_string(grpc_pick_unused_port_or_die()));
auto resolved_addr = URIToResolvedAddress(target_addr);
std::shared_ptr<EventEngine> posix_ee = std::make_shared<PosixEventEngine>();
std::string resolved_addr_str =
SockaddrToString(&resolved_addr, true).value();
auto sockets = CreateConnectedSockets(resolved_addr);
grpc_core::ChannelArgs args;
auto quota = grpc_core::ResourceQuota::Default();
args = args.Set(GRPC_ARG_RESOURCE_QUOTA, quota);
ChannelArgsEndpointConfig config(args);
auto memory_quota = absl::make_unique<grpc_core::MemoryQuota>("bar");
auto connection_handle = posix_ee->Connect(
[](absl::StatusOr<std::unique_ptr<EventEngine::Endpoint>> /*status*/) {
FAIL() << "The on_connect callback should not have run since the "
"connection attempt was cancelled.";
},
URIToResolvedAddress(target_addr), config,
memory_quota->CreateMemoryAllocator("conn-2"), 3s);
if (connection_handle.keys[0] > 0) {
ASSERT_TRUE(posix_ee->CancelConnect(connection_handle));
}
for (auto sock : sockets) {
close(sock);
}
WaitForSingleOwner(std::move(posix_ee));
}
} // namespace posix_engine
} // namespace grpc_event_engine
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(&argc, argv);
::testing::InitGoogleTest(&argc, argv);
if (!grpc_core::IsPosixEventEngineEnablePollingEnabled()) {
return 0;
}
grpc_init();
int ret = RUN_ALL_TESTS();
grpc_shutdown();
return ret;
}

@ -80,11 +80,8 @@ grpc_cc_test(
tags = [
"no_windows",
],
uses_event_engine = True,
uses_polling = True,
uses_polling = False,
deps = [
":client",
":oracle_event_engine_posix",
"//src/core:posix_event_engine",
"//test/core/event_engine/test_suite:timer",
],

@ -17,21 +17,19 @@
#include <grpc/event_engine/event_engine.h>
absl::AnyInvocable<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>*
std::function<std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>*
g_ee_factory = nullptr;
absl::AnyInvocable<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>*
std::function<std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>*
g_oracle_ee_factory = nullptr;
void SetEventEngineFactories(
absl::AnyInvocable<
std::function<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
factory,
absl::AnyInvocable<
std::function<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
oracle_ee_factory) {
testing::AddGlobalTestEnvironment(new EventEngineTestEnvironment(
std::move(factory), std::move(oracle_ee_factory)));
testing::AddGlobalTestEnvironment(
new EventEngineTestEnvironment(factory, oracle_ee_factory));
}

@ -14,21 +14,19 @@
#ifndef GRPC_TEST_CORE_EVENT_ENGINE_TEST_SUITE_EVENT_ENGINE_TEST_H
#define GRPC_TEST_CORE_EVENT_ENGINE_TEST_SUITE_EVENT_ENGINE_TEST_H
#include <functional>
#include <memory>
#include <utility>
#include <gtest/gtest.h>
#include "absl/functional/any_invocable.h"
#include <grpc/event_engine/event_engine.h>
#include <grpc/support/log.h>
extern absl::AnyInvocable<
extern std::function<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>*
g_ee_factory;
extern absl::AnyInvocable<
extern std::function<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>*
g_oracle_ee_factory;
@ -36,14 +34,13 @@ extern absl::AnyInvocable<
class EventEngineTestEnvironment : public testing::Environment {
public:
EventEngineTestEnvironment(
absl::AnyInvocable<
std::function<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
factory,
absl::AnyInvocable<
std::function<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
oracle_factory)
: factory_(std::move(factory)),
oracle_factory_(std::move(oracle_factory)) {}
: factory_(factory), oracle_factory_(oracle_factory) {}
void SetUp() override {
g_ee_factory = &factory_;
@ -56,11 +53,9 @@ class EventEngineTestEnvironment : public testing::Environment {
}
private:
absl::AnyInvocable<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
std::function<std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
factory_;
absl::AnyInvocable<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
std::function<std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
oracle_factory_;
};
@ -82,10 +77,10 @@ class EventEngineTest : public testing::Test {
// Set a custom factory for the EventEngine test suite. An optional oracle
// EventEngine can additionally be specified here.
void SetEventEngineFactories(
absl::AnyInvocable<
std::function<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
ee_factory,
absl::AnyInvocable<
std::function<
std::unique_ptr<grpc_event_engine::experimental::EventEngine>()>
oracle_ee_factory);

@ -19,26 +19,18 @@
#include <grpc/grpc.h>
#include "src/core/lib/event_engine/posix_engine/posix_engine.h"
#include "src/core/lib/experiments/experiments.h"
#include "test/core/event_engine/test_suite/event_engine_test.h"
#include "test/core/event_engine/test_suite/oracle_event_engine_posix.h"
#include "test/core/util/test_config.h"
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
grpc::testing::TestEnvironment env(&argc, argv);
if (!grpc_core::IsPosixEventEngineEnablePollingEnabled()) {
return 0;
}
SetEventEngineFactories(
[]() {
return std::make_unique<
grpc_event_engine::experimental::PosixEventEngine>();
},
[]() {
return std::make_unique<
grpc_event_engine::experimental::PosixOracleEventEngine>();
});
nullptr);
// TODO(ctiller): EventEngine temporarily needs grpc to be initialized first
// until we clear out the iomgr shutdown code.
grpc_init();

@ -1970,21 +1970,15 @@ src/core/lib/event_engine/posix_engine/internal_errqueue.cc \
src/core/lib/event_engine/posix_engine/internal_errqueue.h \
src/core/lib/event_engine/posix_engine/lockfree_event.cc \
src/core/lib/event_engine/posix_engine/lockfree_event.h \
src/core/lib/event_engine/posix_engine/posix_endpoint.cc \
src/core/lib/event_engine/posix_engine/posix_endpoint.h \
src/core/lib/event_engine/posix_engine/posix_engine.cc \
src/core/lib/event_engine/posix_engine/posix_engine.h \
src/core/lib/event_engine/posix_engine/posix_engine_closure.h \
src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc \
src/core/lib/event_engine/posix_engine/tcp_socket_utils.h \
src/core/lib/event_engine/posix_engine/timer.cc \
src/core/lib/event_engine/posix_engine/timer.h \
src/core/lib/event_engine/posix_engine/timer_heap.cc \
src/core/lib/event_engine/posix_engine/timer_heap.h \
src/core/lib/event_engine/posix_engine/timer_manager.cc \
src/core/lib/event_engine/posix_engine/timer_manager.h \
src/core/lib/event_engine/posix_engine/traced_buffer_list.cc \
src/core/lib/event_engine/posix_engine/traced_buffer_list.h \
src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h \
src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc \
@ -2069,8 +2063,6 @@ src/core/lib/gprpp/global_config_env.h \
src/core/lib/gprpp/global_config_generic.h \
src/core/lib/gprpp/host_port.cc \
src/core/lib/gprpp/host_port.h \
src/core/lib/gprpp/load_file.cc \
src/core/lib/gprpp/load_file.h \
src/core/lib/gprpp/manual_constructor.h \
src/core/lib/gprpp/match.h \
src/core/lib/gprpp/memory.h \

@ -1758,21 +1758,15 @@ src/core/lib/event_engine/posix_engine/internal_errqueue.cc \
src/core/lib/event_engine/posix_engine/internal_errqueue.h \
src/core/lib/event_engine/posix_engine/lockfree_event.cc \
src/core/lib/event_engine/posix_engine/lockfree_event.h \
src/core/lib/event_engine/posix_engine/posix_endpoint.cc \
src/core/lib/event_engine/posix_engine/posix_endpoint.h \
src/core/lib/event_engine/posix_engine/posix_engine.cc \
src/core/lib/event_engine/posix_engine/posix_engine.h \
src/core/lib/event_engine/posix_engine/posix_engine_closure.h \
src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc \
src/core/lib/event_engine/posix_engine/tcp_socket_utils.h \
src/core/lib/event_engine/posix_engine/timer.cc \
src/core/lib/event_engine/posix_engine/timer.h \
src/core/lib/event_engine/posix_engine/timer_heap.cc \
src/core/lib/event_engine/posix_engine/timer_heap.h \
src/core/lib/event_engine/posix_engine/timer_manager.cc \
src/core/lib/event_engine/posix_engine/timer_manager.h \
src/core/lib/event_engine/posix_engine/traced_buffer_list.cc \
src/core/lib/event_engine/posix_engine/traced_buffer_list.h \
src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc \
src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h \
src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc \
@ -1859,8 +1853,6 @@ src/core/lib/gprpp/global_config_env.h \
src/core/lib/gprpp/global_config_generic.h \
src/core/lib/gprpp/host_port.cc \
src/core/lib/gprpp/host_port.h \
src/core/lib/gprpp/load_file.cc \
src/core/lib/gprpp/load_file.h \
src/core/lib/gprpp/manual_constructor.h \
src/core/lib/gprpp/match.h \
src/core/lib/gprpp/memory.h \

@ -4415,7 +4415,8 @@
"ci_platforms": [
"linux",
"mac",
"posix"
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
@ -4427,7 +4428,8 @@
"platforms": [
"linux",
"mac",
"posix"
"posix",
"windows"
],
"uses_polling": false
},
@ -5283,28 +5285,6 @@
],
"uses_polling": true
},
{
"args": [],
"benchmark": false,
"ci_platforms": [
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"gtest": true,
"language": "c++",
"name": "posix_event_engine_connect_test",
"platforms": [
"linux",
"mac",
"posix"
],
"uses_polling": true
},
{
"args": [],
"benchmark": false,
@ -5325,7 +5305,7 @@
"mac",
"posix"
],
"uses_polling": true
"uses_polling": false
},
{
"args": [],

Loading…
Cancel
Save