From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 9955F45C304 for ; Sun, 20 Dec 2020 22:16:57 +0300 (MSK) Received: by mail-lf1-f52.google.com with SMTP id m12so18580342lfo.7 for ; Sun, 20 Dec 2020 11:16:57 -0800 (PST) Date: Sun, 20 Dec 2020 22:16:54 +0300 From: Cyrill Gorcunov Message-ID: <20201220191654.GG3139@grain> References: <20201210161832.729439-1-gorcunov@gmail.com> <20201210161832.729439-5-gorcunov@gmail.com> <3d201857-f809-c758-297c-e3e896fbf06c@tarantool.org> <20201216111606.GA14556@grain> <0bb6f2db-5ef8-9d71-be61-67e113c7e0ad@tarantool.org> <20201220182137.GC3139@grain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v4 4/4] crash: report crash data to the feedback server List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: TML 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.