Repository navigation
fix(tracers): pick the iouring_new gadget on kernel 7.x - #1040
Conversation
The check compared the major and the minor version separately (major >= 6 && minor >= 4), so kernels 7.0 to 7.3 got iouring_old. Its io_uring_submit_sqe tracepoint does not exist there, the gadget fails to attach, and io_uring events are lost on those nodes. Compare the version as a whole. Docs-exempt: bug fix; no doc describes the io_uring gadget choice Signed-off-by: Alon Liwsky <40373481+AlonLiwsky@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
matthyx
left a comment
There was a problem hiding this comment.
Approve — no material blockers found in the two-file change. Independent code review recommends APPROVE; architecture review is CLEAR.
Reviewed head 3b687d06615bc2d6a863356d77a381daef9b9a02 against main at 02f0bf7b21fd98da0d6f6935d3c49503d6978738.
The fix is needed: the target branch's predicate selects the old gadget for 7.0–7.3 and 8.0. iouring.go:58,70 now compares versions lexicographically, preserving the 6.4 boundary and selecting the gadget that attaches to io_uring_submit_req. The old gadget attaches to io_uring_submit_sqe. This repairs selection directly; configuration can disable the tracer but cannot repair selection. Registration, event schema, callbacks, and resource lifecycle remain unchanged; no dependencies or public API changes.
History: repository-wide GitHub PR searches across open/closed/merged states used io_uring, iouring, iouring.go, SupportedMajor, kernel 7, and io_uring_submit_sqe; issue searches used io_uring, iouring, and gadget/kernel terms (100 results/query; none reached that cap). No duplicate/superseding selector fix surfaced; search indexing and unmentioned changes remain limits. #741 fixed CO-RE reads; #751 fixed datasource fields. Neither fixes selection. #750 was explicitly closed for suppressing symptoms instead of fixing their cause; that objection does not apply here. #513 proposed removing the rule, but its discussion provides no explicit rejection rationale. Current PR has no human reviews or inline concerns; CodeRabbit reports no actionable findings.
Validation: gofmt -d on both complete changed files produced no output. In a credential-free, network-isolated Bubblewrap environment, go test -v on the exact extracted helper with the eight boundary cases passed; substituting the target-branch predicate failed for 7.0, 7.3, and 8.0. This is a focused regression harness, not a run of the full tracer package. Full package tests, local build/lint, and live eBPF validation were not run.
CI logs show selection of iouring_new on 7.0.0-1017-azure and attachment attempts to io_uring_submit_req. Cross-platform build, benchmark, and CodeQL passed. Multiple component jobs failed, including missing container profiles and an exec-alert count of 0 versus 10. Those failures do not establish a defect in this selector change; their full root causes and baseline reproducibility remain unverified. CI is not wholly green.
Head, target, open/non-draft status, mergeability, and review context were rechecked immediately before submission. Verdict: APPROVE.
|
The red component tests are not from this change. These runners now boot |
Summary
IoUringTracer.Startchose the gadget withmajor >= SupportedMajor && minor >= SupportedMinor(6 and 4). That compares the minor version alone, so kernels 7.0 to 7.3 getiouring_old. Itsio_uring_submit_sqetracepoint does not exist there, so the gadget fails to attach and io_uring events are lost on those nodes. I hit it on GitHub'subuntu-24.04-armrunner, which now boots7.0.0-1017-azure: "open /sys/kernel/tracing/events/io_uring/io_uring_submit_sqe/id: no such file or directory".The check now compares the version as a whole:
major > 6 || (major == 6 && minor >= 4).How to Test
go test -run TestHasIouringSubmitReq ./pkg/containerwatcher/v2/tracers/covers 5.15, 6.3, 6.4, 6.17, 7.0, 7.3, 7.4 and 8.0.AI-skills: armosec-shared-rules:agent-dispatch-policy
Summary by CodeRabbit
Bug Fixes
Tests