public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/17362] New: no script-level local variables available in F20's kernel.function("do_execve")
@ 2014-09-08 15:15 mcermak at redhat dot com
  2014-09-08 15:34 ` [Bug runtime/17362] " fche at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2014-09-08 15:15 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 17362
           Summary: no script-level local variables available in F20's
                    kernel.function("do_execve")
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com

No script-level local variables available in F20's
kernel.function("do_execve"). This changed between 3.13.9-200.fc20 and
3.15.10-201.fc20:

# uname -r; rpm -q systemtap
3.13.9-200.fc20.x86_64
systemtap-2.7-1.mcermak.e454243.fc20.x86_64
# stap -L 'kernel.function("do_execve")'
kernel.function("do_execve@fs/exec.c:1575") $filename:char const* $__argv:char
const* const* $__envp:char const* const*
#
# stap -e 'probe kernel.function("do_execve"){log(user_string($__argv[0]))}' -c
/bin/true
/bin/true
#

# uname -r; rpm -q systemtap
3.15.10-201.fc20.x86_64
systemtap-2.7-1.mcermak.e454243.fc20.x86_64
# stap -L 'kernel.function("do_execve")'
kernel.function("do_execve@fs/exec.c:1547")
#
# stap -e 'probe kernel.function("do_execve"){log(user_string($__argv[0]))}' -c
/bin/true
semantic error: failed to retrieve location attribute for '__argv' [man
error::dwarf]: identifier '$__argv' at <input>:1:52
        dieoffset: 0x186983f from unknown debug file for kernel
        function: do_execve at fs/exec.c:1553 inlined by SYSC_execve at
fs/exec.c:1607 inlined by SyS_execve at fs/exec.c:1602
        source: probe
kernel.function("do_execve"){log(user_string($__argv[0]))}
                                                                   ^

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


The function declaration didn't change significantly:
=====
# grep -A 8 '^int do_execve'
/usr/src/debug/kernel-3.13.fc20/linux-3.13.9-200.fc20.x86_64/fs/exec.c
int do_execve(const char *filename,
        const char __user *const __user *__argv,
        const char __user *const __user *__envp)
{
        struct user_arg_ptr argv = { .ptr.native = __argv };
        struct user_arg_ptr envp = { .ptr.native = __envp };
        return do_execve_common(filename, argv, envp);
}

# grep -A 8 '^int do_execve'
/usr/src/debug/kernel-3.15.fc20/linux-3.15.10-201.fc20.x86_64/fs/exec.c
int do_execve(struct filename *filename,
        const char __user *const __user *__argv,
        const char __user *const __user *__envp)
{
        struct user_arg_ptr argv = { .ptr.native = __argv };
        struct user_arg_ptr envp = { .ptr.native = __envp };
        return do_execve_common(filename, argv, envp);
}
#
=====

This breaks systemtap.base/pointer_array.exp testcase on newer f20 kernels.

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

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

* [Bug runtime/17362] no script-level local variables available in F20's kernel.function("do_execve")
  2014-09-08 15:15 [Bug runtime/17362] New: no script-level local variables available in F20's kernel.function("do_execve") mcermak at redhat dot com
@ 2014-09-08 15:34 ` fche at redhat dot com
  2014-09-08 18:38 ` jistone at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2014-09-08 15:34 UTC (permalink / raw)
  To: systemtap

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

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

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

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
Chances are this is related to
https://bugzilla.redhat.com/show_bug.cgi?id=1126580

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

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

* [Bug runtime/17362] no script-level local variables available in F20's kernel.function("do_execve")
  2014-09-08 15:15 [Bug runtime/17362] New: no script-level local variables available in F20's kernel.function("do_execve") mcermak at redhat dot com
  2014-09-08 15:34 ` [Bug runtime/17362] " fche at redhat dot com
@ 2014-09-08 18:38 ` jistone at redhat dot com
  2014-09-09 15:19 ` mcermak at redhat dot com
  2014-10-06 21:12 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: jistone at redhat dot com @ 2014-09-08 18:38 UTC (permalink / raw)
  To: systemtap

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

Josh Stone <jistone at redhat dot com> changed:

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

--- Comment #2 from Josh Stone <jistone at redhat dot com> ---
If you use a script like:

  probe f = kernel.function("do_execve"){}
  probe f.call, f.inline { println($$parms) }

