Jiping Yin
Jiping Yin
@qyzhaoxun 您好,我看日志没发现什么异常。 可执行下面命令(来看看数据统计)进行确认: - 进入POD ``` kubectl exec deepflow-agent-sgm5p -n deepflow -it -- bash ``` - 查询统计 ``` root@deepflow-agent-sgm5p:/# deepflow-ebpfctl tracer show Tracer socket-trace Bpf buffer socket-trace-bpf-linux-common Workers 1 Perf-Pages-Count...
@qyzhaoxun 您好,确认下下面这些类型符号是否存在: ``` go:itab.*net.TCPConn,net.Conn go:itab.*crypto/tls.Conn,net.Conn go:itab.*golang.org/x/net/http2/h2c.rwConn,net.Conn go:itab.*golang.org/x/net/http2/h2c.bufConn,net.Conn go:itab.*github.com/armon/go-proxyproto.Conn,net.Conn go:itab.*google.golang.org/grpc/internal/credentials.syscallConn,net.Conn ``` eBPF会利用上面这些类型符号地址,进行`conn`的判断来获取必要的数据。(怀疑上面符号的名字在`kube-proxy-bin`中存在差异) ```bash nm /proc/518263/root/usr/local/bin/kube-proxy-bin | grep "Conn,net.Conn" ```
@qyzhaoxun 是的,没有符号表,就没有办法了这是个前提条件, 如果 `Golang version >= 1.13 and < 1.18`,可尝试配置: `golang-symbol:` 试试,但是遗憾的是kube-proxy-bin的版本显示是`1.20`
> 不过上面日志不是显示的INFO Uprobe了一些函数吗?这个是实际上没有uprobe成功啊 这个是不是有配置配置项`golang-symbol:` ?,它尝试一把解析,但是最终还是没有把`go:itab.*net.TCPConn,net.Conn`解析出来。
@Spartan-65 你好 perf_event : 周期性采样的事件触发时会执行这个programe (perf_event), 主要用于获取函数栈信息然后推送给用户层处理。 相关load, attach, buffer reader可看下面关联代码。 - load https://github.com/deepflowio/deepflow/blob/main/agent/src/ebpf/user/load.c#L443 - attach: https://github.com/deepflowio/deepflow/blob/main/agent/src/ebpf/user/tracer.c#L961 https://github.com/deepflowio/deepflow/blob/520fc9d4cf75d14a7d245d7da441544182e69ace/agent/src/ebpf/user/probe.c#L289 - perf reader构建: https://github.com/deepflowio/deepflow/blob/4dbb235b02a8fb4c3b963ae5998fc0f7d0faaf92/agent/src/ebpf/user/tracer.c#L439 https://github.com/deepflowio/deepflow/blob/4dbb235b02a8fb4c3b963ae5998fc0f7d0faaf92/agent/src/ebpf/user/tracer.c#L1137
@Spartan-65 您好,这个问题大概是这个内存泄露造成的,可查看这个修复 https://github.com/deepflowio/deepflow/pull/6218
> > 我执行`bpftool prog`命令看到了这些bpf程序,想要请教 """61: perf_event name bpf_perf_event tag 42b497adb6d498f9 gpl"""这个程序是怎么挂载的呢?作用是什么?因为最近碰到一个perf event ringbuf 内存访问错误的问题 > > ```shell > > # bpftool prog > > 4: kprobe name runtime_execute tag 90d70e4151b22e21...
> @yinjiping falco 使用的也是 BPF_MAP_TYPE_PERF_EVENT_ARRAY,使用方式基本上是一样的,但是falco不会有这个bpf prog,perf event机制应该是内核实现的,不用加载perf_event的bpf prog。意思是perf event 的bpf 程序是bcc加载的? perf_event_fd: https://github.com/falcosecurity/libs/blob/master/userspace/libscap/engine/bpf/scap_bpf.c#L1607 mmap映射: https://github.com/falcosecurity/libs/blob/master/userspace/libscap/engine/bpf/scap_bpf.c#L1629 环形队列 error的位置: https://github.com/falcosecurity/libs/blob/master/userspace/libscap/ringbuffer/ringbuffer.h#L272 > > 在error的位置部分打印信息 > > ```shell > pe->len: 2896438784, pe->type: 35682, pe->nparams:12528,...
#### 会在POD日志中得到:(所有数据都有`[FILE]`作标识) - 每秒钟的读写文件速率 ``` 2023-11-09 01:32:26.793 [FILE] read 185 Kbytes/sec write 0 Kbytes/sec ``` - 读写文件信息 ``` [FILE] func fetch_container_id path /proc/10472/cgroup [FILE] func get_process_starttime_and_comm pid 10472 name du...
此PR不需要合并,作为排查IO问题的工具。