[Tarantool-patches] [PATCH v2 0/2] Prevent JIT engine breakage on fibers switch-over

sergos at tarantool.org sergos at tarantool.org
Thu Sep 24 16:15:25 MSK 2020


Hi!

Thanks for the patch, please consider my 2 cents below. 

Sergos

> On 23 Sep 2020, at 22:06, Igor Munkin <imun at tarantool.org> 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

Could you please rephrase the last sentence to be more clear, like
yielding from a function called directly from the jitted code (means -
through FFI) will cause 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
> 



More information about the Tarantool-patches mailing list