From: liuchang0812 Date: Tue, 7 Mar 2017 06:28:21 +0000 (+0800) Subject: msg/async: fix crash that writing char to nonblock-fd gets EAGAIN in EventCenter... X-Git-Tag: v12.0.1~38^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=55884c5875b7ed2bb2e525bb13fbb7e849717811;p=ceph.git msg/async: fix crash that writing char to nonblock-fd gets EAGAIN in EventCenter::wakeup Signed-off-by: liuchang0812 --- diff --git a/src/msg/async/Event.cc b/src/msg/async/Event.cc index eee29fc51b70..45d6eb108435 100644 --- a/src/msg/async/Event.cc +++ b/src/msg/async/Event.cc @@ -323,8 +323,10 @@ void EventCenter::wakeup() // wake up "event_wait" int n = write(notify_send_fd, &buf, sizeof(buf)); if (n < 0) { - ldout(cct, 1) << __func__ << " write notify pipe failed: " << cpp_strerror(errno) << dendl; - ceph_abort(); + if (errno != EAGAIN) { + ldout(cct, 1) << __func__ << " write notify pipe failed: " << cpp_strerror(errno) << dendl; + ceph_abort(); + } } }