Skip to content

fix(iotracing): skip reset diskstat samples#246

Open
pkurunner wants to merge 1 commit into
ccfos:mainfrom
pkurunner:codex/fix-iotracing-diskstat-delta-20260618
Open

fix(iotracing): skip reset diskstat samples#246
pkurunner wants to merge 1 commit into
ccfos:mainfrom
pkurunner:codex/fix-iotracing-diskstat-delta-20260618

Conversation

@pkurunner

@pkurunner pkurunner commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Diskstats counters can go backwards after a device reset/recreate. My first patch clamped each field separately, but that can still mix two counter epochs in one sample.

This version treats any backwards field as a reset and drops that interval by returning zero metrics. The next sample is then compared against the new counter epoch, so we avoid both uint64 underflow and misleading partial deltas.

Testing: gofmt -w core/autotracing/iotracing.go

Not run locally: GOOS=linux GOARCH=amd64 go test -c ./core/autotracing is blocked by missing generated capnp files in my local snapshot.

Signed-off-by: yeyangyi <2501210756@stu.pku.edu.cn>
@pkurunner pkurunner changed the title fix(iotracing): clamp diskstat deltas fix(iotracing): skip reset diskstat samples Jun 18, 2026
@pkurunner pkurunner force-pushed the codex/fix-iotracing-diskstat-delta-20260618 branch from 45ccf41 to 85ed10f Compare June 18, 2026 07:28
@pkurunner

Copy link
Copy Markdown
Contributor Author

Checked the failing VM jobs after updating this. ubuntu20 stops in test_dropwatch_ratelimit.sh; ubuntu24 builds iotracing and passes test_iotracing.sh, then fails the final log check on cpusys: signal: killed during shutdown.

I do not have permission to rerun failed jobs from the fork, but the current failures do not point to this diskstats change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant