* [edk2-devel] CI: GCC13 and lcov problem
@ 2024-02-28 13:59 Oliver Steffen
2024-02-29 8:26 ` Laszlo Ersek
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Steffen @ 2024-02-28 13:59 UTC (permalink / raw)
To: devel
Hi,
I am working on switching the Linux CI jobs over to the Fedora 39 image
which comes with gcc 13.
Unfortunately, some jobs fail due to some error related to lcov /
geninfo, see below.
Does anybody know from the top of the head what this is about / what to do?
PR: https://github.com/tianocore/edk2/pull/5412
Job log:
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=1
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=1 --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_GCC5/
INFO - Processing
/__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost/OUTPUT/UnitTestDebugAssertLibHost.gcda
INFO - Processing
/__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull/OUTPUT/UnitTestPersistenceLibNull.gcda
INFO - Processing
/__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix/OUTPUT/DebugLibPosix.gcda
INFO - Processing
/__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/Posix/MemoryAllocationLibPosix/MemoryAllocationLibPosix/OUTPUT/MemoryAllocationLibPosix.gcda
INFO - Processing
/__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib/OUTPUT/UnitTestResultReportLib.gcda
INFO - Processing
/__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib/OUTPUT/UnitTestResultReportLibDebugLib.gcda
INFO - Processing
/__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/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=1 to set count to zero.
INFO - Processing
/__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib/OUTPUT/googletest/googlemock/src/gmock-all.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
Thanks!
Oliver
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116117): https://edk2.groups.io/g/devel/message/116117
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [edk2-devel] CI: GCC13 and lcov problem
2024-02-28 13:59 [edk2-devel] CI: GCC13 and lcov problem Oliver Steffen
@ 2024-02-29 8:26 ` Laszlo Ersek
0 siblings, 0 replies; 2+ messages in thread
From: Laszlo Ersek @ 2024-02-29 8:26 UTC (permalink / raw)
To: devel, osteffen
On 2/28/24 14:59, Oliver Steffen wrote:
> Hi,
>
> I am working on switching the Linux CI jobs over to the Fedora 39 image
> which comes with gcc 13.
>
> Unfortunately, some jobs fail due to some error related to lcov /
> geninfo, see below.
>
> Does anybody know from the top of the head what this is about / what to do?
> PR: https://github.com/tianocore/edk2/pull/5412
>
> Job log:
>
> 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=1
> 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=1 --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_GCC5/
> INFO - Processing
> /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost/OUTPUT/UnitTestDebugAssertLibHost.gcda
> INFO - Processing
> /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull/OUTPUT/UnitTestPersistenceLibNull.gcda
> INFO - Processing
> /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix/OUTPUT/DebugLibPosix.gcda
> INFO - Processing
> /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/Posix/MemoryAllocationLibPosix/MemoryAllocationLibPosix/OUTPUT/MemoryAllocationLibPosix.gcda
> INFO - Processing
> /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib/OUTPUT/UnitTestResultReportLib.gcda
> INFO - Processing
> /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib/OUTPUT/UnitTestResultReportLibDebugLib.gcda
> INFO - Processing
> /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/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=1 to set count to zero.
> INFO - Processing
> /__w/1/s/Build/SecurityPkg/HostTest/NOOPT_GCC5/X64/UnitTestFrameworkPkg/Library/GoogleTestLib/GoogleTestLib/OUTPUT/googletest/googlemock/src/gmock-all.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
<https://stackoverflow.com/questions/42003783/lcov-gcov-branch-coverage-with-c-producing-branches-all-over-the-place>,
that tickles a bug in geninfo.
I'd report a bug for upstream lcov
<https://github.com/linux-test-project/lcov/issues> 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:
<https://github.com/linux-test-project/lcov/issues/238>.
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
-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-29 8:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 13:59 [edk2-devel] CI: GCC13 and lcov problem Oliver Steffen
2024-02-29 8:26 ` Laszlo Ersek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox