Unfortunately latest version of systemtap doesn't work with 4.14+ kernels. Recently a new version was released and it is said to work with newer kernels. Example error: # cat test.stp #!/usr/bin/env stap probe syscall.write.return { if ($return < 0) { printf("%s: write failed\n", execname()) } } # stap test.stp In file included from /usr/share/systemtap/runtime/linux/runtime.h:209:0, from /usr/share/systemtap/runtime/runtime.h:26, from /tmp/stapXy1Ub2/stap_82571f9c68c956ab6bedcb9106616763_7837_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’; did you mean ‘get_task_comm’? [-Werror=implicit-function-declaration] mm = get_task_mm (tsk); ^~~~~~~~~~~ get_task_comm /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:77:3: error: implicit declaration of function ‘mmput’; did you mean ‘bdput’? [-Werror=implicit-function-declaration] mmput (mm); ^~~~~ bdput 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:222, from /usr/share/systemtap/runtime/runtime.h:26, from /tmp/stapXy1Ub2/stap_82571f9c68c956ab6bedcb9106616763_7837_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’; did you mean ‘stp_spin_unlock_wait’? [-Werror=implicit-function-declaration] static inline void stp_spin_unlock_wait(spinlock_t *lock) { spin_unlock_wait(lock); } ^~~~~~~~~~~~~~~~ stp_spin_unlock_wait 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:222, from /usr/share/systemtap/runtime/runtime.h:26, from /tmp/stapXy1Ub2/stap_82571f9c68c956ab6bedcb9106616763_7837_src.c:25: /usr/share/systemtap/runtime/stp_utrace.c: In function ‘utrace_do_stop’: /usr/share/systemtap/runtime/stp_utrace.c:1108:4: error: implicit declaration of function ‘__set_task_state’; did you mean ‘__get_task_state’? [-Werror=implicit-function-declaration] __set_task_state(target, TASK_TRACED); ^~~~~~~~~~~~~~~~ __get_task_state cc1: all warnings being treated as errors make[1]: *** [scripts/Makefile.build:320: /tmp/stapXy1Ub2/stap_82571f9c68c956ab6bedcb9106616763_7837_src.o] Error 1 make: *** [Makefile:1507: _module_/tmp/stapXy1Ub2] Error 2 WARNING: kbuild exited with status: 2 Pass 4: compilation failed. [man error::pass4]
For the record: ebuild and patches for 3.2 can be found here: https://github.com/mlen/gentoo-overlay/tree/master/dev-util/systemtap
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee7db9ad35bf04afef0974eee1e5888599badd1b commit ee7db9ad35bf04afef0974eee1e5888599badd1b Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-01-08 09:25:02 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-01-08 09:25:26 +0000 dev-util/systemtap: Bump to version 4.0 Non-maintainer commit due to maintainer timeout... Closes: https://bugs.gentoo.org/647712 Package-Manager: Portage-2.3.54, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> dev-util/systemtap/Manifest | 1 + dev-util/systemtap/systemtap-4.0.ebuild | 103 ++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+)