Skip to content

Fix overflow in network metrics counters#28856

Closed
keith wants to merge 1 commit intobazelbuild:masterfrom
keith:ks/fix-overflow-in-network-metrics-counters
Closed

Fix overflow in network metrics counters#28856
keith wants to merge 1 commit intobazelbuild:masterfrom
keith:ks/fix-overflow-in-network-metrics-counters

Conversation

@keith
Copy link
Member

@keith keith commented Mar 2, 2026

This was broken in d34d638. On macOS
subsequent network updates can reset the counters, which resulted in
overflow. Now if the new value is lower we just replace it with that.
This should be harmless for the Linux use case where this should never
be the case.

Fixes #28813

This was broken in d34d638. On macOS
subsequent network updates can reset the counters, which resulted in
overflow. Now if the new value is lower we just replace it with that.
This should be harmless for the Linux use case where this should never
be the case.

Fixes bazelbuild#28813
@github-actions github-actions bot added team-Performance Issues for Performance teams awaiting-review PR is awaiting review from an assigned reviewer labels Mar 2, 2026
@keith
Copy link
Member Author

keith commented Mar 2, 2026

cc @coeuvre

@keith
Copy link
Member Author

keith commented Mar 2, 2026

For example here's what the values can look like with a reset on macOS:

en0/bytesSent: prev=4293822464 next=4407296 result=18446744069420136448

@tjgq tjgq added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Mar 3, 2026
@copybara-service copybara-service bot closed this in 6ce9065 Mar 3, 2026
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Mar 3, 2026
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Mar 3, 2026
This was broken in d34d638. On macOS
subsequent network updates can reset the counters, which resulted in
overflow. Now if the new value is lower we just replace it with that.
This should be harmless for the Linux use case where this should never
be the case.

Fixes bazelbuild#28813

Closes bazelbuild#28856.

PiperOrigin-RevId: 877956215
Change-Id: Ic7667494c19fe854edcc7bc8df4b845214484086
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Mar 3, 2026
This was broken in d34d638. On macOS
subsequent network updates can reset the counters, which resulted in
overflow. Now if the new value is lower we just replace it with that.
This should be harmless for the Linux use case where this should never
be the case.

Fixes bazelbuild#28813

Closes bazelbuild#28856.

PiperOrigin-RevId: 877956215
Change-Id: Ic7667494c19fe854edcc7bc8df4b845214484086
github-merge-queue bot pushed a commit that referenced this pull request Mar 3, 2026
This was broken in d34d638. On macOS
subsequent network updates can reset the counters, which resulted in
overflow. Now if the new value is lower we just replace it with that.
This should be harmless for the Linux use case where this should never
be the case.

Fixes #28813

Closes #28856.

PiperOrigin-RevId: 877956215
Change-Id: Ic7667494c19fe854edcc7bc8df4b845214484086

Commit
6ce9065

Co-authored-by: Keith Smiley <keithbsmiley@gmail.com>
github-merge-queue bot pushed a commit that referenced this pull request Mar 3, 2026
This was broken in d34d638. On macOS
subsequent network updates can reset the counters, which resulted in
overflow. Now if the new value is lower we just replace it with that.
This should be harmless for the Linux use case where this should never
be the case.

Fixes #28813

Closes #28856.

PiperOrigin-RevId: 877956215
Change-Id: Ic7667494c19fe854edcc7bc8df4b845214484086

Commit
6ce9065

Co-authored-by: Keith Smiley <keithbsmiley@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Performance Issues for Performance teams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BES huge values for bytesSent / bytesRecv

2 participants