public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>'
@ 2018-10-26  3:10 gmoreira at gmail dot com
  2018-11-01 13:56 ` [Bug tapsets/23827] " dsmith at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gmoreira at gmail dot com @ 2018-10-26  3:10 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tapsets/23827] Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>'
  2018-10-26  3:10 [Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>' gmoreira at gmail dot com
@ 2018-11-01 13:56 ` dsmith at redhat dot com
  2018-11-01 14:01 ` mark at klomp dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dsmith at redhat dot com @ 2018-11-01 13:56 UTC (permalink / raw)
  To: systemtap

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

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsmith at redhat dot com

--- Comment #1 from David Smith <dsmith at redhat dot com> ---
(In reply to Gustavo Moreira from comment #0)
> This happens with SystemTap 3.3 on mipsel using kernel 4.9.75 with debug
> symbols.

... stuff deleted ...

> WARNING: cannot find module
> /root/.systemtap/cache/d0/typequery_d0ffda64edeffcc9cb82440375470b29_636.ko
> debuginfo: no support library found for machine [man warning::debuginfo]

If I'm not mistaken, this error comes from elfutils, saying that it has no
support for your mipsel arch. That's going to be a problem, since systemtap
relies on elfuitls a good bit.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tapsets/23827] Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>'
  2018-10-26  3:10 [Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>' gmoreira at gmail dot com
  2018-11-01 13:56 ` [Bug tapsets/23827] " dsmith at redhat dot com
@ 2018-11-01 14:01 ` mark at klomp dot org
  2018-11-01 14:17 ` gmoreira at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mark at klomp dot org @ 2018-11-01 14:01 UTC (permalink / raw)
  To: systemtap

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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
(In reply to David Smith from comment #1)
> If I'm not mistaken, this error comes from elfutils, saying that it has no
> support for your mipsel arch. That's going to be a problem, since systemtap
> relies on elfuitls a good bit.

That is correct. But there are unofficial ports for mips support (I believe
Debian has one). But they have never been submitted upstream. If someone that
knows about and/or can actually test it on an MIPS platform could help
integrate that upstream that would be really helpful.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tapsets/23827] Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>'
  2018-10-26  3:10 [Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>' gmoreira at gmail dot com
  2018-11-01 13:56 ` [Bug tapsets/23827] " dsmith at redhat dot com
  2018-11-01 14:01 ` mark at klomp dot org
@ 2018-11-01 14:17 ` gmoreira at gmail dot com
  2018-11-01 15:04 ` fche at redhat dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: gmoreira at gmail dot com @ 2018-11-01 14:17 UTC (permalink / raw)
  To: systemtap

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

--- Comment #3 from Gustavo Moreira <gmoreira at gmail dot com> ---

> If I'm not mistaken, this error comes from elfutils, saying that it has no
> support for your mipsel arch. That's going to be a problem, since systemtap
> relies on elfuitls a good bit.

I will try a mips port .. Any clue about the task_struct error?

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tapsets/23827] Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>'
  2018-10-26  3:10 [Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>' gmoreira at gmail dot com
                   ` (2 preceding siblings ...)
  2018-11-01 14:17 ` gmoreira at gmail dot com
@ 2018-11-01 15:04 ` fche at redhat dot com
  2018-11-08  5:14 ` gmoreira at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fche at redhat dot com @ 2018-11-01 15:04 UTC (permalink / raw)
  To: systemtap

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

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com

--- Comment #4 from Frank Ch. Eigler <fche at redhat dot com> ---
The way @cast(...,"<header>") works is that it compiles a baby .o file to
synthesize debuginfo for that header.  That .o file is then opened with
elfutils.  If elfutils lacks support for this arch, it'll impact @cast() the
same way it'll impact any other debuginfo/etc. analysis attempt.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tapsets/23827] Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>'
  2018-10-26  3:10 [Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>' gmoreira at gmail dot com
                   ` (3 preceding siblings ...)
  2018-11-01 15:04 ` fche at redhat dot com
@ 2018-11-08  5:14 ` gmoreira at gmail dot com
  2018-11-08  9:41 ` mark at klomp dot org
  2023-11-29 16:30 ` wcohen at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: gmoreira at gmail dot com @ 2018-11-08  5:14 UTC (permalink / raw)
  To: systemtap

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

--- Comment #5 from Gustavo Moreira <gmoreira at gmail dot com> ---
Created attachment 11386
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11386&action=edit
elfutils-0.174 MIPS patch

MIPS patch for the latest elfutils-0.174. Based on the Debian patch for
0.170-0.5

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tapsets/23827] Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>'
  2018-10-26  3:10 [Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>' gmoreira at gmail dot com
                   ` (4 preceding siblings ...)
  2018-11-08  5:14 ` gmoreira at gmail dot com
@ 2018-11-08  9:41 ` mark at klomp dot org
  2023-11-29 16:30 ` wcohen at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: mark at klomp dot org @ 2018-11-08  9:41 UTC (permalink / raw)
  To: systemtap

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

--- Comment #6 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Gustavo Moreira from comment #5)
> Created attachment 11386 [details]
> elfutils-0.174 MIPS patch
> 
> MIPS patch for the latest elfutils-0.174. Based on the Debian patch for
> 0.170-0.5

Please do submit this upstream following to CONTRIBUTING guidelines:
https://sourceware.org/git/?p=elfutils.git;a=blob_plain;f=CONTRIBUTING;hb=HEAD

Note that the copyright notice and license on these files seem wrong. The files
were probably copy/pasted from some older version of elfutils without updating
the copyright holder and adopting the new license. If possible please track
down the original authors of this patch and get their Signed-Off-By.

It would also be useful to include comments about the standard ABI documents
that were followed for this backend.

And please do mention the results from make check to see if there are still
testcases failing.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tapsets/23827] Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>'
  2018-10-26  3:10 [Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>' gmoreira at gmail dot com
                   ` (5 preceding siblings ...)
  2018-11-08  9:41 ` mark at klomp dot org
@ 2023-11-29 16:30 ` wcohen at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: wcohen at redhat dot com @ 2023-11-29 16:30 UTC (permalink / raw)
  To: systemtap

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

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
                 CC|                            |wcohen at redhat dot com
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #7 from William Cohen <wcohen at redhat dot com> ---
Don't have any access to MIPS machines, so it is unlikely that we will be able
to address this.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-29 16:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26  3:10 [Bug tapsets/23827] New: Systemtap 3.3 - mipsel - semantic error: type definition 'task_struct' not found in 'kernel<linux/sched.h>' gmoreira at gmail dot com
2018-11-01 13:56 ` [Bug tapsets/23827] " dsmith at redhat dot com
2018-11-01 14:01 ` mark at klomp dot org
2018-11-01 14:17 ` gmoreira at gmail dot com
2018-11-01 15:04 ` fche at redhat dot com
2018-11-08  5:14 ` gmoreira at gmail dot com
2018-11-08  9:41 ` mark at klomp dot org
2023-11-29 16:30 ` wcohen at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).