bazelbuild / bazelbuild/bazel

Bazel Coverage not work in ubuntu 22.04

Open
#20,993 5 comments 0 reactions 0 assignees View on GitHub
coverage P2 team-Rules-API type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

After running bazel coverage --combined_report=lcov target I get this segmentation fault

external/bazel_tools/tools/test/collect_cc_coverage.sh: line 113: 181 Segmentation fault (core dumped) "${GCOV}" -i $COVERAGE_GCOV_OPTIONS -o "$(dirname ${gcda})" "${gcda}"
cat: '*.gcov': No such file or directory
rm: cannot remove '*.gcov': No such file or directory

### Which category does this issue belong to?

_No response_

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

bazel coverage --combined_report=lcov target

### Which operating system are you running Bazel on?

ubuntu 22.04

### What is the output of `bazel info release`?

release 6.4.0

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?

_No response_

### Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

_No response_

### Have you found anything relevant by searching the web?

https://github.com/bazelbuild/bazel/issues/18874

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `bazel coverage --combined_report=lcov target` on Ubuntu 22.04 with Bazel 6.4.0, then inspect `external/bazel_tools/tools/test/collect_cc_coverage.sh` around line 113 and the referenced issue #18874. Done means the coverage command completes without the gcov segmentation fault and produces the expected coverage output.

Written by the indexing model from the issue text.

Assessment

Tech stack
ubuntu
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.