This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: binascii.c:1578:1: error: the control flow of function ‘binascii_crc32’ does not match its profile data (counter ‘arcs’)
Type: compile error Stage: resolved
Components: Build Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder: "make clean" should remove PGO task data
View: 37725
Assigned To: Nosy List: SnoopJeDi, anthonypjshaw, christian.heimes, dacut, ncoghlan, wencan, xtreak
Priority: normal Keywords:

Created on 2018-09-27 13:58 by wencan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (7)
msg326563 - (view) Author: wencan (wencan) Date: 2018-09-27 13:58
git version: a94ee12c26aa8dd7dce01373779df8055aff765b

/home/wencan/Projects/github.com/python/cpython/Modules/binascii.c: In function ‘binascii_crc32’:
/home/wencan/Projects/github.com/python/cpython/Modules/binascii.c:1578:1: error: the control flow of function ‘binascii_crc32’ does not match its profile data (counter ‘arcs’) [-Werror=coverage-mismatch]
 }
 ^
/home/wencan/Projects/github.com/python/cpython/Modules/binascii.c:1578:1: error: the control flow of function ‘binascii_crc32’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
msg326580 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-09-27 18:39
Thanks for the report. 

* Can you please add the OS, GCC details, full traceback and command that triggers the error? 
* Is it consistent?
* Are you adding a flag to treat all the warnings as errors? 

I assume you are running PGO. As I can see on the bots for PGO they are green on Debian for the commit : https://buildbot.python.org/all/#/builders/47/builds/1609/steps/2/logs/stdio .  There is a issue related to PGO that causes internal compiler error but I don't think it's related here and it suggests doing make clean since previous build artifacts might cause an issue : https://bugs.python.org/issue31963#msg305708
msg341574 - (view) Author: anthony shaw (anthonypjshaw) * (Python triager) Date: 2019-05-06 17:38
There is not enough information to triage this issue and since the last request there has been no reply. Closing issue.
msg352754 - (view) Author: David Cuthbert (dacut) * Date: 2019-09-18 20:57
I'm seeing this on a rebuild now of Python 3.7.4 on Ubuntu 18.04 (in my case against _ssl.c).

What's happening is there's coverage/profiling data being generated in the build chain (somewhere), which spits out files named *.gcda. Interestingly, make clean does *not* clean these files up.

gcc is attempting to use this data in its optimization, but discovers that it's now bogus -- likely due to system library headers (like OpenSSL) being updated in the meantime, with some inline code causing the coverage data to become invalid.

The fix should be to have 'make clean' clean up these *.gcda files. In the meantime, the workaround is to run "find . -name \*.gcda -exec rm '{}' \;"
msg371783 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2020-06-17 23:24
I'm seeing this as well when attempting to run an optimised Python 3.8 build on an old Debian 9 system (with the curses and socket extension modules).

For example:

cpython/Modules/socketmodule.c: In function ‘PyInit__socket’:
cpython/Modules/socketmodule.c:8304:1: error: the control flow of function ‘PyInit__socket’ does not match its profile data (counter ‘arcs’) [-Werror=coverage-mismatch]
cpython/Modules/socketmodule.c:8304:1: error: the control flow of function ‘PyInit__socket’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]

That said, I did install missing optional dependendencies and then do a reconfigure without doing a "make clean", which is pretty dubious.

So David's assessment here sounds good to me: the bug is that "make clean" should be removing the intermediate PGO files, but is currently leaving them lying around.
msg407313 - (view) Author: James Gerity (SnoopJeDi) Date: 2021-11-29 18:34
The Makefile issue was fixed in bpo-37725 (GitHub: https://github.com/python/cpython/commit/c6bbcd258302b4b9b3d4f3c39bb5f7ff0120ec67), but the change wasn't ported to the 3.7, 3.8 branches. Those versions are now security-only, so this issue can probably just be closed.

If anybody comes to this issue with the same problem, you can `make profile-removal` or `make clobber` to get GNU Make to clean up the PGO data, or you can remove the files yourself with the `find` invocation.
msg407361 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-11-30 11:27
Thanks for the update.

I'm marking the issue as "wont fix" for 3.7 and 3.8.
History
Date User Action Args
2022-04-11 14:59:06adminsetgithub: 79001
2021-11-30 11:27:36christian.heimessetstatus: open -> closed

superseder: "make clean" should remove PGO task data

nosy: + christian.heimes
messages: + msg407361
resolution: wont fix
stage: needs patch -> resolved
2021-11-29 18:34:08SnoopJeDisetnosy: + SnoopJeDi
messages: + msg407313
2020-06-17 23:24:12ncoghlansetnosy: + ncoghlan
messages: + msg371783
2019-09-18 21:16:21ned.deilysetstatus: closed -> open
stage: resolved -> needs patch
2019-09-18 20:58:29dacutsetversions: + Python 3.8
2019-09-18 20:57:42dacutsetnosy: + dacut

messages: + msg352754
versions: + Python 3.7, - Python 3.8
2019-05-06 17:38:50anthonypjshawsetstatus: open -> closed

nosy: + anthonypjshaw
messages: + msg341574

stage: resolved
2018-09-27 18:39:14xtreaksetmessages: + msg326580
2018-09-27 18:27:21xtreaksetnosy: + xtreak
2018-09-27 13:58:02wencancreate