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 141381257044; Thu, 27 Feb 2025 16:12:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 141381257044 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1740661952; bh=6enKVeCDIfcOwtclJQiC6wl/ywPmkTaY2Ln0T7oMK9o=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=o5zVxdnXM+Fsr3QpQYIAhlqL8VGNrc/LOuUIxQmIEQkjBSSdMd7XmpmF3Vcl3UVqN LFXG6zJyctw9Xr381rKGZboSqJ02n1lcTWzeKPTscD+trS/nGmu+Jkbp+aSvldyOkE 6tTmMkva4PR4NJ/vkXf3j72TZdFSlr7YEiN/SahY= Received: from send35.i.mail.ru (send35.i.mail.ru [89.221.237.130]) (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 272C91257044 for ; Thu, 27 Feb 2025 16:12:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 272C91257044 Received: by exim-smtp-6558d74cf4-mfctz with esmtpa (envelope-from ) id 1tndgk-000000003JI-0syv; Thu, 27 Feb 2025 16:12:30 +0300 Content-Type: multipart/alternative; boundary="------------JCo0PbFedsbt2vgISFvrPCco" Message-ID: <39e85beb-f956-4359-9a40-016d855b0aa1@tarantool.org> Date: Thu, 27 Feb 2025 16:12:30 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: <20250227091825.31081-1-skaplun@tarantool.org> In-Reply-To: <20250227091825.31081-1-skaplun@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9F0D6B4A195F952731D1C28023C64B2DD96C7F4B7DD0915AF182A05F53808504017ED5CE0ADFF3C7B3DE06ABAFEAF6705C7C13C244A1E977B11A91CA39DD0A6E78B3203750C901C87 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73230F712CF4B3924EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB553375662B0B15A2BD47BC346769636DC1CD017FC0302E2B2F423823B2FA068DBF90E7F4389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0ECC8AC47CD0EDEFF8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B65FF0BFC5AEE34BE6CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249D88082464251487476E601842F6C81A12EF20D2F80756B5FB606B96278B59C4276E601842F6C81A127C277FBC8AE2E8BE31AAB7FF4261FD93AA81AA40904B5D99C9F4D5AE37F343AD1F44FA8B9022EA23BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735D2457FAF19517CF2C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A509D096B369308B375002B1117B3ED696AA1602874ACCEB16CA7E60A991436CA2823CB91A9FED034534781492E4B8EEAD27E9584FBD6BDD31BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF2D743E62A00B51478DFB016F154032B8769543115CB695658576266E9B433DCB7BCAC92FCA266270D4F7E0138972EF02505C083DCB014214A0ACD10F3935CF78BAFB786A0C9EC931111DC66A97D0BFE2913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVQQG/FugD0/CXzB+ULHyT+o= X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D6140EE8A72FCFB71CE09A6D5EE0DB6E1EC8D053C8974A6B23CD50152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] test: fix fix-mips64-spare-side-exit-patching 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" This is a multi-part message in MIME format. --------------JCo0PbFedsbt2vgISFvrPCco Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey, thanks for the patch! On 27.02.2025 12:18, Sergey Kaplun wrote: > The aforementioned test is flaky when run under Tarantool due to not > enough room for all traces. The flushing of all traces at the start and > collecting them solves the issue. Have you considered another options like increasing `maxtrace` value? > The same issue may occur for the > , so it is adjusted as > well. > --- > > Branch:https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-mips64-flaky-test > To reproduce, run the following command without the patch from the root > of the Tarantool repository: > | ctest --repeat-until-fail 1000 --test-dir third_party/luajit/ -R fix-mips64-spare-side-exit-patching > > .../fix-mips64-spare-side-exit-patching.test.lua | 5 +++++ > .../gh-6098-fix-side-exit-patching-on-arm64.test.lua | 5 +++++ > 2 files changed, 10 insertions(+) > > diff --git a/test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua b/test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua > index 703d8e69..dd9f2073 100644 > --- a/test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua > +++ b/test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua > @@ -15,6 +15,11 @@ local MAXTRACE = 2000; > > test:plan(1) > > +-- Flush all possible traces and collect them to be sure that > +-- we have enough space. > +jit.flush() > +collectgarbage() > + > local function find_last_trace() > local candidate = misc.getmetrics().jit_trace_num > for traceno = candidate, MAXTRACE do > diff --git a/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua b/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua > index 678ac914..f5fc4681 100644 > --- a/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua > +++ b/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua > @@ -9,6 +9,11 @@ local frontend = require('utils').frontend > > test:plan(1) > > +-- Flush all possible traces and collect them to be sure that > +-- we have enough space. > +jit.flush() > +collectgarbage() > + > -- The function to be tested for side exit patching: > -- * At the beginning of the test case, the branch is > -- recorded as a root trace. --------------JCo0PbFedsbt2vgISFvrPCco Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey,

thanks for the patch!

On 27.02.2025 12:18, Sergey Kaplun wrote:
The aforementioned test is flaky when run under Tarantool due to not
enough room for all traces. The flushing of all traces at the start and
collecting them solves the issue.
Have you considered another options like increasing `maxtrace` value?
The same issue may occur for the
<gh-6098-fix-side-exit-patching-on-arm64.test.lua>, so it is adjusted as
well.
---

Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-mips64-flaky-test
To reproduce, run the following command without the patch from the root
of the Tarantool repository:
| ctest --repeat-until-fail 1000 --test-dir third_party/luajit/ -R fix-mips64-spare-side-exit-patching

 .../fix-mips64-spare-side-exit-patching.test.lua             | 5 +++++
 .../gh-6098-fix-side-exit-patching-on-arm64.test.lua         | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua b/test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua
index 703d8e69..dd9f2073 100644
--- a/test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua
+++ b/test/tarantool-tests/fix-mips64-spare-side-exit-patching.test.lua
@@ -15,6 +15,11 @@ local MAXTRACE = 2000;
 
 test:plan(1)
 
+-- Flush all possible traces and collect them to be sure that
+-- we have enough space.
+jit.flush()
+collectgarbage()
+
 local function find_last_trace()
   local candidate = misc.getmetrics().jit_trace_num
   for traceno = candidate, MAXTRACE do
diff --git a/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua b/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua
index 678ac914..f5fc4681 100644
--- a/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua
+++ b/test/tarantool-tests/gh-6098-fix-side-exit-patching-on-arm64.test.lua
@@ -9,6 +9,11 @@ local frontend = require('utils').frontend
 
 test:plan(1)
 
+-- Flush all possible traces and collect them to be sure that
+-- we have enough space.
+jit.flush()
+collectgarbage()
+
 -- The function to be tested for side exit patching:
 -- * At the beginning of the test case, the <if> branch is
 --   recorded as a root trace.
--------------JCo0PbFedsbt2vgISFvrPCco--