From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 33570469719 for ; Fri, 2 Oct 2020 01:27:52 +0300 (MSK) Date: Fri, 2 Oct 2020 01:17:16 +0300 From: Igor Munkin Message-ID: <20201001221716.GG18920@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v2 0/2] Prevent JIT engine breakage on fibers switch-over List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy Kirill, Please proceed with the series. NB: the relevant ChangeLog entry is here[1]. Here are the branches with backported commits: * imun/gh-1700-abort-recording-on-fiber-switch-1.10 * imun/gh-1700-abort-recording-on-fiber-switch-2.4 * imun/gh-1700-abort-recording-on-fiber-switch-2.5 On 23.09.20, Igor Munkin wrote: > There was a long discussion about the patch correctness and its > performance impact in v1 thread[1]. The benchmarks provided in v1 showed > this implementation as the least nerfing the platform overall > performance even for such synthetic test[2]. One can find the relevant > benchmarks results in the corresponding patches. > > Changes in v2: > * implement the callback in a different way to negate its perf impact > > @ChangeLog: > * Fixed fibers switch-over to prevent JIT machinery misbehaviour. Trace > recording is aborted when fiber yields the execution. The yield > occuring while mcode is being run leads to the platform panic > (gh-1700, gh-4491). > > Branch: https://github.com/tarantool/tarantool/tree/imun/gh-1700-abort-recording-on-fiber-switch > Issues: > * https://github.com/tarantool/tarantool/issues/1700 > * https://github.com/tarantool/tarantool/issues/4491 > > [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-March/015290.html > [2]: https://gist.github.com/igormunkin/7e0cf48005bd003ffbdf30181eedb40e > > Igor Munkin (2): > fiber: introduce a callback for fibers switch-over > lua: abort trace recording on fiber yield > > src/lib/core/fiber.c | 10 ++++ > src/lua/utils.c | 57 ++++++++++++++++++ > ...-4491-coio-wait-leads-to-segfault.test.lua | 53 +++++++++++++++++ > test/unit/CMakeLists.txt | 59 ++++++++++--------- > test/unit/core_test_utils.c | 37 ++++++++++++ > 5 files changed, 188 insertions(+), 28 deletions(-) > create mode 100755 test/app-tap/gh-4491-coio-wait-leads-to-segfault.test.lua > create mode 100644 test/unit/core_test_utils.c > > -- > 2.25.0 > [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-September/019711.html -- Best regards, IM