public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/22000] New: Unable to read $path in chown_common on CentOS 7 due to lack of DW_OP_GNU_parameter_ref support
@ 2017-08-23 22:09 zerg2000-sourceware.org at astral dot org.pl
  2017-08-25  1:50 ` [Bug translator/22000] " zerg2000-sourceware.org at astral dot org.pl
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zerg2000-sourceware.org at astral dot org.pl @ 2017-08-23 22:09 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 22000
           Summary: Unable to read $path in chown_common on CentOS 7 due
                    to lack of DW_OP_GNU_parameter_ref support
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: zerg2000-sourceware.org at astral dot org.pl
  Target Milestone: ---

Created attachment 10363
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10363&action=edit
stap-report script output

SystemTap returns error listed below for the following code on CentOS 7 (booth
default stap package and git version):
----------
probe kernel.function("chown_common") {
    printf("%x\n", $path->dentry)
}
----------

[Default CentOS 7 package] Systemtap translator/driver (version 3.0/0.166, rpm
3.0-7.el7):
----------
semantic error: while processing probe
kernel.function("chown_common@fs/open.c:556") from:
kernel.function("chown_common")

semantic error: unrecognized operation in DWARF expression [0] at 0 (0xfa:
65037, 0): identifier '$path' at ./test.stp:4:20
        dieoffset: 0x1af00cd from
/usr/lib/debug/lib/modules/3.10.0-514.26.2.el7.x86_64/vmlinux
        function: chown_common at fs/open.c:556
        source:     printf("%x\n", $path->dentry)
                                   ^

Pass 2: analysis failed.  [man error::pass2]
----------


[GIT version] Systemtap translator/driver (version 3.2/0.166, commit
release-3.1-234-g51987fd93657):
----------
semantic error: while processing probe
kernel.function("chown_common@fs/open.c:556") from:
kernel.function("chown_common")

semantic error: unhandled DW_OP operation in DWARF expression [0] at 0 (250:
65037, 0): identifier '$path' at ./test.stp:4:20
        source:     printf("%x\n", $path->dentry)
                                   ^

Pass 2: analysis failed.  [man error::pass2]
----------

Problematic DWARF atom is 0xfa (DW_OP_GNU_parameter_ref).

The same probe works fine for chmod_common, which uses the same $path struct.

Everything was installed from base CentOS 7 repository, with exception for
additional stap version in /opt/systemtap, which was pulled from git.

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

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

* [Bug translator/22000] Unable to read $path in chown_common on CentOS 7 due to lack of DW_OP_GNU_parameter_ref support
  2017-08-23 22:09 [Bug translator/22000] New: Unable to read $path in chown_common on CentOS 7 due to lack of DW_OP_GNU_parameter_ref support zerg2000-sourceware.org at astral dot org.pl
@ 2017-08-25  1:50 ` zerg2000-sourceware.org at astral dot org.pl
  2017-08-26  3:20 ` zerg2000-sourceware.org at astral dot org.pl
  2017-09-12 17:10 ` dsmith at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: zerg2000-sourceware.org at astral dot org.pl @ 2017-08-25  1:50 UTC (permalink / raw)
  To: systemtap

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

--- Comment #1 from Bartosz Kwitniewski <zerg2000-sourceware.org at astral dot org.pl> ---
I have tried to use Jprobes directly for chown_common and I have received
kernel paging fault while accessing path->dentry->d_inode, which is used by
chown_common itself.

Jprobes, just like systemtap works fine with chmod_common. I have noticed this
in /proc/kallsyms:
ffffffff811fc3a0 t chmod_common
ffffffff811fc1f0 t chown_common.isra.15

It seems chown_common is optimized by gcc -fipa-sra flag and it is causing
problems in Jprobes directly, so it might not be related to systemtap itself.

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

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

* [Bug translator/22000] Unable to read $path in chown_common on CentOS 7 due to lack of DW_OP_GNU_parameter_ref support
  2017-08-23 22:09 [Bug translator/22000] New: Unable to read $path in chown_common on CentOS 7 due to lack of DW_OP_GNU_parameter_ref support zerg2000-sourceware.org at astral dot org.pl
  2017-08-25  1:50 ` [Bug translator/22000] " zerg2000-sourceware.org at astral dot org.pl
@ 2017-08-26  3:20 ` zerg2000-sourceware.org at astral dot org.pl
  2017-09-12 17:10 ` dsmith at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: zerg2000-sourceware.org at astral dot org.pl @ 2017-08-26  3:20 UTC (permalink / raw)
  To: systemtap

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

--- Comment #2 from Bartosz Kwitniewski <zerg2000-sourceware.org at astral dot org.pl> ---
On my CentOS 7 system I have recompiled distribution kernel with -fno-ipa-sra
and probes attach successfully to chown_common.

On the following system:
---
Linux archlinux 4.12.8-2-ARCH #1 SMP PREEMPT Sat Aug 26 02:19:38 UTC 2017
x86_64 GNU/Linux
gcc version 7.1.1 20170630 (GCC) 
Systemtap translator/driver (version 3.1/0.169, non-git sources)
---

SystemTap gives the following error for may_linkat, which is ipa-sra optimized:
---
semantic error: while processing probe
kernel.function("may_linkat@fs/namei.c:999") from:
kernel.function("may_linkat")

semantic error: failed to retrieve location attribute for 'link' [man
error::dwarf]: identifier '$link' at ./test.stp:4:20
        dieoffset: 0x27bcbf4 from /lib/modules/4.12.8-2-ARCH/build/vmlinux
        function: may_linkat at fs/namei.c:999
        source:     printf("%x\n", $link->dentry)
---

but it works fine with proc_getdriver (also ipa-sra optimized).

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

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

* [Bug translator/22000] Unable to read $path in chown_common on CentOS 7 due to lack of DW_OP_GNU_parameter_ref support
  2017-08-23 22:09 [Bug translator/22000] New: Unable to read $path in chown_common on CentOS 7 due to lack of DW_OP_GNU_parameter_ref support zerg2000-sourceware.org at astral dot org.pl
  2017-08-25  1:50 ` [Bug translator/22000] " zerg2000-sourceware.org at astral dot org.pl
  2017-08-26  3:20 ` zerg2000-sourceware.org at astral dot org.pl
@ 2017-09-12 17:10 ` dsmith at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: dsmith at redhat dot com @ 2017-09-12 17:10 UTC (permalink / raw)
  To: systemtap

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

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |dsmith at redhat dot com
         Resolution|---                         |DUPLICATE

--- Comment #3 from David Smith <dsmith at redhat dot com> ---
Unfortunately we still don't have DW_OP_GNU_* support. We've just got to find
the time to implement it.

*** This bug has been marked as a duplicate of bug 16596 ***

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

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

end of thread, other threads:[~2017-09-12 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 22:09 [Bug translator/22000] New: Unable to read $path in chown_common on CentOS 7 due to lack of DW_OP_GNU_parameter_ref support zerg2000-sourceware.org at astral dot org.pl
2017-08-25  1:50 ` [Bug translator/22000] " zerg2000-sourceware.org at astral dot org.pl
2017-08-26  3:20 ` zerg2000-sourceware.org at astral dot org.pl
2017-09-12 17:10 ` dsmith 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).