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 F179513E955E; Fri, 6 Jun 2025 16:56:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F179513E955E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1749218208; bh=CPiAV7mZ6h+9QmkJ6KXTosswwa9nKoUVV6s91caIU3E=; 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=AwJm6WjB2RKHRTlOfpL8uvo51B1ZD+iAo3tKeImfaLJCePhWD7SqZdvRqlDuejTXz bkOhSPmlV2oi93jzScmyFvnmlWzAPRF4iOwSH04eELIdPGSPs1rIa3q6KA91B6bUbi I0vr09NYMYjHC3QPvY5Sn50JlKQ/UfeGONXKFKgw= Received: from send266.i.mail.ru (send266.i.mail.ru [95.163.59.105]) (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 B824A13E9541 for ; Fri, 6 Jun 2025 16:56:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B824A13E9541 Received: by exim-smtp-567cc788d4-ttg7z with esmtpa (envelope-from ) id 1uNXYs-000000003BT-3cIa; Fri, 06 Jun 2025 16:56:47 +0300 Content-Type: multipart/alternative; boundary="------------GmwlmmMq0wibIXf6ZC5aTvXd" Message-ID: Date: Fri, 6 Jun 2025 16:56:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD95E97EA1894635BC3A83BBFECDDAED19472D2E8984E73D027182A05F538085040D33C1E0193124FE03DE06ABAFEAF6705A0287C3F44D0A6221C59987DA4337F2F28006A18B89A766D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE763424119D34F5CBFEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB5533756680FD86C7FE90CFE54817F00D105CC4CBA50B74CC51B5D7B41EF28F6B02F6C7A8389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B652D31B9D28593E51CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C22490F250D17497FEF6176E601842F6C81A12EF20D2F80756B5FB606B96278B59C4276E601842F6C81A127C277FBC8AE2E8B8DBB596EC94336063AA81AA40904B5D99C9F4D5AE37F343AD1F44FA8B9022EA23BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735B17145F0B7815491C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A593AA1E89B3C0D4745002B1117B3ED696E2D1855EBB5278EA250A03108B67251B823CB91A9FED034534781492E4B8EEADDFC043C56F70D752BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF54305B3144C9C182A8EA2416EF2869B25977A43B6E15AF10AAD46EAB53D6F393D1BAA24A4D7F85D84322DC41441C31F090FD933B4CD298E0F2239D5531265CE5C14E05D93544A5CC111DC66A97D0BFE2913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVSykAyseJQ6/qcmg3Gcf8wQ= X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D6140DCC3993321FCF7C4A6D5EE0DB6E1EC8D42386CEE48BCA00B0152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/3] ci: add track-fds Valgrind scenario 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. --------------GmwlmmMq0wibIXf6ZC5aTvXd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello, Sergey, Thanks for the patch! See my comments below. On 6/5/25 08:44, Sergey Kaplun wrote: > This patch adds a new field, track-fds [1], in the Valgrind workflow > matrix to detect descriptor leakage in the tests. > > [1]:https://valgrind.org/docs/manual/manual-core.html#opt.track-fds > > Needed for tarantool/tarantool#11278 > --- > .github/workflows/valgrind-testing.yaml | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/.github/workflows/valgrind-testing.yaml b/.github/workflows/valgrind-testing.yaml > index e6606478..b3c7bc80 100644 > --- a/.github/workflows/valgrind-testing.yaml > +++ b/.github/workflows/valgrind-testing.yaml > @@ -38,7 +38,11 @@ jobs: > # Therefore, testing on this platform is currently > # disabled. > BUILDTYPE: [Debug, Release] > - VALGRIND_SCENARIO: [full, malloc-free-fill-0x00, malloc-free-fill-0xff] > + VALGRIND_SCENARIO: > + - full > + - malloc-free-fill-0x00 > + - malloc-free-fill-0xff > + - track-fds Why we cannot add "track-fds" to the existed scenario? > include: > - BUILDTYPE: Debug > CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON > @@ -59,6 +63,9 @@ jobs: > - VALGRIND_SCENARIO: malloc-free-fill-0xff > VALGRIND_OPTS: --leak-check=no --malloc-fill=0xff --free-fill=0xff > JOB_POSTFIX: "malloc/free-fill: 0xff" > + - VALGRIND_SCENARIO: track-fds According to documentation, the option "print out a list of open file descriptors on exit or on request". So the fd leak detection is semi-automated. How it should work on CI? > + VALGRIND_OPTS: --leak-check=no --track-fds=yes > + JOB_POSTFIX: "track-fds" > runs-on: [self-hosted, regular, Linux, x86_64] > name: > > LuaJIT with Valgrind (Linux/x86_64) --------------GmwlmmMq0wibIXf6ZC5aTvXd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hello, Sergey,

Thanks for the patch! See my comments below.

On 6/5/25 08:44, Sergey Kaplun wrote:
This patch adds a new field, track-fds [1], in the Valgrind workflow
matrix to detect descriptor leakage in the tests.

[1]: https://valgrind.org/docs/manual/manual-core.html#opt.track-fds

Needed for tarantool/tarantool#11278
---
 .github/workflows/valgrind-testing.yaml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/valgrind-testing.yaml b/.github/workflows/valgrind-testing.yaml
index e6606478..b3c7bc80 100644
--- a/.github/workflows/valgrind-testing.yaml
+++ b/.github/workflows/valgrind-testing.yaml
@@ -38,7 +38,11 @@ jobs:
         # Therefore, testing on this platform is currently
         # disabled.
         BUILDTYPE: [Debug, Release]
-        VALGRIND_SCENARIO: [full, malloc-free-fill-0x00, malloc-free-fill-0xff]
+        VALGRIND_SCENARIO:
+          - full
+          - malloc-free-fill-0x00
+          - malloc-free-fill-0xff
+          - track-fds
Why we cannot add "track-fds" to the existed scenario?
         include:
           - BUILDTYPE: Debug
             CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON
@@ -59,6 +63,9 @@ jobs:
           - VALGRIND_SCENARIO: malloc-free-fill-0xff
             VALGRIND_OPTS: --leak-check=no --malloc-fill=0xff --free-fill=0xff
             JOB_POSTFIX: "malloc/free-fill: 0xff"
+          - VALGRIND_SCENARIO: track-fds

According to documentation, the option "print out a list of open file descriptors on exit or on request".

So the fd leak detection is semi-automated. How it should work on CI?

+            VALGRIND_OPTS: --leak-check=no --track-fds=yes
+            JOB_POSTFIX: "track-fds"
     runs-on: [self-hosted, regular, Linux, x86_64]
     name: >
       LuaJIT with Valgrind (Linux/x86_64)
--------------GmwlmmMq0wibIXf6ZC5aTvXd--