systemtap doesn't work with HWE kernels
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemtap (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Confirmed
|
Medium
|
Unassigned | ||
Xenial |
Confirmed
|
Medium
|
Unassigned | ||
Yakkety |
Fix Released
|
Medium
|
Dan Streetman |
Bug Description
[Environment]
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
Linux juju-niedbalski
[Description]
Xenial system with LTS-hwe xenial kernel enabled. Trying to run the following script:
$ sudo stap -e 'probe oneshot { println("hello world") }'
Raises the following errors:
In file included from /usr/share/
/usr/share/
/usr/share/
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
In file included from ./include/
./include/
long get_user_
^
In file included from /usr/share/
./include/
long get_user_
^
In file included from /usr/share/
/usr/share/
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
In file included from ./include/
./include/
long get_user_
^
In file included from /usr/share/
/usr/share/
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/
./include/
long get_user_
^
In file included from /usr/share/
/usr/share/
^
In file included from /usr/share/
/usr/share/
/usr/share/
mutex_
/usr/share/
/usr/share/
mutex_
Changed in systemtap (Ubuntu): | |
status: | New → Fix Released |
Changed in systemtap (Ubuntu Yakkety): | |
status: | New → Fix Released |
tags: | added: sts |
Changed in systemtap (Ubuntu Yakkety): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in systemtap (Ubuntu Xenial): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in systemtap (Ubuntu Trusty): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in systemtap (Ubuntu Yakkety): | |
importance: | Undecided → Medium |
Changed in systemtap (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in systemtap (Ubuntu Trusty): | |
importance: | Undecided → Medium |
Changed in systemtap (Ubuntu Trusty): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in systemtap (Ubuntu Xenial): | |
assignee: | Dan Streetman (ddstreet) → nobody |
In my case, for a simple process trace (from utrace/uprobe):
sudo stap -e 'probe process( "ls").function( "*").call { log (probefunc()." ".$$parms) }' -c 'ls -l'
Generates:
http:// pastebin. ubuntu. com/24414785/
And you can clearly see incompatibility between systemtap runtime (used to create stap kernel modules):
----
static int process_ vm_ (struct task_struct *tsk, unsigned long addr, void *buf,
struct page * page, unsigned long vaddr,
void *dst, void *src, int len),
struct page * page, unsigned long vaddr,
void *dst, void *src, int len))
__access_
int len, int write,
void (*writer) (struct vm_area_struct * vma,
void (*reader) (struct vm_area_struct * vma,
{
...
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
and kernel we're running in, with function prototypes declared at:
"/usr/src/ linux-headers- 4.8.0-48/ include/ linux/mm. h" as:
long get_user_ pages(unsigned long start, unsigned long nr_pages,
struct vm_area_struct **vmas);
int write, int force, struct page **pages,
----
IMO, HWE kernels should be followed with new systemtap userland packages, for every HWE kernel release, specially for LTS versions.
By backporting yakkety systemtap I got everything working:
ii systemtap 3.0-7 amd64 instrumentation system for Linux
ii systemtap-common 3.0-7 all instrumentation system for Linux (common component)
ii systemtap-doc 3.0-7 all documentation and examples for SystemTap
ii systemtap-runtime 3.0-7 amd64 instrumentation system for Linux (runtime component)
http:// pastebin. ubuntu. com/24414866/