-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
memleak:support third party alloctions by definitive symbols prefix #4812
Conversation
There is a merge conflict. Could you rebase and resubmit? |
pid=pid) | ||
bpf.attach_uprobe(name=obj, sym="munmap", fn_name="munmap_enter", | ||
attach_probes("free", need_uretprobe=False) | ||
attach_probes("munmap", can_fail=True, need_uretprobe=False) # failed on jemalloc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the above change break other libraries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't break other libraries. For the C library, the actual implementation of free
is exactly the same as the original
bpf.attach_uprobe(name=obj, sym=“free”,fn_name="free_enter",pid=pid)
For the jemalloc/tcmalloc library, the implementation of free
is
bpf.attach_uprobe(name=obj, sym=“je_free”,fn_name="free_enter",pid=pid)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I checked the change again. Yes, there is indeed no functionality change.
@yonghong-song thanks, last week I dealt with the conflict by manually merging the master branch, now I do not see any conflict, do I need to rebase? |
I rebase and force push this branch, not sure if this behavior is appropriate @yonghong-song |
CI still failed, but the error looks like irrelative with this pr:
|
Right, CI failure is not related to your patch. |
The third-party allocations, such as jellmalloc that is usually statically linked into redis using the "je_" prefix, so we can specify the prefix string of these symbols to detect memory leaks in softwares using third-party allocs.