Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kcov fails ("status: 0x85") reproducibly on some binaries (tracker for kcov bug 339) #17978

Closed
ggould-tri opened this issue Sep 26, 2022 · 6 comments
Assignees
Labels
component: continuous integration Jenkins, CDash, mirroring of externals, website infrastructure priority: backlog type: bug

Comments

@ggould-tri
Copy link
Contributor

ggould-tri commented Sep 26, 2022

In effect this issue tracks the fact that all of our supported platforms use versions of kcov that suffer from bug SimonKagstrom/kcov#339 . This bug causes binaries with a particular set of bytes at the beginning to be incorrectly parsed as shell scripts, causing them to fail in overnight CI; it is silenced by making any small change to the code that causes the binary bytes to change -- reordering the individual tests in a test suite, for instance.

If this issue occurs, the log will contain the string:

kcov: warning: Other status: 0x85

This issue is tagged as "component: continuous integration" because it is almost invariably discovered by the buildcop the next morning and so should be on the buildcop's search list of common failures.

Examples of this problem in the past (there are many more occurrences but most are resolved over slack and don't result in issues being filed):

@ggould-tri ggould-tri added type: bug component: continuous integration Jenkins, CDash, mirroring of externals, website infrastructure labels Sep 26, 2022
@jwnimmer-tri
Copy link
Collaborator

... reordering the individual tests in a test suite, for instance.

Changing the order of tests ends up being a larger-than-necessary patch, disrupting history.

My suggestion for the least intrusive work-around is to add and remove namespaces in the test program (possibly inline namespaces) until it works (see, e.g., #17724, #17835).

@ggould-tri ggould-tri changed the title kcov fails reproducibly on some binaries (tracker for kcov bug 339) kcov fails ("status: 0x85") reproducibly on some binaries (tracker for kcov bug 339) Sep 26, 2022
@jwnimmer-tri jwnimmer-tri self-assigned this Sep 28, 2022
@jwnimmer-tri
Copy link
Collaborator

Both Ubuntu and Debian seem to have stalled out w.r.t. kcov and are no longer packaging new versions.

In case we decide we need a version upgrade, we might consider using https://github.com/bazelbuild/rules_foreign_cc to build kcov from source, instead of relying on Ubuntu. As long as the (single-threaded) build doesn't take inordinately long, there's a fair chance it would just work out of the box.

@rpoyner-tri
Copy link
Contributor

On a vintage puget, the make -j 40 step took under 10 seconds to compile and link from scratch. The cmake .. step is maybe 2 seconds. So, total from-scratch build budget should be small if configured right.

@jwnimmer-tri
Copy link
Collaborator

At the moment rules_foreign_cc maxes out at -j 1 (bazelbuild/rules_foreign_cc#329). There's finally been a bit of progress on doing better (bazelbuild/bazel#10443) but for the moment the metric we care about is the make -j 1 latency vs how patient people are willing to be, and how well Bazel does at not spuriously invalidating the cached build of kcov.

@rpoyner-tri
Copy link
Contributor

The -j 1 compile and link was ~70 seconds on vintage puget, so, maybe not great if it triggers often.

@jwnimmer-tri
Copy link
Collaborator

Closing as duplicate of #18969. We can still cite this issue in fixup PRs, but there's no action to take here.

@jwnimmer-tri jwnimmer-tri closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: continuous integration Jenkins, CDash, mirroring of externals, website infrastructure priority: backlog type: bug
Projects
None yet
Development

No branches or pull requests

3 participants