worker: Don't have worker abort when parent dies.
authorJustin Pettit <jpettit@nicira.com>
Sat, 26 Jan 2013 02:12:01 +0000 (18:12 -0800)
committerJustin Pettit <jpettit@nicira.com>
Sat, 26 Jan 2013 02:58:34 +0000 (18:58 -0800)
Depending on how forcefully the parent process is killed, the worker
could abort when trying to read or write on their shared socket.  This
changes those errors from VLOG_ABORT to VLOG_FATAL so that a core isn't
generated.

Bug #14821

Reported-by: Amey Bhide <abhide@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
lib/worker.c

index b281d70..f2ac6b4 100644 (file)
@@ -335,7 +335,7 @@ worker_reply_iovec(const struct iovec *iovs, size_t n_iovs,
          * to avoid missing log messages. */
         VLOG_INFO("send failed (%s)", strerror(error));
     } else if (error) {
-        VLOG_ABORT("send failed (%s)", strerror(error));
+        VLOG_FATAL("send failed (%s)", strerror(error));
     }
 
     free(all_iovs);
@@ -369,7 +369,7 @@ worker_main(int fd)
             /* Main process closed the IPC socket.  Exit cleanly. */
             break;
         } else if (error != EAGAIN) {
-            VLOG_ABORT("RPC receive failed (%s)", strerror(error));
+            VLOG_FATAL("RPC receive failed (%s)", strerror(error));
         }
 
         poll_fd_wait(server_sock, POLLIN);