ecapture: EBPFProbeGoSSL module init failed, skip it. error:decoding dwarf section info at offset 0x0: too short
Describe the bug
I am trying to run --gobin
to capture golang app TLS traffic, but I got error
kubectl exec -it netshoot-ecap – ecapture tls --gobin=“/mnt/run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/0dd60e91bc00f5f433f03b139598ff57e910cfef401cff7ce38682f7189c9687/rootfs/f5-api-engine”
ecapture_2022/07/03 19:51:26 pid info :430654
ecapture_2022/07/03 19:51:26 start to init EBPFProbeOPENSSL module
2022/07/03 19:51:26 lstat /etc/ld.so.conf: no such file or directory
2022/07/03 19:51:26 read file :/etc/ld.so.conf error .
2022/07/03 19:51:26 lstat /etc/ld.so.conf: no such file or directory
2022/07/03 19:51:26 read file :/etc/ld.so.conf error .
2022/07/03 19:51:26 lstat /etc/ld.so.conf: no such file or directory
2022/07/03 19:51:26 read file :/etc/ld.so.conf error .
2022/07/03 19:51:26 lstat /etc/ld.so.conf: no such file or directory
2022/07/03 19:51:26 read file :/etc/ld.so.conf error .
ecapture_2022/07/03 19:51:26 EBPFProbeOPENSSL module init failed. skip it. error:cant found 'connect' function to hook in files::[libpthread.so.0 libc.so.6 libc.so]
ecapture_2022/07/03 19:51:26 start to init EBPFProbeGNUTLS module
2022/07/03 19:51:26 lstat /etc/ld.so.conf: no such file or directory
2022/07/03 19:51:26 read file :/etc/ld.so.conf error .
ecapture_2022/07/03 19:51:26 start to init EBPFProbeNSPR module
ecapture_2022/07/03 19:51:26 EBPFProbeNSPR module init failed. skip it. error:stat /usr/lib/libnspr4.so: no such file or directory
ecapture_2022/07/03 19:51:26 start to init EBPFProbeGoSSL module
ecapture_2022/07/03 19:51:26 EBPFProbeGoSSL module init failed, skip it. error:decoding dwarf section info at offset 0x0: too short
ecapture_2022/07/03 19:51:26 Module.Run() EBPFProbeGNUTLS
ecapture_2022/07/03 19:51:26 HOOK type:2, binrayPath:/usr/lib/libgnutls.so.30
ecapture_2022/07/03 19:51:26 target all process.
ecapture_2022/07/03 19:51:26 Module.Run() EBPFProbeGNUTLS start success
ecapture_2022/07/03 19:51:26 Module:EBPFProbeGNUTLS run success.
ecapture_2022/07/03 19:51:26 EventProcessor.Serve(): start
I assume --gobin
is to specify the golang app with golang crypto library imported, correct? I also googled the error, found someone reported similar error https://stackoverflow.com/questions/52230503/decoding-dwarf-section-info-at-offset-0x0-too-short
"
GoLand ships with a bundled version of Delve. Update to 2018.2.2 and it should work. If you need to do remote debugging, then you need to update your Delve installation on/for the target machine as well (make sure you compile it with Go 1.11).
Edit: There are two more possible cases where this issue can appear:
the application was compiled with all the debugging flags turned off and the additional debugging information stripped the application uses the standard library “plugin” package, which is known to cause an issue in the Go compiler. This will be fixed in Go 1.12. "
@chenhengqi do you have idea?
To Reproduce
Expected behavior
Screenshots
Linux Server/Android (please complete the following information):
- OS: ubuntu 20.04
- Arch: x86
- Kernel Version: [e.g. 5.10]
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
Your C example is linked against OpenSSL shared library, try strip the shared library instead.
The version does NOT need to be that precise. Currently, there are only two ABIs. One can guess it by setting
--gover=1.17
or--gover=1.14
.