coroot / coroot-node-agent

A Prometheus exporter based on eBPF that gathers comprehensive container metrics
https://coroot.com/docs/metrics/node-agent
Apache License 2.0
314 stars 56 forks source link

failed to attach uprobe on libssl version v1.0.1 #112

Closed wenhuwang closed 1 month ago

wenhuwang commented 1 month ago

env

logs

coroot-node-agent logs as follows:

I0716 08:16:04.352984   48665 tls.go:107] pid=11925 libssl_version=v1.1.1: libssl uprobes attached
E0716 14:03:02.729460   48665 tls.go:92] pid=45766 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:02.729460   48665 tls.go:92] pid=45766 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:02.729460   48665 tls.go:92] pid=45766 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:02.729460   48665 tls.go:92] pid=45766 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:15.061455   48665 tls.go:92] pid=46161 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:15.061455   48665 tls.go:92] pid=46161 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:15.061455   48665 tls.go:92] pid=46161 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:15.061455   48665 tls.go:92] pid=46161 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:27.612450   48665 tls.go:92] pid=46472 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:27.612450   48665 tls.go:92] pid=46472 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:27.612450   48665 tls.go:92] pid=46472 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 14:03:27.612450   48665 tls.go:92] pid=46472 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 17:35:50.173498   48665 tls.go:92] pid=31650 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 17:35:50.173498   48665 tls.go:92] pid=31650 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 17:35:50.173498   48665 tls.go:92] pid=31650 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 17:35:50.173498   48665 tls.go:92] pid=31650 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 18:30:02.969410   48665 tls.go:92] pid=18085 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 18:30:02.969410   48665 tls.go:92] pid=18085 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 18:30:02.969410   48665 tls.go:92] pid=18085 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 18:30:02.969410   48665 tls.go:92] pid=18085 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 18:30:13.897468   48665 tls.go:92] pid=18303 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 18:30:13.897468   48665 tls.go:92] pid=18303 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 18:30:13.897468   48665 tls.go:92] pid=18303 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found
E0716 18:30:13.897468   48665 tls.go:92] pid=18303 libssl_version=v1.0.1: failed to attach uprobe: symbol SSL_write_ex: not found

libssl file path is /usr/lib64/libssl.so.1.0.2k with version v1.0.1, this file only have SSL_read and SSL_write symbol.

wenhuwang commented 1 month ago

SSL_read_ex() and SSL_write_ex() function only exists in openssl v1.1.1 and higher version. refer to: https://github.com/openssl/openssl/commit/4ee7d3f94590d3766c28eed03b969f338ddf96dc and https://github.com/openssl/openssl/commit/7ee8627f6eb7cf63b34d2701d76bb66f6db811e5#diff-38e1eecb6013c2fe8bf194e5020ce1afd6e31c371d7849e041464ad822fe745bR1653