-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ecapture in container fail to locate pthread lib #69
Comments
@cfc4n I am actually curious why ecapture requires |
@cfc4n after add log in ecapture, I know what's wrong, got to read the output carefully, from above output, the error actually is caused by
|
HOOK |
I think we could introduce another argument something like |
following diff does the work, I will send a PR.
test
|
When run ecapture in Kubernetes pod, ecapture is given --libssl, --pthread to specific lib location, but ecapture continues to auto detect gnutls lib and result in error 2022/06/05 16:46:48 pid info :3305486 2022/06/05 16:46:48 start to run EBPFProbeOPENSSL module 2022/06/05 16:46:48 start to run EBPFProbeGNUTLS module <==== 2022/06/05 16:46:48 lstat /etc/ld.so.conf: no such file or directory <=== 2022/06/05 16:46:48 invalid argument <==== see gojue#69 add single-mode to stop the auto detection of gnutls lib when we only want to trace libssl connection Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
When run ecapture in Kubernetes pod, ecapture is given --libssl, --pthread to specific lib location, but ecapture continues to auto detect gnutls lib and result in error 2022/06/05 16:46:48 pid info :3305486 2022/06/05 16:46:48 start to run EBPFProbeOPENSSL module 2022/06/05 16:46:48 start to run EBPFProbeGNUTLS module <==== 2022/06/05 16:46:48 lstat /etc/ld.so.conf: no such file or directory <=== 2022/06/05 16:46:48 invalid argument <==== see gojue#69 add single-mode to stop the auto detection of gnutls lib when we only want to trace libssl connection Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
When run ecapture in Kubernetes pod, ecapture is given --libssl, --pthread to specific lib location, but ecapture continues to search gnutls lib and result in error 2022/06/05 16:46:48 pid info :3305486 2022/06/05 16:46:48 start to run EBPFProbeOPENSSL module 2022/06/05 16:46:48 start to run EBPFProbeGNUTLS module <==== 2022/06/05 16:46:48 lstat /etc/ld.so.conf: no such file or directory <=== 2022/06/05 16:46:48 invalid argument <==== see gojue#69 add nosearch argument to require specifying lib path for each TLS modules when nosearch is true. this solves problems when auto search lib path failed for ecapture running in container that standard lib path does not exist. Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
fixed: #69 ecapture in container fail to locate pthread lib. output with "invalid argument" Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@vincentmli PR merged, please test it again. |
Describe the bug
In k8s environment, run ecapture in k8s node normally with
--pthread
argument works finebut if run ecapture in pod/container with
--pthread
in the same k8s node, ecapture fail to locate libpthread, the pod mounted node/
in pod/mnt
directory for ecapture to locate the node/lib64/libpthread.so.0
libraryTo Reproduce
Steps to reproduce the behavior:
see netshoot diff vincentmli/netshoot@72633ba to build your netshoot
or deploy the netshoot pod from docker hub
vli39/netshoot:ecap
with following yamlnetshoot-ecap yaml with privilege and mount k8s node
/
in pod/mnt
Expected behavior
expect ecapture in container environment with
--pthread
argument to find the right libpthread lib forconnect
and ignore looking for libthread throughld.so.conf
Screenshots
Linux Server/Desktop (please complete the following information):
0.1.8-20220525-c030d80-prev-84a358e
Additional context
The text was updated successfully, but these errors were encountered: