** Description changed:

- Attempting to use systemtap results in:
+ [Impact]
+ 
+ Attempting to use systemtap on trusty with the lts-vivid kernel fails
+ with:
  
  In file included from /usr/share/systemtap/runtime/linux/task_finder.c:17:0,
-                  from /usr/share/systemtap/runtime/linux/runtime.h:188,
-                  from /usr/share/systemtap/runtime/runtime.h:24,
-                  from 
/tmp/stapcEoS7h/stap_f4621118dc34d17850373d218d3dab98_4225_src.c:24:
+                  from /usr/share/systemtap/runtime/linux/runtime.h:188,
+                  from /usr/share/systemtap/runtime/runtime.h:24,
+                  from 
/tmp/stapcEoS7h/stap_f4621118dc34d17850373d218d3dab98_4225_src.c:24:
  /usr/share/systemtap/runtime/linux/task_finder2.c: In function 
‘__stp_call_mmap_callbacks_with_addr’:
  /usr/share/systemtap/runtime/linux/task_finder2.c:703:24: error: ‘struct 
file’ has no member named ‘f_dentry’
-    dentry = vma->vm_file->f_dentry;
-                         ^
+    dentry = vma->vm_file->f_dentry;
+                         ^
  /usr/share/systemtap/runtime/linux/task_finder2.c: In function 
‘__stp_utrace_attach_match_filename’:
  /usr/share/systemtap/runtime/linux/task_finder2.c:821:11: error: incompatible 
types when assigning to type ‘uid_t’ from type ‘kuid_t’
-   tsk_euid = task_euid(tsk);
-            ^
+   tsk_euid = task_euid(tsk);
+            ^
  /usr/share/systemtap/runtime/linux/task_finder2.c: In function 
‘__stp_call_mmap_callbacks_for_task’:
  /usr/share/systemtap/runtime/linux/task_finder2.c:1206:42: error: ‘struct 
file’ has no member named ‘f_dentry’
-         vma_cache_p->dentry = vma->vm_file->f_dentry;
-                                           ^
+         vma_cache_p->dentry = vma->vm_file->f_dentry;
+                                           ^
  /usr/share/systemtap/runtime/linux/task_finder2.c: In function 
‘stap_start_task_finder’:
  /usr/share/systemtap/runtime/linux/task_finder2.c:1711:12: error: 
incompatible types when assigning to type ‘uid_t’ from type ‘kuid_t’
-    tsk_euid = task_euid(tsk);
-             ^
+    tsk_euid = task_euid(tsk);
+             ^
  In file included from /usr/share/systemtap/runtime/linux/runtime.h:194:0,
-                  from /usr/share/systemtap/runtime/runtime.h:24,
-                  from 
/tmp/stapcEoS7h/stap_f4621118dc34d17850373d218d3dab98_4225_src.c:24:
+                  from /usr/share/systemtap/runtime/runtime.h:24,
+                  from 
/tmp/stapcEoS7h/stap_f4621118dc34d17850373d218d3dab98_4225_src.c:24:
  /usr/share/systemtap/runtime/sym.c: In function ‘_stp_snprint_addr’:
  /usr/share/systemtap/runtime/sym.c:567:4: error: implicit declaration of 
function ‘preempt_enable_no_resched’ [-Werror=implicit-function-declaration]
-     preempt_enable_no_resched();
-     ^
+     preempt_enable_no_resched();
+     ^
  In file included from include/linux/sched.h:56:0,
-                  from include/linux/ptrace.h:5,
-                  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/stapcEoS7h/stap_f4621118dc34d17850373d218d3dab98_4225_src.c:24:
+                  from include/linux/ptrace.h:5,
+                  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/stapcEoS7h/stap_f4621118dc34d17850373d218d3dab98_4225_src.c:24:
  /usr/share/systemtap/runtime/transport/control.c: In function 
‘_stp_ctl_write_cmd’:
  include/linux/cred.h:343:25: error: incompatible types when initializing type 
‘uid_t’ using type ‘kuid_t’
-  #define current_euid()  (current_cred_xxx(euid))
-                          ^
+  #define current_euid()  (current_cred_xxx(euid))
+                          ^
  /usr/share/systemtap/runtime/transport/control.c:41:15: note: in expansion of 
macro ‘current_euid’
-   uid_t euid = current_euid();
-                ^
+   uid_t euid = current_euid();
+                ^
  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/stapcEoS7h/stap_f4621118dc34d17850373d218d3dab98_4225_src.c:67:
+                  from /usr/share/systemtap/runtime/print.c:17,
+                  from /usr/share/systemtap/runtime/runtime_context.h:22,
+                  from 
/tmp/stapcEoS7h/stap_f4621118dc34d17850373d218d3dab98_4225_src.c:67:
  /usr/share/systemtap/runtime/transport/transport.c: In function 
‘_stp_transport_init’:
  /usr/share/systemtap/runtime/transport/transport.c:344:11: error: 
incompatible types when assigning to type ‘uid_t’ from type ‘kuid_t’
-   _stp_uid = current_uid();
-            ^
+   _stp_uid = current_uid();
+            ^
  /usr/share/systemtap/runtime/transport/transport.c:345:11: error: 
incompatible types when assigning to type ‘gid_t’ from type ‘kgid_t’
-   _stp_gid = current_gid();
-            ^
+   _stp_gid = current_gid();
+            ^
  cc1: all warnings being treated as errors
  make[1]: *** 
[/tmp/stapcEoS7h/stap_f4621118dc34d17850373d218d3dab98_4225_src.o] Error 1
  make: *** [_module_/tmp/stapcEoS7h] 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.
  
  
- several upstream patches are required to get systemtap working with the lts 
kernel.
+ [Test Case]
+ 
+ on a trusty system that's running a lts-vivid kernel, with the kernel
+ dbgsym deb installed, simply create a dummy systemtap script and try to
+ run it, e.g.
+ 
+ $ cat test.stap
+ #!/usr/bin/stap
+ 
+ probe kernel.function("find_module") {
+   println("hello")
+ }
+ $ sudo stap test.stap
+ 
+ the above compliation failure will happen.
+ 
+ [Regression Potential]
+ 
+ As this only changes how systemtap uses the kernel header structures,
+ the most likely regression is systemtap failing to compile on earlier
+ kernels.
+ 
+ I tested on the trusty 3.13 kernel and the updated stap does still
+ compile and run the test case above.
+ 
+ [Other Info]
+  
+ The commits provided in the debdiff fix systemtap to correctly use the kernel 
header functions for the newer kernel; they are cherry-picked from upstream 
systemtap.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1545173

Title:
  systemtap does not work on trusty lts-vivid kernel

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1545173/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to