diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index 6126e2771cd..435b6f0f377 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -1230,6 +1230,7 @@ static const grpc_event_engine_vtable vtable = { * support is available */ const grpc_event_engine_vtable *grpc_init_epoll1_linux(bool explicit_request) { if (!grpc_has_wakeup_fd()) { + gpr_log(GPR_ERROR, "Skipping epoll1 because of no wakeup fd."); return NULL; } @@ -1254,6 +1255,8 @@ const grpc_event_engine_vtable *grpc_init_epoll1_linux(bool explicit_request) { /* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return * NULL */ const grpc_event_engine_vtable *grpc_init_epoll1_linux(bool explicit_request) { + gpr_log(GPR_ERROR, + "Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined."); return NULL; } #endif /* defined(GRPC_POSIX_SOCKET) */ diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc index 0809d574a96..9cafb1c61e0 100644 --- a/src/core/lib/iomgr/ev_epollex_linux.cc +++ b/src/core/lib/iomgr/ev_epollex_linux.cc @@ -1447,10 +1447,12 @@ const grpc_event_engine_vtable *grpc_init_epollex_linux( } if (!grpc_has_wakeup_fd()) { + gpr_log(GPR_ERROR, "Skipping epollex because of no wakeup fd."); return NULL; } if (!grpc_is_epollexclusive_available()) { + gpr_log(GPR_INFO, "Skipping epollex because it is not supported."); return NULL; } @@ -1476,6 +1478,8 @@ const grpc_event_engine_vtable *grpc_init_epollex_linux( * NULL */ const grpc_event_engine_vtable *grpc_init_epollex_linux( bool explicitly_requested) { + gpr_log(GPR_ERROR, + "Skipping epollex becuase GRPC_LINUX_EPOLL is not defined."); return NULL; } #endif /* defined(GRPC_POSIX_SOCKET) */ diff --git a/src/core/lib/iomgr/ev_epollsig_linux.cc b/src/core/lib/iomgr/ev_epollsig_linux.cc index 035bdc4cb55..0473db9b955 100644 --- a/src/core/lib/iomgr/ev_epollsig_linux.cc +++ b/src/core/lib/iomgr/ev_epollsig_linux.cc @@ -1708,16 +1708,20 @@ static bool is_epoll_available() { const grpc_event_engine_vtable *grpc_init_epollsig_linux( bool explicit_request) { + const char *error_msg = NULL; /* If use of signals is disabled, we cannot use epoll engine*/ if (is_grpc_wakeup_signal_initialized && grpc_wakeup_signal < 0) { + gpr_log(GPR_ERROR, "Skipping epollsig because use of signals is disabled."); return NULL; } if (!grpc_has_wakeup_fd()) { + gpr_log(GPR_ERROR, "Skipping epollsig because of no wakeup fd."); return NULL; } if (!is_epoll_available()) { + gpr_log(GPR_ERROR, "Skipping epollsig because epoll is unavailable."); return NULL; } @@ -1725,6 +1729,8 @@ const grpc_event_engine_vtable *grpc_init_epollsig_linux( if (explicit_request) { grpc_use_signal(SIGRTMIN + 6); } else { + gpr_log(GPR_ERROR, + "Skipping epollsig because uninitialized wakeup signal."); return NULL; } } @@ -1750,6 +1756,8 @@ const grpc_event_engine_vtable *grpc_init_epollsig_linux( * NULL */ const grpc_event_engine_vtable *grpc_init_epollsig_linux( bool explicit_request) { + gpr_log(GPR_ERROR, + "Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined."); return NULL; } #endif /* defined(GRPC_POSIX_SOCKET) */ diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc index 036a35690c5..c3d174d0976 100644 --- a/src/core/lib/iomgr/ev_poll_posix.cc +++ b/src/core/lib/iomgr/ev_poll_posix.cc @@ -1713,6 +1713,7 @@ static const grpc_event_engine_vtable vtable = { const grpc_event_engine_vtable *grpc_init_poll_posix(bool explicit_request) { if (!grpc_has_wakeup_fd()) { + gpr_log(GPR_ERROR, "Skipping poll because of no wakeup fd."); return NULL; } if (!GRPC_LOG_IF_ERROR("pollset_global_init", pollset_global_init())) { diff --git a/src/core/lib/iomgr/ev_posix.cc b/src/core/lib/iomgr/ev_posix.cc index 677ee675a6a..9fd598b65ee 100644 --- a/src/core/lib/iomgr/ev_posix.cc +++ b/src/core/lib/iomgr/ev_posix.cc @@ -172,12 +172,12 @@ void grpc_event_engine_init(void) { gpr_free(strings[i]); } gpr_free(strings); - gpr_free(s); if (g_event_engine == NULL) { - gpr_log(GPR_ERROR, "No event engine could be initialized"); + gpr_log(GPR_ERROR, "No event engine could be initialized from %s", s); abort(); } + gpr_free(s); } void grpc_event_engine_shutdown(void) {