in pass-2 output you'll see:

  kernel.function("do_execve@fs/exec.c:1547").call /* pc=_stext+0x1edf38 */ /*
<- kernel.function("do_execve@fs/exec.c:1547").call */
  println(sprintf("filename=%#x __argv=%#x __envp=%#x",
_dwarf_tvar_get_filename_0(), _dwarf_tvar_get___argv_1(),
_dwarf_tvar_get___envp_2()))

  kernel.function("do_execve@fs/exec.c:1547").inline /* pc=_stext+0x1ee16f */
/* <- kernel.function("do_execve@fs/exec.c:1547").inline */
  println(sprintf("__envp=? __argv=? filename=?"))

So there's a full .call function which has all the parameters available, and an
.inline instance which has none of them.


(In reply to Frank Ch. Eigler from comment #1)
> Chances are this is related to
> https://bugzilla.redhat.com/show_bug.cgi?id=1126580

The producer string does indeed include -fno-var-tracking-assignments.

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

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

* [Bug runtime/17362] no script-level local variables available in F20's kernel.function("do_execve")
  2014-09-08 15:15 [Bug runtime/17362] New: no script-level local variables available in F20's kernel.function("do_execve") mcermak at redhat dot com
  2014-09-08 15:34 ` [Bug runtime/17362] " fche at redhat dot com
  2014-09-08 18:38 ` jistone at redhat dot com
@ 2014-09-09 15:19 ` mcermak at redhat dot com
  2014-10-06 21:12 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2014-09-09 15:19 UTC (permalink / raw)
  To: systemtap

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

--- Comment #3 from Martin Cermak <mcermak at redhat dot com> ---
Very similar issue affecting at_var.exp. Old kernel:

=====
# rpm -q systemtap; uname -r
systemtap-2.7-1.mcermak.e454243.fc20.x86_64
3.13.9-200.fc20.x86_64
# cat systemtap.base/at_var.c
#include <sys/time.h>

struct foo
{
  int bar;
};

static struct foo foo;

void sub(const char *file)
{
  struct timeval times[2];
  times[0].tv_sec = 1;
  times[0].tv_usec = 2;
  times[1].tv_sec = 3;
  times[1].tv_usec = 4;
  utimes (file, times);
  foo.bar -= 2; /* 40 */
}

int
main (int argc, char **argv)
{
  foo.bar = 41 + argc; /* 42 */
  sub(argv[0]);
  return 0;
}
# gcc -g systemtap.base/at_var.c
# stap -e 'probe kernel.function("SYSC_utimes") {println($utimes$$,
$utimes[1]$$, @var("utimes")$$, @var("utimes")[1]$$)}' -c ./a.out 
{.tv_sec=1, .tv_usec=2}{.tv_sec=3, .tv_usec=4}{.tv_sec=1,
.tv_usec=2}{.tv_sec=3, .tv_usec=4}
#
=====

new kernel:

=====
# rpm -q systemtap; uname -r
systemtap-2.7-1.mcermak.e454243.fc20.x86_64
3.15.10-201.fc20.x86_64
# gcc -g systemtap.base/at_var.c
# stap -e 'probe kernel.function("SYSC_utimes") {println($utimes$$,
$utimes[1]$$, @var("utimes")$$, @var("utimes")[1]$$)}' -c ./a.out
{.tv_sec=?, .tv_usec=?}{.tv_sec=?, .tv_usec=?}{.tv_sec=?,
.tv_usec=?}{.tv_sec=?, .tv_usec=?}
#
=====

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

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

* [Bug runtime/17362] no script-level local variables available in F20's kernel.function("do_execve")
  2014-09-08 15:15 [Bug runtime/17362] New: no script-level local variables available in F20's kernel.function("do_execve") mcermak at redhat dot com
                   ` (2 preceding siblings ...)
  2014-09-09 15:19 ` mcermak at redhat dot com
@ 2014-10-06 21:12 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2014-10-06 21:12 UTC (permalink / raw)
  To: systemtap

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Frank Ch. Eigler <fche at redhat dot com> ---
There is no systemtap bug here; the kernel compilation simply is
slightly (mis)configured to lack full debuginfo.

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

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

end of thread, other threads:[~2014-10-06 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 15:15 [Bug runtime/17362] New: no script-level local variables available in F20's kernel.function("do_execve") mcermak at redhat dot com
2014-09-08 15:34 ` [Bug runtime/17362] " fche at redhat dot com
2014-09-08 18:38 ` jistone at redhat dot com
2014-09-09 15:19 ` mcermak at redhat dot com
2014-10-06 21:12 ` fche 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).