diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2016-06-05 02:24:20 +0300 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-06-04 19:24:20 -0400 |
commit | 592705f2f708b313ef3e07677463fe676cdd774a (patch) | |
tree | ba5e2c4f97e44b1643773188b0bf4a6ac0267520 /src/systemctl | |
parent | 20f8477be541f2486737f1be32bdb0bd0d6372fd (diff) |
systemctl: install sigbus handler (#3435)
This makes systemctl robust regarding journal truncation.
This is a follow-up for 2cf4172a71860c6e44
Fixes:
Core was generated by `./systemctl status systemd-journald'.
Program terminated with signal SIGBUS, Bus error.
PID 8569 - core
TID 8569:
#0 0x00007f246cc89ed6 __memcmp_sse4_1
#1 0x0000557ebbc6f42c journal_file_init_header
#2 0x0000557ebbc77262 journal_file_open
#3 0x0000557ebbc42999 file_type_wanted
#4 0x0000557ebbc42e08 add_any_file
#5 0x0000557ebbc43832 add_directory
#6 0x0000557ebbc4401c add_root_directory
#7 0x0000557ebbc442e9 add_root_directory
#8 0x0000557ebbc446fc add_search_paths
#9 0x0000557ebbbacb5e show_journal_by_unit
#10 0x0000557ebbb8376d print_status_info
#11 0x0000557ebbb86a0b show_one
#12 0x0000557ebbb87954 show
#13 0x0000557ebbc20b1f dispatch_verb
#14 0x0000557ebbb90615 systemctl_main
#15 0x0000557ebbb9159f main
#16 0x00007f246cb3e731 __libc_start_main
#17 0x0000557ebbb75ae9 _start
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index e6ff299dd4..df41182529 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -70,6 +70,7 @@ #include "process-util.h" #include "rlimit-util.h" #include "set.h" +#include "sigbus.h" #include "signal-util.h" #include "socket-util.h" #include "spawn-ask-password-agent.h" @@ -7807,6 +7808,7 @@ int main(int argc, char*argv[]) { setlocale(LC_ALL, ""); log_parse_environment(); log_open(); + sigbus_install(); /* Explicitly not on_tty() to avoid setting cached value. * This becomes relevant for piping output which might be |