From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 6532CAC0DA6 for ; Thu, 29 Feb 2024 08:27:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=O82reIkyHijnXuy2h4vpo5Us3eia1uwlZuVwHEe4FRk=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1709195222; v=1; b=M+0hPfuzwXddo1yq7z8vI4Kw85KNI0tIsCdrEO8SMkouTno/GavcxJ4eh1QzrYfADk7H4EgE cMLfMgjOhFSmuJ+0DlCGLrDwG0x1W/B8OoPEJWX6xvqXyYQjqGgj7zBIEWj1MukUGoo1af3UQYP FyV8SggH+eqBPY24NvzAJS44= X-Received: by 127.0.0.2 with SMTP id 5PlNYY7687511xPuxfYvFjIL; Thu, 29 Feb 2024 00:27:02 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.19658.1709195222111535463 for ; Thu, 29 Feb 2024 00:27:02 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-675-Pg8jD-nWOIW7Kr1WH0_UpQ-1; Thu, 29 Feb 2024 03:26:59 -0500 X-MC-Unique: Pg8jD-nWOIW7Kr1WH0_UpQ-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id E43191C05147 for ; Thu, 29 Feb 2024 08:26:58 +0000 (UTC) X-Received: from [10.39.192.138] (unknown [10.39.192.138]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FF10112132A; Thu, 29 Feb 2024 08:26:58 +0000 (UTC) Message-ID: <3b39a420-2fb5-0336-6494-f0d2a857e04b@redhat.com> Date: Thu, 29 Feb 2024 09:26:57 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] CI: GCC13 and lcov problem To: devel@edk2.groups.io, osteffen@redhat.com References: From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: x7LxghRdqEAWlnJ9d40Kw52px7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=M+0hPfuz; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 2/28/24 14:59, Oliver Steffen wrote: > Hi, >=20 > I am working on switching the Linux CI jobs over to the Fedora 39 image > which comes with gcc 13. >=20 > Unfortunately, some jobs fail due to some error related to lcov / > geninfo, see below. >=20 > Does anybody know from the top of the head what this is about / what to d= o? > PR: https://github.com/tianocore/edk2/pull/5412 >=20 > Job log: >=20 > INFO - Cmd to run is: lcov --capture --directory > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/ --output-file > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/coverage-test.info --rc > lcov_branch_coverage=3D1 > INFO - ------------------------------------------------ > INFO - --------------Cmd Output Starting--------------- > INFO - ------------------------------------------------ > INFO - Capturing coverage data from > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/ > INFO - geninfo cmd: '/usr/bin/geninfo > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/ --output-filename > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/coverage-test.info --rc > lcov_branch_coverage=3D1 --memory 0 --branch-coverage' > INFO - geninfo: WARNING: RC option 'lcov_branch_coverage' is > deprecated. Consider using 'branch_coverage. instead. > (Backward-compatible support will be removed in the future > INFO - Found gcov version: 13.2.1 > INFO - Using intermediate gcov format > INFO - Writing temporary data to /tmp/geninfo_datXdcz > INFO - Scanning /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/ for > .gcda files ... > INFO - Found 99 data files in /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_G= CC5/ > INFO - Processing > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/L= ibrary/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost/OUTPUT/UnitTestDeb= ugAssertLibHost.gcda > INFO - Processing > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/L= ibrary/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull/OUTPUT/UnitTes= tPersistenceLibNull.gcda > INFO - Processing > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/L= ibrary/Posix/DebugLibPosix/DebugLibPosix/OUTPUT/DebugLibPosix.gcda > INFO - Processing > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/L= ibrary/Posix/MemoryAllocationLibPosix/MemoryAllocationLibPosix/OUTPUT/Memor= yAllocationLibPosix.gcda > INFO - Processing > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/L= ibrary/UnitTestResultReportLib/UnitTestResultReportLibDebugLib/OUTPUT/UnitT= estResultReportLib.gcda > INFO - Processing > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/L= ibrary/UnitTestResultReportLib/UnitTestResultReportLibDebugLib/OUTPUT/UnitT= estResultReportLibDebugLib.gcda > INFO - Processing > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/L= ibrary/CmockaLib/CmockaLib/OUTPUT/cmocka/src/cmocka.gcda > INFO - geninfo: WARNING: > /__w/1/s/UnitTestFrameworkPkg/Library/CmockaLib/cmocka/src/cmocka.c:725: > unexecuted block on non-branch line with non-zero hit count. Use > "geninfo --rc geninfo_unexecuted_blocks=3D1 to set count to zero. > INFO - Processing > /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/L= ibrary/GoogleTestLib/GoogleTestLib/OUTPUT/googletest/googlemock/src/gmock-a= ll.gcda > INFO - geninfo: ERROR: "/usr/include/c++/13/bits/stl_tree.h":2129: > mismatched exception tag for id 1, 1: '1' -> '0' > INFO - (use "geninfo --ignore-errors mismatch ..." to bypass this error) > INFO - ------------------------------------------------ > INFO - --------------Cmd Output Finished--------------- > INFO - --------- Running Time (mm:ss): 00:00 ---------- > INFO - ----------- Return Code: 0x00000001 ------------ > INFO - ------------------------------------------------ > ERROR - UnitTest Coverage: Failed to build coverage data for tested files= . > ERROR - Plugin Failed: Host-Based Unit Test Runner returned 1 > CRITICAL - Post Build failed > PROGRESS - End time: 2024-02-26 16:18:23.207202 Total time Elapsed: 0:00= :32 > ERROR - --->Test Failed: Host Unit Test Compiler Plugin NOOPT returned 1 Seems like lcov / geninfo cannot convert the collected gcov coverage data file to a "trace file". The geninfo manual says, --ignore-errors errors Specify a list of errors after which to continue processing. Use this option to specify a list of one or more classes of errors after which geninfo should continue processing instead of aborting. Note that the tool will generate a warning (rather than a fatal error) unless you ignore the error two (or more) times: geninfo ... --ignore-errors unused,unused errors can be a comma-separated list of the following keywords: [...] mismatch: Inconsistent entries found in trace file: branch expression (3rd field in the .info file 'BRDA' entry) of merge data does not match, or function execution count (FNDA:...) but no function declaration (FN:...). I think there may be something in the C++ STL (stl_tree.h), related to potential exception escape paths , that tickles a bug in geninfo. I'd report a bug for upstream lcov and for the time being, put "geninfo --ignore-errors mismatch" in our CI scripts. Browsing some older bug reports there, it seems that lcov may be right, and it's indeed gcov that produces inconsistent data files: . Ah, the exact same problem has been reported earlier: https://github.com/linux-test-project/lcov/issues/209 The lcov maintainer provides a great description in the ticket. It's a toolchain problem that lcov only catches. Laszlo -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116138): https://edk2.groups.io/g/devel/message/116138 Mute This Topic: https://groups.io/mt/104623079/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-