Skip to content

[m15] containerstdout: fd-hygiene lsof golden missing — MILESTONES claim unsubstantiated #161

Description

@trilamsr

Summary

`MILESTONES.md` line 372 (M15 §File-handle hygiene) is checked ☑:

File-handle hygiene: ≤2× pod-count open fds steady-state; closed within 30s of Pod `Terminated`; verified by `lsof` golden.

The lsof golden test does not exist. `grep -r lsof components/receivers/containerstdout/` returns nothing. `TestFailure_FdHygieneAfterPodTermination` (failure_modes_test.go) is still a Phase-14-deferred SKIP.

Risk

Tailer leaks open fds on pod-deletion races (e.g. event handler executes before file close completes). Without a measured assertion, regression goes silent until kubelet inode pressure surfaces it.

Fix

Convert `TestFailure_FdHygieneAfterPodTermination` to a falsifying test:

  • Snapshot `/proc/self/fd` count before pod-discovery
  • Create N pods via fake informer, write log files, wait for tailers
  • Delete pods, wait ≤30s
  • Assert fd count returns to baseline + small slack
  • Use `unix.Readdirnames("/proc/self/fd")` or shell out to `lsof -p $$`

Linux-only; gate with build tag if macOS dev requires.

Affected files

  • `components/receivers/containerstdout/failure_modes_test.go` (currently SKIP)
  • New `fd_hygiene_linux_test.go` (build tag)

Why load-bearing

MILESTONES.md ☑ misrepresents fd-leak posture. Either implement or flip to ☐.

Origin

PR #158 self-review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions