]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
global/signal_handler: avoid core dump on EIO
authorSage Weil <sage@redhat.com>
Thu, 4 Apr 2019 19:51:21 +0000 (14:51 -0500)
committerSage Weil <sage@redhat.com>
Mon, 8 Apr 2019 14:29:05 +0000 (09:29 -0500)
Generating a core dump is overkill if we hit an EIO error from the
hardware.  Exit with an error code instead.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit e3464df47b2e83ee160362a897adc1191a922ce9)

src/global/signal_handler.cc

index 91be152f2b87c5eeb95f29fdc9e485438c70d384..56a586d7f018bc22d8ed3ad3d501ff2f06983f64 100644 (file)
@@ -318,7 +318,13 @@ static void handle_fatal_signal(int signum)
     }
   }
 
-  reraise_fatal(signum);
+  if (g_eio) {
+    // if this was an EIO crash, we don't need to trigger a core dump,
+    // since the problem is hardware, or some layer beneath us.
+    _exit(EIO);
+  } else {
+    reraise_fatal(signum);
+  }
 }
 
 void install_standard_sighandlers(void)