[Bug runtime/27881] New: failed to extend vma mapped entry when the address is adjacent
zhuizhuhaomeng at gmail dot com
sourceware-bugzilla@sourceware.org
Tue May 18 03:12:57 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=27881
Bug ID: 27881
Summary: failed to extend vma mapped entry when the address is
adjacent
Product: systemtap
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: runtime
Assignee: systemtap at sourceware dot org
Reporter: zhuizhuhaomeng at gmail dot com
Target Milestone: ---
[root@centos7-cube agentzh]# cat /proc/7877/maps | grep nginx
5579ad030000-5579ad067000 r--p 00000000 fd:00 54825380
/usr/local/openresty-plus/nginx/sbin/nginx
5579ad067000-5579ad180000 r-xp 00037000 fd:00 54825380
/usr/local/openresty-plus/nginx/sbin/nginx
5579ad180000-5579ad1ce000 r--p 00150000 fd:00 54825380
/usr/local/openresty-plus/nginx/sbin/nginx
5579ad1cf000-5579ad1d1000 r--p 0019e000 fd:00 54825380
/usr/local/openresty-plus/nginx/sbin/nginx
5579ad1d1000-5579ad1ef000 rw-p 001a0000 fd:00 54825380
/usr/local/openresty-plus/nginx/sbin/nginx
the first two segments are adjacent but stap did not extend the second to the
first. Instead, stap add two entries. entry_2, entry_1 in the list with
hlist_add_head_rcu.
the third,fourth ,fifth segments were not added because they can not match the
if condition below.
if (res == -ESRCH || vm_start + offset == addr)
res = stap_add_vma_map_info(tsk->group_leader,
addr, addr + length,
offset, path, module);
else if (res == 0 && vm_end + 1 == addr)
res = stap_extend_vma_map_info(tsk->group_leader,
vm_start,
addr + length);
when access a global variable,_stp_umodule_relocate will use the entry_2's
vm_start as base address. actually, should use the first entry's vm_start as
the base address.
if (stap_find_vma_map_info_user(tsk->group_leader, m,
&vm_start, NULL, NULL) == 0) {
offset += vm_start;
dbug_sym(1, "address=%lx\n", offset);
return offset;
}
when get the relative address in _stp_kallsyms_lookup, we should also use the
first entry's vm_start as the base address.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list