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

Concurrency bugs in codecov (coverage.py) workflow #36539

Open
mkoeppe opened this issue Oct 25, 2023 · 2 comments
Open

Concurrency bugs in codecov (coverage.py) workflow #36539

mkoeppe opened this issue Oct 25, 2023 · 2 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Oct 25, 2023

Combined data file .coverage/.coverage.Helios.local.70384.568987
Skipping duplicate data .coverage/.coverage.Helios.local.71097.566208
Skipping duplicate data .coverage/.coverage.Helios.local.71074.300096

We also see these messages in large quantities the Build & Test CI runs, in the section "Prepare coverage results". For example https://github.com/sagemath/sage/actions/runs/6623852735/job/17991733088#step:19:20

/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/coverage/data.py:171: CoverageWarning: Data file '/Users/kwankyu/GitHub/sage-dev/src/.coverage/.coverage.Helios.local.39475.460681' doesn't seem to be a coverage data file: 
  data._warn(str(exc))
Couldn't combine data file .coverage/.coverage.Helios.local.39475.460681: Data file '/Users/kwankyu/GitHub/sage-dev/src/.coverage/.coverage.Helios.local.39475.460681' doesn't seem to be a coverage data file: 

This one also shows up in the CI, for example https://github.com/sagemath/sage/actions/runs/6606391152/job/17942563622#step:19:1162, but with much less frequency.

This looks to me like a concurrency bug. It may, in fact, help explain the nondeterministic coverage results that we observed even after fixing the random seed. See #35522.

Originally posted by @mkoeppe in #36505 (comment)

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 25, 2023

@tobiasdiez You already reacted in #36505 (comment), but perhaps you could try to explain what you intended with the settings in https://github.com/sagemath/sage/blob/develop/src/tox.ini#L262 regarding multiprocessing.

@tobiasdiez
Copy link
Contributor

This adds support for multiprocessing. Otherwise codecov doesn't collect any coverage in sub-threads.

vbraun pushed a commit to vbraun/sage that referenced this issue Aug 2, 2024
…ltiprocessing,threads`

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->
- Partially addresses sagemath#36539

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37010
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this issue Aug 3, 2024
…ltiprocessing,threads`

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->
- Partially addresses sagemath#36539

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37010
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants