From: Sage Weil Date: Thu, 4 Apr 2019 19:51:21 +0000 (-0500) Subject: global/signal_handler: avoid core dump on EIO X-Git-Tag: v15.1.0~3005^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e3464df47b2e83ee160362a897adc1191a922ce9;p=ceph.git global/signal_handler: avoid core dump on EIO 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 --- diff --git a/src/global/signal_handler.cc b/src/global/signal_handler.cc index 91be152f2b87..56a586d7f018 100644 --- a/src/global/signal_handler.cc +++ b/src/global/signal_handler.cc @@ -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)