This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>'


https://sourceware.org/bugzilla/show_bug.cgi?id=23827

            Bug ID: 23827
           Summary: Systemtap 3.3 - mipsel - semantic error: type
                    definition 'task_struct' not found in
                    'kernel<linux/sched.h>'
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: gmoreira at gmail dot com
  Target Milestone: ---

This happens with SystemTap 3.3 on mipsel using kernel 4.9.75 with debug
symbols.

$ sudo stap -vvv -e 'probe begin { printf("pid: %d\n",
task_pid(task_current())); exit(); }' 

Systemtap translator/driver (version 3.3/0.174, non-git sources)
Copyright (C) 2005-2018 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.18 ... 4.18-rc0
enabled features: AVAHI BPF PYTHON2 LIBSQLITE3 LIBVIRT LIBXML2 NLS NSS
Created temporary directory "/tmp/stapCHwMpx"
Session arch: mips release: 4.9.75
Parsed kernel "/lib/modules/4.9.75/build/.config", containing 3813 tuples
Parsed kernel "/lib/modules/4.9.75/build/Module.symvers", containing 6453
vmlinux exports
Kernel symbol table /lib/modules/4.9.75/build/System.map unavailable, (No such
file or directory)
Parsed kernel "/boot/System.map-4.9.75", containing 27061 symbols
...
WARNING: cannot find module
/root/.systemtap/cache/d0/typequery_d0ffda64edeffcc9cb82440375470b29_636.ko
debuginfo: no support library found for machine [man warning::debuginfo]
....
Eliding side-effect-free singleton block operator '{' at
/usr/local/share/systemtap/tapset/linux/task.stp:33:31
Eliding side-effect-free singleton block operator '{' at
/usr/local/share/systemtap/tapset/linux/task.stp:212:1
semantic error: while processing function task_current
   thrown from: elaborate.cxx:5704
semantic error: type definition 'task_struct' not found in
'kernel<linux/sched.h>': operator '@cast' at
/usr/local/share/systemtap/tapset/linux/task.stpm:2:5
   thrown from: elaborate.cxx:6380
        source:     @cast(@ptr, "task_struct", "kernel<linux/sched.h>")
                    ^
        in expansion of macro: operator '@task' at
/usr/local/share/systemtap/tapset/linux/task.stp:34:14
        source:     return & @task(%{ /* pure */ (unsigned long)current %})
                             ^

$ ls -ld /lib/modules/4.9.75/build
lrwxrwxrwx 1 root root 29 Feb 26  2018 /lib/modules/4.9.75/build ->
/usr/src/linux-headers-4.9.75

$ grep "struct task_struct {"
/usr/src/linux-headers-4.9.75/include/linux/sched.h 
struct task_struct {

$ dpkg -l | grep "4.9.75"
ii  linux-firmware-image-4.9.75      4.9.75-39                         mipsel  
    Linux kernel firmware, version 4.9.75
ii  linux-headers-4.9.75             4.9.75-40                         mipsel  
    Linux kernel headers for 4.9.75 on mipsel
ii  linux-image-4.9.75               4.9.75-40                         mipsel  
    Linux kernel, version 4.9.75
ii  linux-image-4.9.75-dbg           4.9.75-40                         mipsel  
    Linux kernel debugging symbols for 4.9.7


1) Is it missing any lib?
WARNING: cannot find module
/root/.systemtap/cache/d0/typequery_d0ffda64edeffcc9cb82440375470b29_636.ko
debuginfo: no support library found for machine [man warning::debuginfo]

2) task_struct is in linux/sched.h and everything seems to be in the right
place, why systemtap cannot find it?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]