tarpaulin: Inconsistent segfault error (non-deterministic)
On a project I’m working on, I have this inconsistent error
[ERROR tarpaulin] Failed to get test coverage! Error: Failed to run tests: A segfault occurred while executing tests
Error: "Failed to get test coverage! Error: Failed to run tests: A segfault occurred while executing tests"
##[error]The process '/usr/share/rust/.cargo/bin/cargo' failed with exit code 1
I say inconsistent because it never happens at the same time of the process. I’ve been able to reproduce locally at some point but then, launching the same cargo tarpaulin
command over and over, it eventually works. Funnier, it seems that once it works, it always works (I even was able to do a cargo clean
and make it work). So the error never happen consistently.
I’m working on Ubuntu 20.04 with the following (but this error also happened on our CI https://github.com/CanalTP/transit_model/pull/558/checks?check_run_id=716136628)
$> rustup --version
rustup 1.21.1 (7832b2ebe 2019-12-20)
$> cargo --version
cargo 1.43.0 (2cbe9048e 2020-05-03)
$> rustc --version
rustc 1.43.1 (8d69840ab 2020-05-04)
$> cargo tarpaulin --version
cargo-tarpaulin version: 0.13.2
I looked for similar issues but didn’t feel like the problem was the same. Sorry if this is a duplicate.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (11 by maintainers)
Commits related to this issue
- minor ci update around coverage - remove need for codecov token in codecov action * action doesn't need it in public repos and will cause issues w/ forks where secrets don't persist - comment out c... — committed to capsule-rs/capsule by deleted user 4 years ago
- minor ci update around coverage - remove need for codecov token in codecov action * action doesn't need it in public repos and will cause issues w/ forks where secrets don't persist - comment out c... — committed to capsule-rs/capsule by deleted user 4 years ago
- minor ci update around coverage - remove need for codecov token in codecov action * action doesn't need it in public repos and will cause issues w/ forks where secrets don't persist - comment out c... — committed to capsule-rs/capsule by deleted user 4 years ago
- minor ci update around coverage - remove need for codecov token in codecov action * action doesn't need it in public repos and will cause issues w/ forks where secrets don't persist - comment out c... — committed to capsule-rs/capsule by deleted user 4 years ago
- minor ci update around coverage (#108) - remove need for codecov token in codecov action * action doesn't need it in public repos and will cause issues w/ forks where secrets don't persist - comm... — committed to capsule-rs/capsule by zeeshanlakhani 4 years ago
- CI: Fix coverage action See https://github.com/xd009642/tarpaulin/issues/461#issuecomment-753466606 Looks like the latest version (0.17.0) is broken. It has been yanked from crates.io but the Docker... — committed to fancy-regex/fancy-regex by robinst 3 years ago
ahh capsule is good, I can recreate it reliably using it and there’s no so many traces that it’s insurmountable to display a plot 👍 I’ll start using that to investigate this issue
I’m just going to close this as it looks like we might have found the solution, but if it still doesn’t work for you feel free to reopen or raise a new issue!
Might be worth refreshing the docker cache I didn’t realise until recently the yanked 0.17 was still the latest image in docker. It’s not replaced with 0.18.0-alpha1. Also docker needs different seccomp privileges which are detailed in the README. Hopefully it’s one of those two issues 😁
@floric I tried your project a few times and it worked. How often does it fail? I’m on rust 1.50
Our code base changed significantly so it’s possible that any attempt to reproduce will not be reproducing under the same conditions. We are currently using grcov (because it’s also runnable on a Mac, for local development), but I’m actually curious to try tarpaulin again to see if there are changes in the coverage report. I will update once I do. Thanks!
On Wed, Sep 2, 2020, 8:47 AM Zeeshan Lakhani notifications@github.com wrote:
I managed to recreate it once but haven’t yet figured out what causes it. Though I admit I ended up not working on tarpaulin as much the past few weeks. I’ll have a look today or tomorrow see if I can figure it out.
I also made a tarpaulin debugging tool last year which I think I’ll integrate into the code to make diagnosing issues like this easier. Right now it exists in a different repo as a harness around some of the internals and needs some updating. Once I’ve done that I might ask you if you can use that branch to generate some debug traces and send them to me
Interesting, once I finish the stuff I’m currently working on I’ll have a look and see if I can get to the bottom of it