brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
E20240515 10:57:13.508802 39562 common.cpp:318] Fail to open `echo_server': No such file or directory [2]
使用 Heap Profiler 会解析不了.
[20240515.110220.heap]
Using remote profile at echo_server.
Using local file ./rpc_data/profiling/000000000000000000000000ce010000/20240515.110220.heap.
The first profile should be a remote form to use /pprof/symbol
What is changed and the side effects?
Changed:
Linux 系统使用 readlink(/proc/self/exe) 获取程序绝对路径
MacOSX 系统使用 proc_pidpath 获取当前进程的绝对路径
Side effects:
Performance effects(性能影响):
Breaking backward compatibility(向后兼容性):
Check List:
Please make sure your changes are compilable(请确保你的更改可以通过编译).
When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
What problem does this PR solve?
Issue Number:
Problem Summary:
从 cmdline 中获取程序名称时不包含程序的完整路径。因为程序的启动路径可能已经包含在了 $PATH 中,所以 cmdline 中只有程序的名称而没有路径信息,导致在使用
ProgramCHECKSUM
以及使用heap profile
解析符号时找不到程序的具体位置而导致失败。复现:
启动server
获取程序的校验码会报错:
使用 Heap Profiler 会解析不了.
What is changed and the side effects?
Changed:
Side effects:
Performance effects(性能影响):
Breaking backward compatibility(向后兼容性):
Check List: