Description of problem: Changes in 4.6 kernel prevent current systemtap in fedora 23 from working Version-Release number of selected component (if applicable): systemtap-3.0-2.fc23.x86_64 kernel-4.6.4-201.fc23.x86_64 How reproducible: everytime Steps to Reproduce: 1. yum install systemtap* 2. sudo stap-prep 3. cd /usr/share/doc/systemtap-client/examples/memory 5. ./pfaults.stp Actual results: $ ./pfaults.stp WARNING: never-assigned local variable 'id' (similar: e, t, name, ftype, fault_type): identifier 'id' at ./pfaults.stp:18:28 source: e = t - fault_entry_time[id] ^ In file included from /usr/share/systemtap/runtime/linux/runtime.h:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_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: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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.c:25: /usr/share/systemtap/runtime/linux/access_process_vm.h:35:54: error: passing argument 6 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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_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); ^ /tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.c: In function ‘function___global_vm_fault_contains__overload_0’: /tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.c:1038:34: error: ‘VM_FAULT_MINOR’ undeclared (first use in this function) case 2: res = STAP_ARG_value == VM_FAULT_MINOR; break; ^ /tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.c:1038:34: note: each undeclared identifier is reported only once for each function it appears in cc1: all warnings being treated as errors scripts/Makefile.build:291: recipe for target '/tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.o' failed make[1]: *** [/tmp/stapGb98oM/stap_786b162c487a7c8bde7ba16f2e127e82_8140_src.o] Error 1 Makefile:1433: recipe for target '_module_/tmp/stapGb98oM' failed make: *** [_module_/tmp/stapGb98oM] Error 2 WARNING: kbuild exited with status: 2 Pass 4: compilation failed. [man error::pass4] Expected results: Script compiled, module loaded, and the script starts logging page faults. Additional info: There git checkout of systemtap does not suffer from this problem, so there is a fix in the upstream systemtap.
I am having a similar issue after a kernel upgrade on Fedora 23: In file included from /usr/share/systemtap/runtime/linux/runtime.h:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_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: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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_src.c:25: /usr/share/systemtap/runtime/linux/access_process_vm.h:35:54: error: passing argument 6 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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_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:6:0, from include/linux/ptrace.h:8, from include/linux/ftrace.h:13, 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/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_src.c:25: include/linux/mm.h:1266: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:209:0, from /usr/share/systemtap/runtime/runtime.h:24, from /tmp/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_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); ^ cc1: all warnings being treated as errors scripts/Makefile.build:291: recipe for target '/tmp/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_src.o' failed make[1]: *** [/tmp/stapqENHrE/stap_e6409fd8119a2d60773a128744ff2726_73992_src.o] Error 1 Makefile:1433: recipe for target '_module_/tmp/stapqENHrE' failed make: *** [_module_/tmp/stapqENHrE] Error 2 WARNING: kbuild exited with status: 2 Pass 4: compilation failed. [man error::pass4]
systemtap-3.0-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c87f8f1eb3
systemtap-3.0-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c87f8f1eb3
systemtap-3.0-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.