From: Cyrill Gorcunov <gorcunov@gmail.com> To: tml <tarantool-patches@dev.tarantool.org> Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: [Tarantool-patches] [PATCH 4/4] cfg: allow to configure crash report sending Date: Wed, 2 Dec 2020 18:18:42 +0300 [thread overview] Message-ID: <20201202151842.415456-5-gorcunov@gmail.com> (raw) In-Reply-To: <20201202151842.415456-1-gorcunov@gmail.com> Introcude a new option to box.cfg{} to control sending of crash report. There is no simple way to test all this because it involves subsequent runs of tarantool. I've been using one terminal with tarantool running inside as > box.cfg{feedback_host="127.0.0.1:1500", feedback_crash=true} another terminal to listen for incoming data > while true ; do nc -l -p 1500 -c 'echo -e "HTTP/1.1 200 OK\n\n $(date)"'; done and one another to kill main tarantool instance > kill -11 `pidof tarantool` Closes #5261 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> @TarantoolBot document Title: Send crash dump to feedback server The default feedback server gathers only small portion of usage statistics. Setting up option `feedback_crash=true` in box configuration allows to send detailed information in case of program crash. This information includes: - utsname information (similar to `uname -a` output except the network name) - build information - reason for a crash - call backtrace By default the option `feedback_crash` is disabled. --- src/box/box.cc | 2 ++ src/box/lua/load_cfg.lua | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/box/box.cc b/src/box/box.cc index 4070cbeab..f6e515af8 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -79,6 +79,7 @@ #include "sql_stmt_cache.h" #include "msgpack.h" #include "raft.h" +#include "errstat.h" #include "trivia/util.h" static char status[64] = "unknown"; @@ -2665,6 +2666,7 @@ box_cfg_xc(void) port_init(); iproto_init(); sql_init(); + box_errstat_cfg(); int64_t wal_max_size = box_check_wal_max_size(cfg_geti64("wal_max_size")); enum wal_mode wal_mode = box_check_wal_mode(cfg_gets("wal_mode")); diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua index 76e2e92c2..d0591d12a 100644 --- a/src/box/lua/load_cfg.lua +++ b/src/box/lua/load_cfg.lua @@ -99,6 +99,7 @@ local default_cfg = { replication_skip_conflict = false, replication_anon = false, feedback_enabled = true, + feedback_crash = false, feedback_host = "https://feedback.tarantool.io", feedback_interval = 3600, net_msg_max = 768, @@ -179,6 +180,7 @@ local template_cfg = { replication_skip_conflict = 'boolean', replication_anon = 'boolean', feedback_enabled = ifdef_feedback('boolean'), + feedback_crash = ifdef_feedback('boolean'), feedback_host = ifdef_feedback('string'), feedback_interval = ifdef_feedback('number'), net_msg_max = 'number', @@ -277,6 +279,7 @@ local dynamic_cfg = { checkpoint_wal_threshold = private.cfg_set_checkpoint_wal_threshold, worker_pool_threads = private.cfg_set_worker_pool_threads, feedback_enabled = ifdef_feedback_set_params, + feedback_crash = ifdef_feedback_set_params, feedback_host = ifdef_feedback_set_params, feedback_interval = ifdef_feedback_set_params, -- do nothing, affects new replicas, which query this value on start -- 2.26.2
next prev parent reply other threads:[~2020-12-02 15:19 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-02 15:18 [Tarantool-patches] [PATCH 0/4] crash dump: implement sending feedback Cyrill Gorcunov 2020-12-02 15:18 ` [Tarantool-patches] [PATCH 1/4] backtrace: allow to specify destination buffer Cyrill Gorcunov 2020-12-02 15:18 ` [Tarantool-patches] [PATCH 2/4] errstat: add crash report base code Cyrill Gorcunov 2020-12-02 15:18 ` [Tarantool-patches] [PATCH 3/4] crash: use errstat code in fatal signals Cyrill Gorcunov 2020-12-02 15:18 ` Cyrill Gorcunov [this message] 2020-12-04 15:29 ` [Tarantool-patches] [PATCH 0/4] crash dump: implement sending feedback Cyrill Gorcunov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201202151842.415456-5-gorcunov@gmail.com \ --to=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 4/4] cfg: allow to configure crash report sending' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox