From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 2DB716EC56; Wed, 14 Jul 2021 14:13:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2DB716EC56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626261215; bh=FqusfTTcqbN9VO5GXwQzaFVbqHJAbxBaC5V5rHqfOgQ=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=XvVuNvaD43prn3f2M/6nghr7JoTQEvICYhrUIywdtI94fh0a+dRlgANd23PFB7MmF dzgJvZ/JXUiGV2ORgPZsbWqF9zC9XxKR/ZmUpLGGQWZGcs3tcaP2YWzUKdxoKbc/O8 Fq2YqKIb7VVeLcBjBbEC6wyMmaAKgOOoRpCmX7ME= Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B37906EC55 for ; Wed, 14 Jul 2021 14:13:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B37906EC55 Received: by smtp59.i.mail.ru with esmtpa (envelope-from ) id 1m3cpV-0001Jt-U5; Wed, 14 Jul 2021 14:13:30 +0300 To: gorcunov@tarantool.org, alyapunov@tarantool.org Cc: tarantool-patches@dev.tarantool.org, Egor Elchinov Date: Wed, 14 Jul 2021 14:12:48 +0300 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD97BB0EF39AD2B33D52D9CC5C87942E9F1EA2CB6CC9AFB41C2182A05F538085040197F0D43481E04C58513E6DD2138CBA5725FD410ED89EAA908E2597C1E51C7C1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70CB15FA6C489297DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373C9FC9F3BACECB908638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D823E99E44BBD4311B21F5AB57DD563F4A117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18BDFBBEFFF4125B51D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EED76C6ED7039589DE302FCEF25BFAB3454AD6D5ED66289B52698AB9A7B718F8C46E0066C2D8992A16725E5C173C3A84C3FDFC4E4D946D0988BA3038C0950A5D36B5C8C57E37DE458B0BC6067A898B09E46D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7EDFA0E72C3EE0C08731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CE68746B1F2AB10C69E919A36D177F1B695CB79B3E0C4ED049C2B6934AE262D3EE7EAB7254005DCED41D154D92C01BDF11E0A4E2319210D9B64D260DF9561598F01A9E91200F654B0B684FE8DC1FE10A18E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F3735C80F9F4B96D67305F4248365287F686F018C3669FA84CB91A8E120AB44EFBC292026399BD561D7E09C32AA3244CC9A74B226D99DA849577F6FB6B4B8AFA05AB220A9D022EBC927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojDdSFIg49M1RXDSjWnf5Riw== X-Mailru-Sender: EFA0F3A8419EF2166B053C73E674FFD50D09AED587531E685BE17231FBA48150E2527C969975515C67F54F2D6EFFC80BC77752E0C033A69E17841C44D9B5D58765F2F89A5AFDB6F16C18EFA0BB12DBB0 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v3 0/4] fiber: introduce creation backtrace X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Egor Elchinov via Tarantool-patches Reply-To: eelchinov@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Egor Elchinov This patchset adds the subtable `backtrace_parent()` to `fiber.info()` holding backtraces of fiber creation and introduces `fiber.parent_bt_enable()` and `fiber.parent_bt_disable()` procedures managing the runtime ability to collect parent backtraces for newly created fibers. Changes in v2: - first 3 patches merged together - unnecessary changes in `ENABLE_BACKTRACE` usages reverted Changes in v3: - strncpy() and snprintf() usages fixed - error check for dladdr() under macos added https://github.com/tarantool/tarantool/issues/4002 https://github.com/tarantool/tarantool/tree/Egor2001/gh-4002-fiber-creation-backtrace Egor Elchinov (4): fiber: add PoC for fiber creation backtrace fiber: add option and PoC for Lua parent backtrace fiber: refactor lua backtrace routines fiber: refactor C backtrace and add changelog .../gh-4002-fiber-creation-backtrace.md | 8 + src/lib/core/backtrace.cc | 250 +++++++++++++++--- src/lib/core/backtrace.h | 10 +- src/lib/core/crash.c | 2 +- src/lib/core/fiber.c | 35 +++ src/lib/core/fiber.h | 34 +++ src/lua/fiber.c | 232 +++++++++++++--- src/lua/fiber.h | 19 ++ .../gh-4002-fiber-creation-backtrace.result | 78 ++++++ .../gh-4002-fiber-creation-backtrace.test.lua | 34 +++ 10 files changed, 631 insertions(+), 71 deletions(-) create mode 100644 changelogs/unreleased/gh-4002-fiber-creation-backtrace.md create mode 100644 test/app/gh-4002-fiber-creation-backtrace.result create mode 100644 test/app/gh-4002-fiber-creation-backtrace.test.lua -- 2.31.1