From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Sergey Bronnikov <sergeyb@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit] FFI: Drop finalizer table rehash after GC cycle. Date: Sat, 7 Sep 2024 08:15:47 +0300 [thread overview] Message-ID: <Ztvhgw3XohMDy6Su@root> (raw) In-Reply-To: <a318b6b6-00a7-481b-b8a0-beb9c0322b8c@tarantool.org> Hi, Sergey! Thanks for the review! Fixed your comments, rebased the branch on the tarantool/master and force-pushed it. On 06.09.24, Sergey Bronnikov wrote: > Hi, Sergey! > > > thanks for the patch! LGTM with minor comments below > > On 02.09.2024 15:54, Sergey Kaplun wrote: > > From: Mike Pall <mike> > > > > Reported by Sergey Kaplun. > > > > (cherry picked from commit fb22d0f80f291827a4004e16bc589b54bcc4a3c7) > > > > The raising of the OOM error when rehashing the finalizer table (when we > > can't allocate a new hash part) leads to crashes in either > > `lj_trace_exit()` or `lj_trace_unwind()` due to unprotected error > > raising, which either has no DWARF eh_frame or loses the context of the > > I would add a link to a page about eh_frame, for example [1] > > Feel free to ignore. > > 1. > https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html Added, thanks. > > > JIT compiler. > > > > This patch drops rehashing of the finalizer table to avoid these > > I would replace "finalizer" with "cdata finalizer". > > And I would say about drawbacks of this. Otherwise, it looks like Added. See the new commit message below: | FFI: Drop finalizer table rehash after GC cycle. | | Reported by Sergey Kaplun. | | (cherry picked from commit fb22d0f80f291827a4004e16bc589b54bcc4a3c7) | | The raising of the OOM error when rehashing the finalizer table (when we | can't allocate a new hash part) leads to crashes in either | `lj_trace_exit()` or `lj_trace_unwind()` due to unprotected error | raising, which either has no DWARF eh_frame [1] or loses the context of | the JIT compiler. | | This patch drops rehashing of the cdata finalizer table to avoid these | crashes. It will prevent the cdata finalizer table from shrinking when | the huge amount of the cdata objects is collected by the GC. OTOH, the | finzlizer table most probably will grop anyway to the old size, so this | is not crucial. | | Sergey Kaplun: | * added the description and the test for the problem | | [1]: https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html | | Part of tarantool/tarantool#10199 | Resolves tarantool/tarantool#10290 > > rehashing was not needed from the beginning. > > > crashes. > > > > Sergey Kaplun: > > * added the description and the test for the problem > > > > Part of tarantool/tarantool#10199 > > Resolves tarantool/tarantool#10290 > Usually "Closes" or "Fixes". Feel free to ignore. For LuaJIT, we always use "Resolves", since it is __closed__ when the submodule is bumped in the release branches and master. > > --- > > > > Branch:https://github.com/tarantool/luajit/tree/skaplun/lj-1247-fin-tab-rehashing-on-trace > > Related Issues: > > *https://github.com/tarantool/tarantool/issues/10290 > > *https://github.com/LuaJIT/LuaJIT/issues/1247 > > *https://github.com/tarantool/tarantool/issues/10199 > > <snipped> -- Best regards, Sergey Kaplun
next prev parent reply other threads:[~2024-09-07 5:15 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-09-02 12:54 Sergey Kaplun via Tarantool-patches 2024-09-06 14:42 ` Sergey Bronnikov via Tarantool-patches 2024-09-07 5:15 ` Sergey Kaplun via Tarantool-patches [this message] 2024-09-09 13:37 ` Sergey Bronnikov via Tarantool-patches 2024-09-09 14:15 ` Sergey Kaplun via Tarantool-patches 2024-09-19 9:02 ` Maxim Kokryashkin via Tarantool-patches 2024-09-19 11:19 ` [Tarantool-patches] [PATCH luajit] Drop unused function wrapper Sergey Kaplun via Tarantool-patches 2024-09-19 11:30 ` Maxim Kokryashkin via Tarantool-patches 2024-09-19 18:53 ` Sergey Bronnikov via Tarantool-patches 2024-10-18 15:13 ` [Tarantool-patches] [PATCH luajit] FFI: Drop finalizer table rehash after GC cycle 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=Ztvhgw3XohMDy6Su@root \ --to=tarantool-patches@dev.tarantool.org \ --cc=sergeyb@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit] FFI: Drop finalizer table rehash after GC cycle.' \ /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