Releated to https://bugzilla.redhat.com/show_bug.cgi?id=582313

Old code in coroipcc doesn't handle POLLNVAL. It can happen, that some
applications (for example fenced) will stuck forever.

Also poll result is now handled much more correctly.

Regards,
  Honza
diff --git a/trunk/lib/coroipcc.c b/trunk/lib/coroipcc.c
index 06e4d75..1e93b25 100644
--- a/trunk/lib/coroipcc.c
+++ b/trunk/lib/coroipcc.c
@@ -478,11 +478,18 @@ retry_semwait:
                pfd.fd = ipc_instance->fd;
                pfd.events = 0;
 
-               poll (&pfd, 1, 0);
-               if (pfd.revents == POLLERR || pfd.revents == POLLHUP) {
+               res = poll (&pfd, 1, 0);
+
+               if (res == -1 && errno != EINTR) {
                        return (CS_ERR_LIBRARY);
                }
 
+               if (res == 1) {
+                       if (pfd.revents == POLLERR || pfd.revents == POLLHUP || 
pfd.revents == POLLNVAL) {
+                               return (CS_ERR_LIBRARY);
+                       }
+               }
+
                goto retry_semwait;
        }
 
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to