systemtap currently broken in xenial
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemtap (Ubuntu) |
Fix Released
|
Medium
|
Andrea Righi | ||
Xenial |
Won't Fix
|
Medium
|
Andrea Righi |
Bug Description
[Impact]
Kernel commit 768ae309a96103e
This breaks systemtap that makes use of get_user_pages() in its kernel runtime interface.
Fix the usage of get_user_pages() checking if it requires the old or the new signature.
[Test Case]
ubuntu@ubuntu:~$ cat hello.stp
#!/usr/bin/env stap
probe oneshot { println("hello world") }
[Regression Potential]
A similar change is already present in bionic+. This is a backported change for xenial. Moreover the fix adds a runtime check (done every time a stap script is executed) to verify if the running kernel is using the old or the new signature of get_user_pages(), so this change does not break the old stap scripts. Therefore regression potential is minimal.
[Original bug report]
Running a simple systemtap hello world example on a fresh installed Xenial VM produces the following errors:
ubuntu@ubuntu:~$ uname -r
4.4.0-148-generic
ubuntu@ubuntu:~$ dpkg -l | grep systemtap
ii systemtap 2.9-2ubuntu2 amd64 instrumentation system for Linux
ii systemtap-common 2.9-2ubuntu2 all instrumentation system for Linux (common component)
ii systemtap-runtime 2.9-2ubuntu2 amd64 instrumentation system for Linux (runtime component)
ubuntu@ubuntu:~$ cat hello.stp
#!/usr/bin/env stap
probe oneshot { println("hello world") }
ubuntu@ubuntu:~$ sudo ./hello.stp
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/
/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_
^
cc1: all warnings being treated as errors
scripts/
make[1]: *** [/tmp/stapCrPm1
Makefile:1454: recipe for target '_module_
make: *** [_module_
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
Tip: /usr/share/
affects: | linaro-aarch64 → linux |
description: | updated |
Changed in linux: | |
assignee: | nobody → Andrea Righi (arighi) |
affects: | linux → systemtap (Ubuntu) |
Changed in systemtap (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in systemtap (Ubuntu Xenial): | |
importance: | Undecided → Medium |
assignee: | nobody → Andrea Righi (arighi) |
status: | New → Confirmed |
Changed in systemtap (Ubuntu): | |
status: | Confirmed → Fix Released |
It looks like this particular build error has been introduced by this upstream commit: /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=768ae309a96 103ed02eb1e111e 838c87854d8b51
https:/
That was backported to the xenial kernel, changing the prototype of get_user_pages(). We need to update systemtap to use the new get_user_pages() prototype as well.