Skip to content

test(cpworker): use an 8 MB capture buffer in the timeout_ms > 0 integration tests - #318

Merged
timmy21 merged 1 commit into
0.9.xfrom
fix/idle-capture-startup-flake
Oct 14, 2026
Merged

timmy21 merged 1 commit into
0.9.xfrom
fix/idle-capture-startup-flake

Conversation

@timmy21

@timmy21 timmy21 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Problem

CLOUD-PROBE-BUILD #175 and #176 failed in the cpworker integration tests with worker did not start polling:

In each case cpworker logged libpcap version: 1.6.2 and then did not reach start poll packets within the tests' 5 s wait. #174 passed on the same cloud-probe commit (a02be2a). Only timeout_10ms subtests failed, a different one each time.

Cause

With timeout_ms > 0 and the default 256 MB buffer_size_mb, cpworker startup is slow when the host is short of free memory. Startup time to start poll packets, libpcap 1.6.2, Ubuntu 24.04 VM:

config free memory memory filled to swap
timeout 10 ms, 256 MB 72-80 ms up to ~1000 ms
timeout 10 ms, 8 MB 73-81 ms 43-112 ms
timeout 0 ms, 256 MB 73-179 ms 72-170 ms

The VM did not reach 5 s; the CI build pod's host is presumably under more memory pressure.

Change

Test-only. The tests send at most a few thousand packets, so they set buffer_size_mb: 8:

  • idle_capture_test.go: writeIdleCaptureConfig (TestIdleCapture, TestIdleZMQFlush).
  • testdata/reload/{rtc,pipeline}_dest_{a,b}.json: also timeout_ms: 10 with the default buffer (TestReload/switch_output_destination).

Tests

  • Run in Ubuntu 24.04: run_test.sh all ok.

…gration tests

CLOUD-PROBE-BUILD #175 and #176 failed in TestIdleZMQFlush and
TestIdleCapture with "worker did not start polling": cpworker logged the
libpcap version and then did not reach "start poll packets" within the
tests' 5 s wait. Each build failed different timeout_10ms subtests, and
#174 passed on the same commit.

With timeout_ms > 0 and the default 256 MB buffer, cpworker startup is slow
when the host is short of free memory. In a VM with memory filled to swap,
startup took up to ~1 s with timeout_ms 10 and 256 MB, and stayed under
~170 ms with an 8 MB buffer or timeout_ms 0. The tests send at most a few
thousand packets, so the idle capture tests and the reload dest_a/dest_b
configs (also timeout_ms 10) now set buffer_size_mb 8.
@timmy21
timmy21 merged commit e684ed8 into 0.9.x Oct 14, 2026
1 check passed
@timmy21
timmy21 deleted the fix/idle-capture-startup-flake branch October 14, 2026 09:05
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