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 AE8FA711CE3; Sat, 18 Nov 2023 19:52:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AE8FA711CE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1700326375; bh=w8tssE1Q80uK02leb6RaaRuMaP8YukhOn/UepXOcgdE=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=qb3U+3S+eGX8+WL3C+2HefM3wMdKkyCwl6kXdOEPRaWH8AHU042sAHmz+KmldPxX+ M1RbZIJ0EvGjM73WoGxwKtC8bBVnLl2qVp/ER1hIg8kEy4vndfrKpVfNDWCxxJLEpV WjWQMGUwqsCL1N2ItVva+8n1WzsfrDgzVlDUdOfQ= Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [95.163.41.64]) (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 F13F3711CE3 for ; Sat, 18 Nov 2023 19:52:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F13F3711CE3 Received: by smtp41.i.mail.ru with esmtpa (envelope-from ) id 1r4OYw-00GqCv-11; Sat, 18 Nov 2023 19:52:54 +0300 Message-ID: <1e374d3c-ad4a-4379-a22b-85cbc083f658@tarantool.org> Date: Sat, 18 Nov 2023 19:52:53 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Maksim Kokryashkin , tarantool-patches@dev.tarantool.org, skaplun@tarantool.org, m.kokryashkin@tarantool.org References: <20231109134549.4905-1-max.kokryashkin@gmail.com> In-Reply-To: <20231109134549.4905-1-max.kokryashkin@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD93F1575C7510F5547D25917A9C8A3601FF489A39E1D724A1300894C459B0CD1B98929087204322AC8153AB06AE64F33076424127CCDC1B293A9012D9B09AE9B97 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7589DF9800DB1E191EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F907CB39E8CA2E228638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8F88C3B1AA7EF5FF9F6D066AE97CBF495117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE1E561CDFBCA1751F0A5971FBB7557E96D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE317119E5299B287EEAD7EC71F1DB88427C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CD2DCF9CF1F528DBC2E808ACE2090B5E1725E5C173C3A84C3ED8438A78DFE0A9E089D37D7C0E48F6C8AA50765F79006372C56F9BC9525AE6AEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5172BF75BCC755BCC1546C54D15DDAC5EFC72FAD20FC545BAF87CCE6106E1FC07E67D4AC08A07B9B065B78C30F681404DCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFDD08675018A2CFBA2514C145E96A4E0F33315B8B3D5CD1DC78C3D728B172B74D392F865EE1B25CD5FCC135EDF961F15FB95C6BB7E1CEB036ED20C8BE521BB5D8A74DFFEFA5DC0E7F02C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojQSTOZvjxQBUHyJ2Fd7PS2A== X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F2588458E3F1115B116B006BB3585586D9A1A5D930513CE0030DFCD0282EC151BADDC1D3523A6D01B4765B2DFB59E2DDD9FE06B14FA522850F29BC30B0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v2] test: fix flaky OOM error frame test 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hello, Max LGTM with a question below On 11/9/23 16:45, Maksim Kokryashkin wrote: > This test could do allocation outside of the protected frame, > which could result in an uncaught OOM and test failure. This > patch adds extra `collectgarbage` calls to the test to avoid > such situations. > --- > Changes in v2: > - Fixed comments as per review by Sergey Kaplun > Branch: https://github.com/tarantool/luajit/tree/fckxorg/lj-1004-fix-flaky > PR: https://github.com/tarantool/tarantool/pull/9318 > test/tarantool-tests/lj-1004-oom-error-frame.test.lua | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/test/tarantool-tests/lj-1004-oom-error-frame.test.lua b/test/tarantool-tests/lj-1004-oom-error-frame.test.lua > index 3be6b555..2ddb5765 100644 > --- a/test/tarantool-tests/lj-1004-oom-error-frame.test.lua > +++ b/test/tarantool-tests/lj-1004-oom-error-frame.test.lua > @@ -10,6 +10,8 @@ test:plan(2) > > local testoomframe = require('testoomframe') > > +collectgarbage() Probably it is obvious, but I don't get it. Usually for forcing garbage collecting one need call `collectgarbage()` two times: for mark and sweep. You call it single time, why? > + > local anchor_memory = {} -- luacheck: no unused > local function eatchunks(size) > while true do > @@ -34,6 +36,11 @@ local function chomp() > end > > local st, err = pcall(chomp) > + > +-- Prevent OOM outside of the protected frame. > +anchor_memory = nil > +collectgarbage() Ditto. > + > test:ok(st == false, 'on-trace error handled successfully') > test:like(err, 'not enough memory', 'error is OOM') > test:done(true) > -- > 2.39.3 (Apple Git-145) >