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 37016E0FD58; Tue, 3 Dec 2024 18:45:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 37016E0FD58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1733240711; bh=MtUwS78fpZSGNKtyrx5OdJWqUNAZxlGd42eAJjtvn2c=; 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=pNrzngjXh5hYy1fpN/RXOw+HwMGhhVBDfvhkoIgdYVrq+X5D4pZH4XjOTYcwVmx/t rUiRnrfBsoD0GpffXuNeQeHBlJPtoV9VC+kzP7cl/xsAvSejTNZleciEV8StlKjv7E ety/O4xykVSs7my/ubQutDs8keGLnmBIGsJ0Av4I= Received: from send219.i.mail.ru (send219.i.mail.ru [95.163.59.58]) (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 C83896DB22 for ; Tue, 3 Dec 2024 18:45:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C83896DB22 Received: by exim-smtp-d8dc69f59-kgkz4 with esmtpa (envelope-from ) id 1tIV5I-000000002dU-3Dak; Tue, 03 Dec 2024 18:45:09 +0300 Date: Tue, 3 Dec 2024 18:44:08 +0300 To: mandesero@gmail.com Message-ID: References: <20241202135211.3714-1-mandesero@gmail.com> <20241202135211.3714-3-mandesero@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241202135211.3714-3-mandesero@gmail.com> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9E901D80A2F39FF5F333C501A55CF0204F8698F85EC972A81182A05F53808504090912F3D2FDBB7843DE06ABAFEAF6705311BB41DAB63A963B5868BCD794BCDCB1DFC3049464E9EA7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78981306C6E927004EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006376B6794A086D6ADA58638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D84C74E62F7BCCC512524951229918BB11B50B824BAEABF1FDCC7F00164DA146DAFE8445B8C89999728AA50765F79006370BDD70ABAC747F53389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC878444BBB7636F62AF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B779389CF6F126FEC75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5AD3E81D873A848A85002B1117B3ED696FAB06CD92F087B7E92B673A2F5DDD7E7823CB91A9FED034534781492E4B8EEAD5DF1C2DF01CE7211BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF482205DE64D7F175E6AFF632825E8BE30B5E33D50C89CC0867F124800D707D77508B3DC588E9D1C77364E7F40BF8CCAEF2302167FFD03B452A580A876E06363C70FF0E68FB063B1E5F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojXzVciccAM/PF0XQsZj/6fQ== X-DA7885C5: 6D0D0110781ED2EEF255D290C0D534F90149E36D914BD15836EDBC3326057302F71241D5AAE239C15B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F739381B31377CF4CA219E4D08806ADF7ECC2B741FE52EE5C2F4C59410C62FD6F5409E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 luajit 2/2] ci: add Valgrind testing workflow 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, Maksim! Thanks for the fixes! Please consider my comments below. On 02.12.24, mandesero@gmail.com wrote: > From: Maksim Tiushev > + - VALGRIND_SCENARIO: full > + VALGRIND_OPTS: --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --error-exitcode=1 > + JOB_POSTFIX: "leak-check: full" > + # The use of `0x00` and `0xFF` for memory fill helps to detect dirty > + # reads. `0x00` mimics zero-initialized memory, which can mask some > + # uninitialized memory usage. `0xFF` fills memory with a non-zero > + # values to make such errors easier to spot. > + - VALGRIND_SCENARIO: malloc-free-fill-0x00 > + VALGRIND_OPTS: --leak-check=no --malloc-fill=0x00 --free-fill=0x00 --verbose --error-exitcode=1 > + JOB_POSTFIX: "malloc/free-fill: 0x00" > + - VALGRIND_SCENARIO: malloc-free-fill-0xff > + VALGRIND_OPTS: --leak-check=no --malloc-fill=0xff --free-fill=0xff --verbose --error-exitcode=1 I suppose that common options for all suites may be placed inside the `${test_command}` during CMake configuration. Thus we don't forget about them, and it is more convenient for local testing -- I shouldn't add VALGRIND_OPTS="--error-exitcode=1 " each time. And this approach is more robust (see the comment below). > + JOB_POSTFIX: "malloc/free-fill: 0xff" > + runs-on: [self-hosted, regular, Linux, x86_64] > + name: > > + LuaJIT with Valgrind (Linux/x86_64) > + ${{ matrix.BUILDTYPE }} > + CC: gcc > + GC64:ON SYSMALLOC:ON > + ${{ matrix.JOB_POSTFIX }} > + steps: > + - uses: actions/checkout@v4 > + with: > + fetch-depth: 0 > + submodules: recursive > + - name: setup Linux for Valgrind > + uses: ./.github/actions/setup-valgrind > + - name: configure > + # XXX: LuaJIT configuration requires a couple of tweaks: > + # LUAJIT_USE_SYSMALLOC=ON: Unfortunately, internal LuaJIT > + # memory allocator is not instrumented yet, so to find > + # any memory errors it's better to build LuaJIT with > + # system provided memory allocator (i.e. run CMake > + # configuration phase with -DLUAJIT_USE_SYSMALLOC=ON). > + # For more info, see root CMakeLists.txt. > + # LUAJIT_ENABLE_GC64=ON: LUAJIT_USE_SYSMALLOC cannot be > + # enabled on x64 without GC64, since realloc usually > + # doesn't return addresses in the right address range. > + # For more info, see root CMakeLists.txt. > + env: > + VALGRIND_OPTS: ${{ matrix.VALGRIND_OPTS }} I suppose this env should be provided for test step, so these options are actually used [1]: | Run cmake --build . --parallel --target LuaJIT-test | cmake --build . --parallel --target LuaJIT-test | shell: /usr/bin/bash -e {0} | env: | BUILDDIR: /opt/actions-runner/_work/_temp/build-12086657821 | CMAKE_BUILD_PARALLEL_LEVEL: 9 Locally I've got errors related to each of our test suites (except tarantool-c-tests): | VALGRIND_OPTS="--error-exitcode=1 " ctest -V -L LuaJIT-tests | ... | 2: ==16791== ERROR SUMMARY: 4749 errors from 69 contexts (suppressed: 62676 from 164) | 2/2 Test #2: test/LuaJIT-tests ................***Failed 64.23 sec | | VALGRIND_OPTS="--error-exitcode=1 " ctest -V -L lua-Harness-tests | .. | 22% tests passed, 40 tests failed out of 51 | | VALGRIND_OPTS="--error-exitcode=1 " ctest -V -L PUC-Rio-Lua-5.1-tests | ... | 4: ==18453== ERROR SUMMARY: 78 errors from 14 contexts (suppressed: 363053 from 81) | 2/2 Test #4: test/PUC-Rio-Lua-5.1-tests .......***Failed 150.28 sec | | VALGRIND_OPTS="--error-exitcode=1 " ctest -V -L tarantool-tests | ... | 85% tests passed, 27 tests failed out of 175 I suppose that most of these errors are fixed with additional suppressions in the since they are related to `str_fastcmp`, etc. Also, there are some of them that require investigation. > + run: > > + cmake -S . -B ${{ env.BUILDDIR }} > + -G Ninja > + ${{ matrix.CMAKEFLAGS }} > + -DLUAJIT_USE_VALGRIND=ON > + -DLUAJIT_ENABLE_GC64=ON > + -DLUAJIT_USE_SYSMALLOC=ON > + - name: build > + run: cmake --build . --parallel > + working-directory: ${{ env.BUILDDIR }} > + - name: test > + run: cmake --build . --parallel --target LuaJIT-test > + working-directory: ${{ env.BUILDDIR }} > -- > 2.34.1 > [1]: https://github.com/tarantool/luajit/actions/runs/12086657821/job/33706418395#step:6:1 -- Best regards, Sergey Kaplun