From f260ab4d94e9140ecf0531a88bc163a2a753c5ce Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Mon, 16 Mar 2020 14:55:12 -0700 Subject: [PATCH] Add logging to poll EINTR handling, add another catch in camerad/main.cc old-commit-hash: 439b4625b68fb7f933c646229da8667e9cf4fea8 --- selfdrive/camerad/cameras/camera_qcom.c | 5 ++++- selfdrive/camerad/main.cc | 9 ++++++++- selfdrive/ui/ui.cc | 5 ++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/selfdrive/camerad/cameras/camera_qcom.c b/selfdrive/camerad/cameras/camera_qcom.c index 6cef28f215..d121603a14 100644 --- a/selfdrive/camerad/cameras/camera_qcom.c +++ b/selfdrive/camerad/cameras/camera_qcom.c @@ -2117,7 +2117,10 @@ void cameras_run(DualCameraState *s) { int ret = poll(fds, ARRAYSIZE(fds), 1000); if (ret <= 0) { - if (errno == EINTR) continue; + if (errno == EINTR){ + LOGW("poll EINTR"); + continue; + } LOGE("poll failed (%d - %d)", ret, errno); break; } diff --git a/selfdrive/camerad/main.cc b/selfdrive/camerad/main.cc index 8f26261c72..7e611960c7 100644 --- a/selfdrive/camerad/main.cc +++ b/selfdrive/camerad/main.cc @@ -604,7 +604,10 @@ void* visionserver_client_thread(void* arg) { } int ret = zmq_poll(polls, num_polls, -1); if (ret < 0) { - if (errno == EINTR) continue; + if (errno == EINTR){ + LOGW("poll EINTR"); + continue; + } LOGE("poll failed (%d - %d)", ret, errno); break; } @@ -796,6 +799,10 @@ void* visionserver_thread(void* arg) { int ret = zmq_poll(polls, ARRAYSIZE(polls), -1); if (ret < 0) { + if (errno == EINTR){ + LOGW("poll EINTR"); + continue; + } LOGE("poll failed (%d)", ret); break; } diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 2562e338fb..49e73cae35 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -598,7 +598,10 @@ static void ui_update(UIState *s) { int ret = zmq_poll(polls, 1, 1000); #endif if (ret < 0) { - if (errno == EINTR) continue; + if (errno == EINTR){ + LOGW("poll EINTR"); + continue; + } LOGW("poll failed (%d)", ret); close(s->ipc_fd);