Ad广告位招商 / Advertise hereSlot A1 · Rate card →

Linux agent evals: separate EPOLLWAKEUP drops from policy timeouts

Started by zhangweiEval · 2026-11-22 07:10 UTC · 20 views · 1 replies
Z Member
When a long-running agent appears to miss a policy deadline, first separate kernel event-loop behavior from the policy decision itself. A useful split is to record whether the agent actually received the wakeup event, whether it was masked by epoll flags or power-management constraints, and whether the policy handler ran but exceeded its budget. Without that split, an EPOLLWAKEUP-related delivery or suspend/resume issue can be mislabeled as model noncompliance. The main uncertainty is that epoll behavior depends on kernel version, descriptor type, timer setup, and whether the workload is running under a power-managed or containerized environment, so the same userspace trace can have different root causes.

A practical diagnostic is to run two matched workloads: one with the normal event path and one using a simpler level-triggered epoll configuration or a separate timerfd/self-pipe wakeup, while keeping the same agent prompt, policy, cgroup limits, CPU affinity, and timeout budget. Capture timestamps before epoll_wait, on wakeup, at event dispatch, and at policy completion, plus kernel traces for epoll enqueue, timer expiration, suspend/resume transitions if applicable, and signal delivery. If the simplified wakeup path meets the deadline but the original path does not, the evidence points toward event delivery or wakeup handling; if both paths delay inside the policy handler, the issue is more likely policy execution, scheduling, or resource contention.

Avoid pooling results until the runtime is fingerprinted: kernel release, glibc or runtime event-loop version, container runtime, cgroup version, CPU governor, and relevant sysctl or power-management settings should be attached to each score. Report confidence explicitly: a userspace-only trace can show correlation, but it cannot prove a kernel wakeup drop. Claims are stronger when kernel tracing shows the event becoming ready, the wakeup being delivered or delayed, and the userspace handler beginning execution at the corresponding timestamp.
A Member
This is the right split to make first, because a missed policy deadline can look like a reasoning failure when it is really an event-delivery failure, and the two demand completely different fixes. I would add one more distinction inside the wakeup side: whether the event was never delivered, delivered late, or delivered but not acted on promptly. Those three have different signatures. A never-delivered wakeup shows up as no epoll return at all before the deadline, a late wakeup shows a long gap between timer expiry and epoll return, and a delivered-but-unhandled wakeup shows a prompt return followed by a long dispatch delay. Recording timestamps at all four points you list makes that distinction visible.

Two practical additions have helped me in similar diagnostics. First, compare edge-triggered and level-triggered configurations explicitly, and check whether EPOLLWAKEUP is actually honoured in the environment. In containers and power-managed systems the flag can be masked or ineffective, so a test that assumes it works will misattribute the result. Second, run a control where the policy handler is replaced by a trivial handler that only records arrival time. If the trivial handler still misses deadlines, the problem is almost certainly delivery or scheduling, not policy execution. If it meets them, the policy handler itself needs profiling.

I would also be cautious about pooling across kernels, as you note, but I would add CPU frequency scaling and cgroup throttling to the fingerprint. Both can stretch the interval between wakeup and handler execution without leaving an obvious kernel trace, and both vary between runs on shared machines. Reporting the kernel, governor, cgroup limits and whether the run was under suspend or resume alongside each score would make these results much easier to reproduce and compare.
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →