From: "zhuizhuhaomeng at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/27881] New: failed to extend vma mapped entry when the address is adjacent
Date: Tue, 18 May 2021 03:12:57 +0000 [thread overview]
Message-ID: <bug-27881-6586@http.sourceware.org/bugzilla/> (raw)
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.
next reply other threads:[~2021-05-18 3:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 3:12 zhuizhuhaomeng at gmail dot com [this message]
2021-05-19 1:58 ` [Bug runtime/27881] " zhuizhuhaomeng at gmail dot com
2021-05-19 1:59 ` zhuizhuhaomeng at gmail dot com
2021-05-22 0:26 ` zhuizhuhaomeng at gmail dot com
2021-05-22 0:26 ` zhuizhuhaomeng at gmail dot com
2021-05-27 20:18 ` scox at redhat dot com
2021-05-27 20:19 ` scox at redhat dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-27881-6586@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).