From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Maxim Kokryashkin <max.kokryashkin@gmail.com> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit v3] sysprof: fix crash during FFUNC stream Date: Thu, 23 Nov 2023 06:32:41 +0000 [thread overview] Message-ID: <ZV7yCYPaV4OG8-Tv@tarantool.org> (raw) In-Reply-To: <20230710122818.22221-1-m.kokryashkin@tarantool.org> Max, I've checked the patchset into all long-term branches in tarantool/luajit and bumped a new version in master, release/2.11 and release/2.10. On 10.07.23, Maxim Kokryashkin via Tarantool-patches wrote: > Sometimes, the Lua stack can be inconsistent during > the FFUNC execution, which may lead to a sysprof > crash during the stack unwinding. > > This patch replaces the `top_frame` property of `global_State` > with `lj_sysprof_topframe` structure, which contains `top_frame` > and `ffid` properties. `ffid` property makes sense only when the > LuaJIT VM state is set to `FFUNC`. That property is set to the > ffid of the fast function that VM is about to execute. > In the same time, `top_frame` property is not updated now, so > the top frame of the Lua stack can be streamed based on the ffid, > and the rest of the Lua stack can be streamed as usual. > > Also, this patch fixes build with plain makefile, by adding > the `LJ_HASSYSPROF` flag support to it. > > Resolves tarantool/tarantool#8594 > --- > Changes in v3: > - Fixed comments as per review by Sergey > > Branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-8594-sysprof-ffunc-crash > PR: https://github.com/tarantool/tarantool/pull/8737 > src/Makefile.original | 3 ++ > src/lj_obj.h | 7 +++- > src/lj_sysprof.c | 26 ++++++++++++--- > src/vm_x64.dasc | 22 +++++++++++-- > src/vm_x86.dasc | 31 ++++++++++++++--- > .../gh-8594-sysprof-ffunc-crash.test.lua | 33 +++++++++++++++++++ > 6 files changed, 109 insertions(+), 13 deletions(-) > create mode 100644 test/tarantool-tests/gh-8594-sysprof-ffunc-crash.test.lua > <snipped> > -- > 2.40.1 > -- Best regards, IM
next prev parent reply other threads:[~2023-11-23 6:40 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-10 12:28 Maxim Kokryashkin via Tarantool-patches 2023-07-13 8:12 ` Sergey Bronnikov via Tarantool-patches 2023-07-14 14:30 ` Maxim Kokryashkin via Tarantool-patches 2023-11-08 15:47 ` Sergey Bronnikov via Tarantool-patches 2023-11-08 23:01 ` Maxim Kokryashkin via Tarantool-patches 2023-11-09 7:06 ` Sergey Bronnikov via Tarantool-patches 2023-07-15 15:36 ` Sergey Kaplun via Tarantool-patches 2023-07-17 12:52 ` Maxim Kokryashkin via Tarantool-patches 2023-11-23 6:32 ` Igor Munkin via Tarantool-patches [this message] -- strict thread matches above, loose matches on Subject: below -- 2023-07-05 8:56 Maxim Kokryashkin via Tarantool-patches 2023-07-09 12:21 ` Sergey Kaplun via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=ZV7yCYPaV4OG8-Tv@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=max.kokryashkin@gmail.com \ --subject='Re: [Tarantool-patches] [PATCH luajit v3] sysprof: fix crash during FFUNC stream' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox