From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: TML <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v4 4/4] crash: report crash data to the feedback server
Date: Sun, 20 Dec 2020 22:16:54 +0300 [thread overview]
Message-ID: <20201220191654.GG3139@grain> (raw)
In-Reply-To: <b81cd658-f425-5893-15aa-4196f98a985d@tarantool.org>
On Sun, Dec 20, 2020 at 07:41:47PM +0100, Vladislav Shpilevoy wrote:
>
> The error above I checked on your branch. And it remains the same
> even with the latest commit which you didn't push yet. Because the
> feedback options still are not configured before box.cfg. It has
> nothing to do with the recursive crash.
>
> It means, as I said above, that you can't send a crash before
> box.cfg is done. Therefore you can simply not even try if the
> host is not configured yet. It solves the error message, and alongside
> solves the crash chain issue. You don't need environment variables
> for this.
>
> I would suggest not to rush responding to these emails, but give it
> some thought beforehand.
>
> It is actually strange, that feedback daemon does not work before
> box.cfg. We don't see any reports from tarantool instances which are
> used as an application server. But it has nothing to do with your
> patch anyway.
The latest updates are in gorcunov/gh-5261-crash-report-4-rev2
---
...
static bool send_crashinfo = false;
...
static void
crash_signal_cb(int signo, siginfo_t *siginfo, void *context)
{
static volatile sig_atomic_t in_cb = 0;
struct crash_info *cinfo;
if (in_cb == 0) {
in_cb = 1;
cinfo = crash_collect(signo, siginfo, context);
crash_report_stderr(cinfo);
if (send_crashinfo)
crash_report_feedback_daemon(cinfo);
} else {
/* Got a signal while running the handler. */
fprintf(stderr, "Fatal %d while backtracing", signo);
}
/* Try to dump a core */
struct sigaction sa = {
.sa_handler = SIG_DFL,
};
sigemptyset(&sa.sa_mask);
sigaction(SIGABRT, &sa, NULL);
abort();
}
...
void
crash_cfg_set_params(const char *host, bool is_enabled)
{
if (host == NULL || !is_enabled) {
if (send_crashinfo) {
pr_debug("disable sending crashinfo feedback");
send_crashinfo = false;
feedback_host[0] = '\0';
}
return;
}
if (strcmp(feedback_host, host) != 0) {
strlcpy_a(feedback_host, host);
if (strlen(feedback_host) < strlen(host))
pr_panic("feedback_host is too long");
}
if (!send_crashinfo) {
pr_debug("enable sending crashinfo feedback");
send_crashinfo = true;
}
}
---
IOW, until explicitly configured via box.cfg{} the crash won't
be sent. I'll address all your previous comments in v5 of the branch.
next prev parent reply other threads:[~2020-12-20 19:16 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 16:18 [Tarantool-patches] [PATCH v4 0/4] crash: implement sending feedback Cyrill Gorcunov
2020-12-10 16:18 ` [Tarantool-patches] [PATCH v4 1/4] util: introduce strlcpy helper Cyrill Gorcunov
2020-12-11 7:34 ` Serge Petrenko
2020-12-11 7:58 ` Serge Petrenko
2020-12-11 10:04 ` Cyrill Gorcunov
2020-12-11 11:07 ` Serge Petrenko
2020-12-11 11:38 ` Cyrill Gorcunov
2020-12-14 22:54 ` Vladislav Shpilevoy
2020-12-14 22:54 ` Vladislav Shpilevoy
2020-12-15 8:47 ` Cyrill Gorcunov
2020-12-10 16:18 ` [Tarantool-patches] [PATCH v4 2/4] backtrace: allow to specify destination buffer Cyrill Gorcunov
2020-12-11 7:50 ` Serge Petrenko
2020-12-10 16:18 ` [Tarantool-patches] [PATCH v4 3/4] crash: move fatal signal handling in Cyrill Gorcunov
2020-12-11 9:31 ` Serge Petrenko
2020-12-11 10:38 ` Cyrill Gorcunov
2020-12-11 11:12 ` Serge Petrenko
2020-12-14 22:54 ` Vladislav Shpilevoy
2020-12-15 8:16 ` Cyrill Gorcunov
2020-12-20 14:48 ` Vladislav Shpilevoy
2020-12-20 15:49 ` Cyrill Gorcunov
2020-12-20 16:07 ` Vladislav Shpilevoy
2020-12-20 16:58 ` Cyrill Gorcunov
2020-12-20 15:45 ` Vladislav Shpilevoy
2020-12-10 16:18 ` [Tarantool-patches] [PATCH v4 4/4] crash: report crash data to the feedback server Cyrill Gorcunov
2020-12-11 12:57 ` Serge Petrenko
2020-12-12 16:19 ` Cyrill Gorcunov
2020-12-12 17:07 ` Cyrill Gorcunov
2020-12-14 9:41 ` Serge Petrenko
2020-12-14 22:54 ` Vladislav Shpilevoy
2020-12-16 11:16 ` Cyrill Gorcunov
2020-12-16 20:31 ` Cyrill Gorcunov
2020-12-20 15:16 ` Vladislav Shpilevoy
2020-12-20 18:26 ` Cyrill Gorcunov
2020-12-20 14:48 ` Vladislav Shpilevoy
2020-12-20 18:21 ` Cyrill Gorcunov
2020-12-20 18:41 ` Vladislav Shpilevoy
2020-12-20 19:16 ` Cyrill Gorcunov [this message]
2020-12-21 17:01 ` Vladislav Shpilevoy
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=20201220191654.GG3139@grain \
--to=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v4 4/4] crash: report crash data to the feedback server' \
/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