Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fork_test.go:55] Return error <nil> #3148

Open
ScriptSathi opened this issue Nov 20, 2024 · 0 comments · May be fixed by #3149
Open

[fork_test.go:55] Return error <nil> #3148

ScriptSathi opened this issue Nov 20, 2024 · 0 comments · May be fixed by #3149
Labels
kind/bug Something isn't working

Comments

@ScriptSathi
Copy link
Contributor

ScriptSathi commented Nov 20, 2024

What happened?

While running make test on a PR, the tests crashing at fork_test.go:55 with the following line

fork_test.go:55: command failed with exit status 1. Context error: <nil>

https://github.com/cilium/tetragon/blob/main/pkg/sensors/exec/fork_test.go#L55

This occurs because ctx.Err() is displayed before it is done.

Tetragon Version

git source

More logs

...  
  logcapture.go:25: time="2024-11-21T12:56:40+01:00" level=info msg="Listening for events..."
    cmd.go:100: stdout>: parent: (pid:86725, ppid:85754) starts
    cmd.go:100: stdout>: child 1 (pid:86726) exits
    cmd.go:100: stdout>: parent: (pid:86725, ppid:85754) starts
    cmd.go:100: stdout>: parent: (pid:86725) child (86726) exited with: 0
    cmd.go:100: stderr>: got an alarm, bailing out
    cmd.go:100: stderr>: giving up on waiting our parent to die
    cmd.go:100: stdout>: parent: (pid:86725, ppid:85754) starts
    fork_test.go:55: command failed with exit status 1. Context error: <nil>
    logcapture.go:25: time="2024-11-21T12:57:10+01:00" level=info msg="Listening for events completed." error="context canceled"
...
@ScriptSathi ScriptSathi added the kind/bug Something isn't working label Nov 20, 2024
ScriptSathi added a commit to ScriptSathi/tetragon that referenced this issue Nov 21, 2024
Fix [cilium#3148](cilium#3148)
On certain distributions, `systemd` run with the flag `--user`. This
means that the manager PID is not 1 but one of it's child process.
To fix this, we call the environment variable `MANAGERPID` set by systemd
that expose this PID

Signed-off-by: Tristan d'Audibert <[email protected]>
ScriptSathi added a commit to ScriptSathi/tetragon that referenced this issue Nov 21, 2024
…user

Fix [cilium#3148](cilium#3148)
On certain distributions, `systemd` run with the flag `--user`. This
means that the manager PID is not 1 but one of it's child process.
To fix this, we call the environment variable `MANAGERPID` set by systemd
that expose this PID

Signed-off-by: Tristan d'Audibert <[email protected]>
ScriptSathi added a commit to ScriptSathi/tetragon that referenced this issue Nov 21, 2024
…user

Fix [cilium#3148](cilium#3148)
On certain distributions, `systemd` run with the flag `--user`. This
means that the manager PID is not 1 but one of it's child process.
To fix this, we call the environment variable `MANAGERPID` set by systemd
that expose this PID

Signed-off-by: Tristan d'Audibert <[email protected]>
ScriptSathi added a commit to ScriptSathi/tetragon that referenced this issue Nov 21, 2024
…user

Fix [cilium#3148](cilium#3148)
On certain distributions, `systemd` run with the flag `--user`. This
means that the manager PID is not 1 but one of it's child process.
To fix this, we call the environment variable `MANAGERPID` set by systemd
that expose this PID

Signed-off-by: Tristan d'Audibert <[email protected]>
ScriptSathi added a commit to ScriptSathi/tetragon that referenced this issue Nov 22, 2024
…user

Fix [cilium#3148](cilium#3148)
On certain distributions, `systemd` run with the flag `--user`. This
means that the manager PID is not 1 but one of it's child process.
To fix this, we call the environment variable `MANAGERPID` set by systemd
that expose this PID.
As `make test` uses sudo rights, you need to pass your local `MANAGERPID`
env var to sudo. If the variable is not set, the flag is ignored

Signed-off-by: Tristan d'Audibert <[email protected]>
ScriptSathi added a commit to ScriptSathi/tetragon that referenced this issue Nov 22, 2024
…user

Fix [cilium#3148](cilium#3148)
On certain distributions, `systemd` run with the flag `--user`. This
means that the manager PID is not 1 but one of it's child process.
To fix this, we call the environment variable `MANAGERPID` set by systemd
that expose this PID.
As `make test` uses sudo rights, you need to pass your local `MANAGERPID`
env var to sudo. If the variable is not set, the flag is ignored

Signed-off-by: Tristan d'Audibert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant