group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #30466
[Bug 1830726] [NEW] systemtap for hwe kernels
Public bug reported:
[Impact]
systemtap includes some kernel code compiled at runtime every time a
stap script is executed. This means that running a different kernel with
different ABIs may break systemtap. This is exactly what happens with
the hwe kernel.
We need to provide a separate systemtap package (systemtap-hwe for
example) that can be installed together with the hwe kernel.
For example on xenial, ideally, we may want to backport systemtap from
bionic and call it systemtap-hwe, similarly to what we're doing with the
kernel.
[Test Case]
For example, this is what happens in xenial with the hwe kernel
installed (linux-image-generic-hwe-16.04):
$ cat /home/ubuntu/hello.stp
#!/usr/bin/env stap
probe oneshot { println("hello world") }
$ sudo /home/ubuntu/hello.stp
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h: In function ‘__access_process_vm_’:
/usr/share/systemtap/runtime/linux/access_process_vm.h:24:8: error: implicit declaration of function ‘get_task_mm’ [-Werror=implicit-function-declaration]
mm = get_task_mm (tsk);
^
/usr/share/systemtap/runtime/linux/access_process_vm.h:24:6: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
mm = get_task_mm (tsk);
^
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:29: error: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Werror=int-conversion]
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:34: error: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Werror=int-conversion]
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:44: error: passing argument 4 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘struct page **’ but argument is of type ‘int’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:47: error: passing argument 5 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘int’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:13: error: too many arguments to function ‘get_user_pages’
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: declared here
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:55:7: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration]
page_cache_release (page);
^
/usr/share/systemtap/runtime/linux/access_process_vm.h:61:3: error: implicit declaration of function ‘mmput’ [-Werror=implicit-function-declaration]
mmput (mm);
^
In file included from /usr/share/systemtap/runtime/stp_utrace.c:30:0,
from /usr/share/systemtap/runtime/linux/task_finder2.c:4,
from /usr/share/systemtap/runtime/linux/task_finder.c:17,
from /usr/share/systemtap/runtime/linux/runtime.h:217,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/stp_helper_lock.h: In function ‘stp_spin_unlock_wait’:
/usr/share/systemtap/runtime/stp_helper_lock.h:60:61: error: implicit declaration of function ‘spin_unlock_wait’ [-Werror=implicit-function-declaration]
static inline void stp_spin_unlock_wait(spinlock_t *lock) { spin_unlock_wait(lock); }
^
In file included from /usr/share/systemtap/runtime/linux/task_finder2.c:4:0,
from /usr/share/systemtap/runtime/linux/task_finder.c:17,
from /usr/share/systemtap/runtime/linux/runtime.h:217,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/stp_utrace.c: In function ‘utrace_do_stop’:
/usr/share/systemtap/runtime/stp_utrace.c:1095:4: error: implicit declaration of function ‘__set_task_state’ [-Werror=implicit-function-declaration]
__set_task_state(target, TASK_TRACED);
^
In file included from /usr/share/systemtap/runtime/transport/transport.c:68:0,
from /usr/share/systemtap/runtime/linux/print.c:17,
from /usr/share/systemtap/runtime/print.c:17,
from /usr/share/systemtap/runtime/runtime_context.h:22,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:55:
/usr/share/systemtap/runtime/transport/relay_v2.c: In function ‘__stp_relay_timer_init’:
/usr/share/systemtap/runtime/transport/relay_v2.c:147:2: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
init_timer(&_stp_relay_data.timer);
^
/usr/share/systemtap/runtime/transport/relay_v2.c:149:33: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
_stp_relay_data.timer.function = __stp_relay_wakeup_timer;
^
/usr/share/systemtap/runtime/transport/relay_v2.c:150:23: error: ‘struct timer_list’ has no member named ‘data’
_stp_relay_data.timer.data = 0;
^
In file included from /usr/share/systemtap/runtime/linux/print.c:17:0,
from /usr/share/systemtap/runtime/print.c:17,
from /usr/share/systemtap/runtime/runtime_context.h:22,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:55:
/usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_attach’:
/usr/share/systemtap/runtime/transport/transport.c:324:31: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
_stp_ctl_work_timer.function = _stp_ctl_work_callback;
^
/usr/share/systemtap/runtime/transport/transport.c:325:21: error: ‘struct timer_list’ has no member named ‘data’
_stp_ctl_work_timer.data= 0;
^
/usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_lock_inode’:
/usr/share/systemtap/runtime/transport/transport.c:506:19: error: ‘struct inode’ has no member named ‘i_mutex’
mutex_lock(&inode->i_mutex);
^
/usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_unlock_inode’:
/usr/share/systemtap/runtime/transport/transport.c:515:21: error: ‘struct inode’ has no member named ‘i_mutex’
mutex_unlock(&inode->i_mutex);
^
cc1: all warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.o' failed
make[1]: *** [/tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.o] Error 1
Makefile:1552: recipe for target '_module_/tmp/stapCmbcrm' failed
make: *** [_module_/tmp/stapCmbcrm] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.
** Affects: systemtap (Ubuntu)
Importance: Medium
Assignee: Andrea Righi (arighi)
Status: Confirmed
** Affects: systemtap (Ubuntu Xenial)
Importance: Medium
Assignee: Andrea Righi (arighi)
Status: New
** Changed in: systemtap (Ubuntu)
Importance: Undecided => Medium
** Changed in: systemtap (Ubuntu)
Status: New => Confirmed
** Changed in: systemtap (Ubuntu)
Assignee: (unassigned) => Andrea Righi (arighi)
** Also affects: systemtap (Ubuntu Xenial)
Importance: Undecided
Status: New
** Changed in: systemtap (Ubuntu Xenial)
Importance: Undecided => Medium
** Changed in: systemtap (Ubuntu Xenial)
Assignee: (unassigned) => Andrea Righi (arighi)
** Description changed:
[Impact]
systemtap includes some kernel code compiled at runtime every time a
stap script is executed. This means that running a different kernel with
different ABIs may break systemtap. This is exactly what happens with
the hwe kernel.
We need to provide a separate systemtap package (systemtap-hwe for
example) that can be installed together with the hwe kernel.
+ For example on xenial, ideally, we may want to backport systemtap from
+ bionic and call it systemtap-hwe, similarly to what we're doing with the
+ kernel.
+
[Test Case]
For example, this is what happens in xenial with the hwe kernel
installed (linux-image-generic-hwe-16.04):
- $ cat /home/ubuntu/hello.stp
+ $ cat /home/ubuntu/hello.stp
#!/usr/bin/env stap
probe oneshot { println("hello world") }
- $ sudo /home/ubuntu/hello.stp
+ $ sudo /home/ubuntu/hello.stp
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h: In function ‘__access_process_vm_’:
/usr/share/systemtap/runtime/linux/access_process_vm.h:24:8: error: implicit declaration of function ‘get_task_mm’ [-Werror=implicit-function-declaration]
- mm = get_task_mm (tsk);
- ^
+ mm = get_task_mm (tsk);
+ ^
/usr/share/systemtap/runtime/linux/access_process_vm.h:24:6: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
- mm = get_task_mm (tsk);
- ^
+ mm = get_task_mm (tsk);
+ ^
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:29: error: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Werror=int-conversion]
- ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
- ^
+ ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
+ ^
In file included from ./include/linux/pid_namespace.h:7:0,
- from ./include/linux/ptrace.h:10,
- from ./include/linux/ftrace.h:14,
- from ./include/linux/kprobes.h:42,
- from /usr/share/systemtap/runtime/linux/runtime.h:21,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from ./include/linux/ptrace.h:10,
+ from ./include/linux/ftrace.h:14,
+ from ./include/linux/kprobes.h:42,
+ from /usr/share/systemtap/runtime/linux/runtime.h:21,
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
- long get_user_pages(unsigned long start, unsigned long nr_pages,
- ^
+ long get_user_pages(unsigned long start, unsigned long nr_pages,
+ ^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:34: error: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Werror=int-conversion]
- ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
- ^
+ ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
+ ^
In file included from ./include/linux/pid_namespace.h:7:0,
- from ./include/linux/ptrace.h:10,
- from ./include/linux/ftrace.h:14,
- from ./include/linux/kprobes.h:42,
- from /usr/share/systemtap/runtime/linux/runtime.h:21,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from ./include/linux/ptrace.h:10,
+ from ./include/linux/ftrace.h:14,
+ from ./include/linux/kprobes.h:42,
+ from /usr/share/systemtap/runtime/linux/runtime.h:21,
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
- long get_user_pages(unsigned long start, unsigned long nr_pages,
- ^
+ long get_user_pages(unsigned long start, unsigned long nr_pages,
+ ^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:44: error: passing argument 4 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]
- ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
- ^
+ ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
+ ^
In file included from ./include/linux/pid_namespace.h:7:0,
- from ./include/linux/ptrace.h:10,
- from ./include/linux/ftrace.h:14,
- from ./include/linux/kprobes.h:42,
- from /usr/share/systemtap/runtime/linux/runtime.h:21,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from ./include/linux/ptrace.h:10,
+ from ./include/linux/ftrace.h:14,
+ from ./include/linux/kprobes.h:42,
+ from /usr/share/systemtap/runtime/linux/runtime.h:21,
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘struct page **’ but argument is of type ‘int’
- long get_user_pages(unsigned long start, unsigned long nr_pages,
- ^
+ long get_user_pages(unsigned long start, unsigned long nr_pages,
+ ^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:47: error: passing argument 5 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]
- ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
- ^
+ ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
+ ^
In file included from ./include/linux/pid_namespace.h:7:0,
- from ./include/linux/ptrace.h:10,
- from ./include/linux/ftrace.h:14,
- from ./include/linux/kprobes.h:42,
- from /usr/share/systemtap/runtime/linux/runtime.h:21,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from ./include/linux/ptrace.h:10,
+ from ./include/linux/ftrace.h:14,
+ from ./include/linux/kprobes.h:42,
+ from /usr/share/systemtap/runtime/linux/runtime.h:21,
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘int’
- long get_user_pages(unsigned long start, unsigned long nr_pages,
- ^
+ long get_user_pages(unsigned long start, unsigned long nr_pages,
+ ^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:13: error: too many arguments to function ‘get_user_pages’
- ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
- ^
+ ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
+ ^
In file included from ./include/linux/pid_namespace.h:7:0,
- from ./include/linux/ptrace.h:10,
- from ./include/linux/ftrace.h:14,
- from ./include/linux/kprobes.h:42,
- from /usr/share/systemtap/runtime/linux/runtime.h:21,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from ./include/linux/ptrace.h:10,
+ from ./include/linux/ftrace.h:14,
+ from ./include/linux/kprobes.h:42,
+ from /usr/share/systemtap/runtime/linux/runtime.h:21,
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: declared here
- long get_user_pages(unsigned long start, unsigned long nr_pages,
- ^
+ long get_user_pages(unsigned long start, unsigned long nr_pages,
+ ^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:55:7: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration]
- page_cache_release (page);
- ^
+ page_cache_release (page);
+ ^
/usr/share/systemtap/runtime/linux/access_process_vm.h:61:3: error: implicit declaration of function ‘mmput’ [-Werror=implicit-function-declaration]
- mmput (mm);
- ^
+ mmput (mm);
+ ^
In file included from /usr/share/systemtap/runtime/stp_utrace.c:30:0,
- from /usr/share/systemtap/runtime/linux/task_finder2.c:4,
- from /usr/share/systemtap/runtime/linux/task_finder.c:17,
- from /usr/share/systemtap/runtime/linux/runtime.h:217,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from /usr/share/systemtap/runtime/linux/task_finder2.c:4,
+ from /usr/share/systemtap/runtime/linux/task_finder.c:17,
+ from /usr/share/systemtap/runtime/linux/runtime.h:217,
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/stp_helper_lock.h: In function ‘stp_spin_unlock_wait’:
/usr/share/systemtap/runtime/stp_helper_lock.h:60:61: error: implicit declaration of function ‘spin_unlock_wait’ [-Werror=implicit-function-declaration]
- static inline void stp_spin_unlock_wait(spinlock_t *lock) { spin_unlock_wait(lock); }
- ^
+ static inline void stp_spin_unlock_wait(spinlock_t *lock) { spin_unlock_wait(lock); }
+ ^
In file included from /usr/share/systemtap/runtime/linux/task_finder2.c:4:0,
- from /usr/share/systemtap/runtime/linux/task_finder.c:17,
- from /usr/share/systemtap/runtime/linux/runtime.h:217,
- from /usr/share/systemtap/runtime/runtime.h:24,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
+ from /usr/share/systemtap/runtime/linux/task_finder.c:17,
+ from /usr/share/systemtap/runtime/linux/runtime.h:217,
+ from /usr/share/systemtap/runtime/runtime.h:24,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/stp_utrace.c: In function ‘utrace_do_stop’:
/usr/share/systemtap/runtime/stp_utrace.c:1095:4: error: implicit declaration of function ‘__set_task_state’ [-Werror=implicit-function-declaration]
- __set_task_state(target, TASK_TRACED);
- ^
+ __set_task_state(target, TASK_TRACED);
+ ^
In file included from /usr/share/systemtap/runtime/transport/transport.c:68:0,
- from /usr/share/systemtap/runtime/linux/print.c:17,
- from /usr/share/systemtap/runtime/print.c:17,
- from /usr/share/systemtap/runtime/runtime_context.h:22,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:55:
+ from /usr/share/systemtap/runtime/linux/print.c:17,
+ from /usr/share/systemtap/runtime/print.c:17,
+ from /usr/share/systemtap/runtime/runtime_context.h:22,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:55:
/usr/share/systemtap/runtime/transport/relay_v2.c: In function ‘__stp_relay_timer_init’:
/usr/share/systemtap/runtime/transport/relay_v2.c:147:2: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
- init_timer(&_stp_relay_data.timer);
- ^
+ init_timer(&_stp_relay_data.timer);
+ ^
/usr/share/systemtap/runtime/transport/relay_v2.c:149:33: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
- _stp_relay_data.timer.function = __stp_relay_wakeup_timer;
- ^
+ _stp_relay_data.timer.function = __stp_relay_wakeup_timer;
+ ^
/usr/share/systemtap/runtime/transport/relay_v2.c:150:23: error: ‘struct timer_list’ has no member named ‘data’
- _stp_relay_data.timer.data = 0;
- ^
+ _stp_relay_data.timer.data = 0;
+ ^
In file included from /usr/share/systemtap/runtime/linux/print.c:17:0,
- from /usr/share/systemtap/runtime/print.c:17,
- from /usr/share/systemtap/runtime/runtime_context.h:22,
- from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:55:
+ from /usr/share/systemtap/runtime/print.c:17,
+ from /usr/share/systemtap/runtime/runtime_context.h:22,
+ from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:55:
/usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_attach’:
/usr/share/systemtap/runtime/transport/transport.c:324:31: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
- _stp_ctl_work_timer.function = _stp_ctl_work_callback;
- ^
+ _stp_ctl_work_timer.function = _stp_ctl_work_callback;
+ ^
/usr/share/systemtap/runtime/transport/transport.c:325:21: error: ‘struct timer_list’ has no member named ‘data’
- _stp_ctl_work_timer.data= 0;
- ^
+ _stp_ctl_work_timer.data= 0;
+ ^
/usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_lock_inode’:
/usr/share/systemtap/runtime/transport/transport.c:506:19: error: ‘struct inode’ has no member named ‘i_mutex’
- mutex_lock(&inode->i_mutex);
- ^
+ mutex_lock(&inode->i_mutex);
+ ^
/usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_unlock_inode’:
/usr/share/systemtap/runtime/transport/transport.c:515:21: error: ‘struct inode’ has no member named ‘i_mutex’
- mutex_unlock(&inode->i_mutex);
- ^
+ mutex_unlock(&inode->i_mutex);
+ ^
cc1: all warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.o' failed
make[1]: *** [/tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.o] Error 1
Makefile:1552: recipe for target '_module_/tmp/stapCmbcrm' failed
make: *** [_module_/tmp/stapCmbcrm] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1830726
Title:
systemtap for hwe kernels
Status in systemtap package in Ubuntu:
Confirmed
Status in systemtap source package in Xenial:
New
Bug description:
[Impact]
systemtap includes some kernel code compiled at runtime every time a
stap script is executed. This means that running a different kernel
with different ABIs may break systemtap. This is exactly what happens
with the hwe kernel.
We need to provide a separate systemtap package (systemtap-hwe for
example) that can be installed together with the hwe kernel.
For example on xenial, ideally, we may want to backport systemtap from
bionic and call it systemtap-hwe, similarly to what we're doing with
the kernel.
[Test Case]
For example, this is what happens in xenial with the hwe kernel
installed (linux-image-generic-hwe-16.04):
$ cat /home/ubuntu/hello.stp
#!/usr/bin/env stap
probe oneshot { println("hello world") }
$ sudo /home/ubuntu/hello.stp
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h: In function ‘__access_process_vm_’:
/usr/share/systemtap/runtime/linux/access_process_vm.h:24:8: error: implicit declaration of function ‘get_task_mm’ [-Werror=implicit-function-declaration]
mm = get_task_mm (tsk);
^
/usr/share/systemtap/runtime/linux/access_process_vm.h:24:6: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
mm = get_task_mm (tsk);
^
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:29: error: passing argument 1 of ‘get_user_pages’ makes integer from pointer without a cast [-Werror=int-conversion]
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:34: error: passing argument 2 of ‘get_user_pages’ makes integer from pointer without a cast [-Werror=int-conversion]
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:44: error: passing argument 4 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘struct page **’ but argument is of type ‘int’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:47: error: passing argument 5 of ‘get_user_pages’ makes pointer from integer without a cast [-Werror=int-conversion]
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘int’
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:35:13: error: too many arguments to function ‘get_user_pages’
ret = get_user_pages (tsk, mm, addr, 1, write, 1, &page, &vma);
^
In file included from ./include/linux/pid_namespace.h:7:0,
from ./include/linux/ptrace.h:10,
from ./include/linux/ftrace.h:14,
from ./include/linux/kprobes.h:42,
from /usr/share/systemtap/runtime/linux/runtime.h:21,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
./include/linux/mm.h:1398:6: note: declared here
long get_user_pages(unsigned long start, unsigned long nr_pages,
^
In file included from /usr/share/systemtap/runtime/linux/runtime.h:204:0,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/linux/access_process_vm.h:55:7: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration]
page_cache_release (page);
^
/usr/share/systemtap/runtime/linux/access_process_vm.h:61:3: error: implicit declaration of function ‘mmput’ [-Werror=implicit-function-declaration]
mmput (mm);
^
In file included from /usr/share/systemtap/runtime/stp_utrace.c:30:0,
from /usr/share/systemtap/runtime/linux/task_finder2.c:4,
from /usr/share/systemtap/runtime/linux/task_finder.c:17,
from /usr/share/systemtap/runtime/linux/runtime.h:217,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/stp_helper_lock.h: In function ‘stp_spin_unlock_wait’:
/usr/share/systemtap/runtime/stp_helper_lock.h:60:61: error: implicit declaration of function ‘spin_unlock_wait’ [-Werror=implicit-function-declaration]
static inline void stp_spin_unlock_wait(spinlock_t *lock) { spin_unlock_wait(lock); }
^
In file included from /usr/share/systemtap/runtime/linux/task_finder2.c:4:0,
from /usr/share/systemtap/runtime/linux/task_finder.c:17,
from /usr/share/systemtap/runtime/linux/runtime.h:217,
from /usr/share/systemtap/runtime/runtime.h:24,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:25:
/usr/share/systemtap/runtime/stp_utrace.c: In function ‘utrace_do_stop’:
/usr/share/systemtap/runtime/stp_utrace.c:1095:4: error: implicit declaration of function ‘__set_task_state’ [-Werror=implicit-function-declaration]
__set_task_state(target, TASK_TRACED);
^
In file included from /usr/share/systemtap/runtime/transport/transport.c:68:0,
from /usr/share/systemtap/runtime/linux/print.c:17,
from /usr/share/systemtap/runtime/print.c:17,
from /usr/share/systemtap/runtime/runtime_context.h:22,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:55:
/usr/share/systemtap/runtime/transport/relay_v2.c: In function ‘__stp_relay_timer_init’:
/usr/share/systemtap/runtime/transport/relay_v2.c:147:2: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
init_timer(&_stp_relay_data.timer);
^
/usr/share/systemtap/runtime/transport/relay_v2.c:149:33: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
_stp_relay_data.timer.function = __stp_relay_wakeup_timer;
^
/usr/share/systemtap/runtime/transport/relay_v2.c:150:23: error: ‘struct timer_list’ has no member named ‘data’
_stp_relay_data.timer.data = 0;
^
In file included from /usr/share/systemtap/runtime/linux/print.c:17:0,
from /usr/share/systemtap/runtime/print.c:17,
from /usr/share/systemtap/runtime/runtime_context.h:22,
from /tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.c:55:
/usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_attach’:
/usr/share/systemtap/runtime/transport/transport.c:324:31: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
_stp_ctl_work_timer.function = _stp_ctl_work_callback;
^
/usr/share/systemtap/runtime/transport/transport.c:325:21: error: ‘struct timer_list’ has no member named ‘data’
_stp_ctl_work_timer.data= 0;
^
/usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_lock_inode’:
/usr/share/systemtap/runtime/transport/transport.c:506:19: error: ‘struct inode’ has no member named ‘i_mutex’
mutex_lock(&inode->i_mutex);
^
/usr/share/systemtap/runtime/transport/transport.c: In function ‘_stp_unlock_inode’:
/usr/share/systemtap/runtime/transport/transport.c:515:21: error: ‘struct inode’ has no member named ‘i_mutex’
mutex_unlock(&inode->i_mutex);
^
cc1: all warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.o' failed
make[1]: *** [/tmp/stapCmbcrm/stap_e18a9aff18b91b2a0f0570b0096c64b1_967_src.o] Error 1
Makefile:1552: recipe for target '_module_/tmp/stapCmbcrm' failed
make: *** [_module_/tmp/stapCmbcrm] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1830726/+subscriptions