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

Tracing doesn't work with latest version: fatal error: 'linux/types.h' file not found #150

Open
nodo opened this issue Feb 2, 2021 · 0 comments

Comments

@nodo
Copy link

nodo commented Feb 2, 2021

The problem occur only when using kubectl trace from the master branch and not when installing kubectl-trace with krew.

Steps to reproduce the problem:

  1. Install kubectl-trace from source:
    • Run go get -u github.com/iovisor/kubectl-trace/cmd/kubectl-trace
    • Make sure that which kubectl-trace points to $GOPATH/bin/kubectl-trace
  2. Run the following command:
kubectl trace -n $NS --serviceaccount=$SA run $NODE  -e 'tracepoint:syscalls:sys_enter_exec* { printf("%-10u %-5d ", elapsed / 1000000, pid); join(args->argv); }' -a

Where $NS is set to the namespace, $SA the service account, $NODE the hostname of the node.

At the moment I am seeing the following output:

trace 03463dbb-4b7c-4f9e-ab09-95060d9377b6 created
/bpftrace/include/clang_workarounds.h:14:10: fatal error: 'linux/types.h' file not found
exit status 1

When running the same bptrace program from the node itself, it works as expected.

Additional info can be found at this Slack thread.

cc @fntlnz

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

No branches or pull requests

1 participant