Skip to content

Conversation

@henrybear327
Copy link
Contributor

@henrybear327 henrybear327 commented Jan 15, 2026

Root cause: RunWatchLoop() spawned detached goroutines that were not tracked by the main sync.WaitGroup.

When the parent SimulateTraffic is about to exit and calls wg.Done(), it will unblocked immediately, allowing Reports() to read from the history while detached goroutines were still writing to it since not all of them have been terminated.

Fixes #21132

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: henrybear327
Once this PR has been reviewed and has the lgtm label, please assign ivanvc for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@henrybear327
Copy link
Contributor Author

/retest

Root cause: `RunWatchLoop()` spawned detached goroutines that were not
tracked by the main `sync.WaitGroup`.

When the parent `SimulateTraffic` is about to exit and calls
`wg.Done()`, it will unblocked immediately, allowing Reports() to read
from the history while detached goroutines were still writing to it
since not all of them have been terminated.

Signed-off-by: Chun-Hung Tseng <[email protected]>
@k8s-ci-robot
Copy link

@henrybear327: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-etcd-coverage-report 5108b71 link true /test pull-etcd-coverage-report

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.46%. Comparing base (142c534) to head (5108b71).

Additional details and impacted files

see 15 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #21139      +/-   ##
==========================================
- Coverage   68.46%   68.46%   -0.01%     
==========================================
  Files         429      429              
  Lines       35242    35242              
==========================================
- Hits        24130    24127       -3     
- Misses       9723     9728       +5     
+ Partials     1389     1387       -2     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 142c534...5108b71. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Data race in robustnes tests WatchLoop

3 participants