From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (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 62A3745C304 for ; Thu, 10 Dec 2020 19:18:36 +0300 (MSK) Received: by mail-lf1-f67.google.com with SMTP id u18so9023765lfd.9 for ; Thu, 10 Dec 2020 08:18:36 -0800 (PST) From: Cyrill Gorcunov Date: Thu, 10 Dec 2020 19:18:28 +0300 Message-Id: <20201210161832.729439-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v4 0/4] crash: implement sending feedback List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Cc: Mons Anderson , Vladislav Shpilevoy Our feedback daemon sends only a few portions of usage statistics. But crash dumps are pretty important for us as well, because real users may catch a way more important issues than our testing farm, it is simply impossible to cover all possible scenarios. For this sake, if crash happens we can send it to our feedback server. In this series we implement only base functionality and may extend it later. I didn't find yet a simple way to test this code anything but manually. Any comments are highly appreciated. v2: - left for internal use v3 (by Mons): - enable sending crash report by default but give an ability to disable it - use vfork when running subsequent exeutable of tarantool to send report, since plain execve won't produce local crashdump v4 (by Vlad): - move all fatal's signal handling to crash.c - export only those helpers which are really needed - update backtrace to use size as an arument - provide strlcpy if not present on the system - use static allocated buffer for report - use base64 library instead of own implmentation issue https://github.com/tarantool/tarantool/issues/5261 branch gorcunov/gh-5261-crash-report-4 Cyrill Gorcunov (4): util: introduce strlcpy helper backtrace: allow to specify destination buffer crash: move fatal signal handling in crash: report crash data to the feedback server CMakeLists.txt | 1 + src/box/lua/feedback_daemon.lua | 7 + src/box/lua/load_cfg.lua | 3 + src/exports.h | 1 + src/lib/core/CMakeLists.txt | 3 +- src/lib/core/backtrace.cc | 12 +- src/lib/core/backtrace.h | 3 + src/lib/core/crash.c | 554 ++++++++++++++++++++++++++++++++ src/lib/core/crash.h | 44 +++ src/lib/core/util.c | 14 + src/main.cc | 139 +------- src/trivia/config.h.cmake | 5 + src/trivia/util.h | 15 + test/box/admin.result | 2 + test/box/cfg.result | 4 + 15 files changed, 667 insertions(+), 140 deletions(-) create mode 100644 src/lib/core/crash.c create mode 100644 src/lib/core/crash.h base-commit: a14dad9543360c49c2cf8906a88e09271cad91b6 -- 2.26.2