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 8B7056ECDC; Fri, 16 Oct 2026 15:54:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8B7056ECDC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1792155284; bh=dMxXDb1Iv9quz1/lEPfTh37F7DIhHQono2sCLjVkrEg=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=KRFzlFyykUhqzoxGU0p0Hl3p7rZLh/OsG5JIoAExUDL8N34aIdlBX4WoMIyWwaLEC rEOTqlIRgsyJ969KTHAn1d4YqdxBHdbjKt6rwxZJRxGKMSnLj+kjmPvrN8duiLdqMu S2fs63pVoGtE4zU2M1hj4yJiN7aHhquJhi8Sick0= Received: from send60.i.mail.ru (send60.i.mail.ru [89.221.237.155]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C87C76ECDC for ; Fri, 16 Oct 2026 15:54:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C87C76ECDC Received: by exim-smtp-canary-10-cb6b8b7df-n9l4v with esmtpa (envelope-from ) id 1xHhSL-00000000PVn-2GGb; Fri, 16 Oct 2026 15:54:42 +0300 Date: Fri, 16 Oct 2026 15:54:22 +0300 To: Mikhail Elhimov Message-ID: References: <20261015072055.317299-1-m.elhimov@vk.team> <20261015234516.385484-1-m.elhimov@vk.team> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261015234516.385484-1-m.elhimov@vk.team> X-Mailru-Src: smtp X-4EC0790: 10 X-618D5548: A533BF5DBCC0636406104296DCCA83D2964B92761E483E23917D2CA2818D80C3F94BD286FA50896A X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D5ABD805758C3F0BA0C4612388BBC50C3D9ACE70364F9949182A05F538085040C656D68CA34753553DE06ABAFEAF670539E1198E6E739F09E692FFB73574F953DB2FAAB0A8254537 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C59BC9C499248573C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE7DBA72CFE7C57007CEA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA65812C892A8303D2C1CFBDE8AC74F9F8D247B71F54C086827C8117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A127C277FBC8AE2E8B61E382A16E5D5A2A3AA81AA40904B5D99C9F4D5AE37F343AD1F44FA8B9022EA23BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735D2457FAF19517CF2C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5EA913D10C5E405785002B1117B3ED696A6C48EF40719B8E6361FAC1196A180DE823CB91A9FED034534781492E4B8EEADE0C144949FACE77EBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADB58128AB1E6D661A716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D6593FCC16A98063D7CC7E84DD8424B48596591C50F32D3E58DC33547E2239E7DEBC2ED2D728D6508C66B8341EE9D5BE9A0A4F164A03421DB34616A33C4FB233CA7C9A4E5D1C419292BDC7CEAA0681F5848F4C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXOcIETfglQORZ0zpDET4Zrk3igikrdHlWLEFpbGXoGDNDLEd9SnCO68= X-Mailru-Sender: 520A125C2F17F0B17094CDC02B85F11BC778FE5A332201433DE06ABAFEAF670539E1198E6E739F09B7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v2] dbg: remove wrong GC state 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Mikhail! Thanks for the patch! LGTM, after adding the comment for the testing snippet, see below. On 16.10.26, Mikhail Elhimov wrote: > It has been copied by mistake from the LuaVela fork of LuaJIT. > --- > Changes in v2: > * Rebased onto https://lists.tarantool.org/pipermail/tarantool-patches/2026-October/030859.html to avoid conflicts > > This patch is to be applied after https://lists.tarantool.org/pipermail/tarantool-patches/2026-October/030859.html > > Branch: https://github.com/tarantool/luajit/tree/elhimov/gh-noticket-dbg-remove-wrong-gcstate > > src/luajit_dbg.py | 3 +- > .../debug-extension-tests.py | 96 +++++++++++++++++-- > 2 files changed, 87 insertions(+), 12 deletions(-) > > diff --git a/src/luajit_dbg.py b/src/luajit_dbg.py > index a685ecfa..8f7249ab 100644 > --- a/src/luajit_dbg.py > +++ b/src/luajit_dbg.py > diff --git a/test/tarantool-debugger-tests/debug-extension-tests.py b/test/tarantool-debugger-tests/debug-extension-tests.py > index bbd53dcc..735de2cb 100644 > --- a/test/tarantool-debugger-tests/debug-extension-tests.py > +++ b/test/tarantool-debugger-tests/debug-extension-tests.py > +class TestGCStateBase(TestCaseBase): > + extension_cmds = ( > + 'lj-state\n' > + 'lj-gc\n' > + ) > + lua_script = ( > + 'local obj = newproxy(true)\n' > + 'getmetatable(obj).__gc = function() end\n' > + 'obj = nil\n' > + 'collectgarbage()\n' > + ) It would be nice to add the comment here explaining why __all__ GC states are reachable through this Lua code: 1) `gc_mark_start()` (GCpause) is always present in the full GC cycle. 2) `propagatemark()` (GCSpropagate) is reachable because our build has FFI and the finalizer table is marked as a weak table, i.e. it is grey. Hence, the g->gc.gray list is not empty. 3) `atomic()` (GCSatomic) is always present in the full GC cycle. 4) `gc_sweep_str_chain()` (GCSsweepstring) is always present in the full GC cycle. 5) `gc_sweep()` (GCSsweep) is always present in the full GC cycle. 6) `gc_finalize()` is met due to the finalizer to userdata in the script. > + > + @classmethod > + def setUpClass(cls): > + cls.pattern = ( > + compose_lj_state_rx(cls.gc_state) + > + compose_gc_stats_rx(cls.gc_state) > + ) > + super(TestGCStateBase, cls).setUpClass() > + > + > +class TestGCStatePause(TestGCStateBase): > + gc_state = GCS_PAUSE > + location = 'gc_mark_start' > + > + > +class TestGCStatePropagate(TestGCStateBase): > + gc_state = GCS_PROPAGATE > + location = 'propagatemark' > + > + > +class TestGCStateAtomic(TestGCStateBase): > + gc_state = GCS_ATOMIC > + location = 'atomic' > + > + > +class TestGCStateSweepString(TestGCStateBase): > + gc_state = GCS_SWEEPSTRING > + location = 'gc_sweep_str_chain' > + > + > +class TestGCStateSweep(TestGCStateBase): > + gc_state = GCS_SWEEP > + location = 'gc_sweep' > + > + > +class TestGCStateFinalize(TestGCStateBase): > + gc_state = 'FINALIZE' > + location = 'gc_finalize' > + > + > STACK_RX = ( > r'-+ Red zone:\s+\d+ slots -+\n' > r'(' + RX_ADDR + r'\s+' + RX_FRAME + r' VALUE: nil\n?)*\n' > -- > 2.43.0 > -- Best regards, Sergey Kaplun