Skip to content

[CI/tigron]: investigate file descriptor leak detection as a testing feature #4029

Open

Description

@apostasie

What is the problem you're trying to solve

Probably leverage lsof -nP -p X (or implement it in go)

Describe the solution you'd like

Automatically fail a test if the test is leaking file descriptors.

Ideally, fail a test if the tested binary is leaking.

Additional context

Note: evaluate #4013 as well.

Activity

  1. changed the title [-]CI/tigron: investigate file descriptor leak detection as a testing feature[/-] [+][CI/tigron]: investigate file descriptor leak detection as a testing feature[/+] on Mar 20, 2025
  2. apostasie commented on Mar 20, 2025

    @apostasie
    ContributorAuthor

    @fahedouch can you tentatively mark this for milestone 2.x.x?

  3. added this to the v2.x.x milestone on Mar 24, 2025
  4. apostasie commented on Mar 30, 2025

    @apostasie
    ContributorAuthor

    Possibly investigate using: https://github.com/u-root/u-root/blob/main/pkg/strace

    @AkihiroSuda any idea how to best approach the problem of finding file leaks overall in tested binaries?
    I am currently thinking ptrace-ing cmd.Exec (some golang equivalent of strace -e trace=open,openat,close -f -p XXX)?

    Wondering if gomodjail could be made a bit more generic to allow for usecases like this?
    Or if we could have a standalone library for that used by gomodjail?
    eg: having something like stracelib.Trace(*exec.Cmd, callback func(ProcessSomething, SyscallSomething)...)

    This is not trivial stuff.

  5. apostasie commented on May 3, 2025

    @apostasie
    ContributorAuthor

    @AkihiroSuda not happening before 05/06 => v2.2

  6. modified the milestones: v2.1.0, v2.2.0 (?) on May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions