public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/16514] New: String comparation doesn't work in kprocess.exec probe.
@ 2014-01-31 11:54 rhack at redhat dot com
  2014-01-31 12:14 ` [Bug tapsets/16514] " fche at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: rhack at redhat dot com @ 2014-01-31 11:54 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 16514
           Summary: String comparation doesn't work in kprocess.exec
                    probe.
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: rhack at redhat dot com

Created attachment 7378
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7378&action=edit
reproducer

Hi all.

I found bug in latest upstream version. Git commit id: 
4a3f6fd344985682cfef906b16b3303bec35c1e3

How to reproduce:

global cmd = "/bin/bash"

probe kprocess.exec {
    printf ("Match: %d\n", filename == cmd);
    if ( filename == cmd ) {
            printf ("We run /bin/bash\n");
    }
}

On new terminal run /bin/bash.

In my case is output:
[root@gremlinka systemtap]# ~/bin/stap --version
Systemtap translator/driver (version 2.5/0.158, commit
release-2.4-185-g4a3f6fd34498 + changes)
Copyright (C) 2005-2014 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBRPM LIBSQLITE3 NSS TR1_UNORDERED_MAP NLS JAVA
LIBVIRT LIBXML2

[root@gremlinka systemtap]# ~/bin/stap ~/reproducer.stp
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0

Old version:
[root@gremlinka systemtap]# stap --version
Systemtap translator/driver (version 2.4/0.158, rpm 2.4-1.fc20)
Copyright (C) 2005-2013 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBRPM LIBSQLITE3 NSS BOOST_SHARED_PTR
TR1_UNORDERED_MAP NLS DYNINST JAVA LIBVIRT LIBXML2

[root@gremlinka systemtap]# stap ~/reproducer.stp
Match: 1
We run /bin/bash
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0
Match: 0

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

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

* [Bug tapsets/16514] String comparation doesn't work in kprocess.exec probe.
  2014-01-31 11:54 [Bug tapsets/16514] New: String comparation doesn't work in kprocess.exec probe rhack at redhat dot com
@ 2014-01-31 12:14 ` fche at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: fche at redhat dot com @ 2014-01-31 12:14 UTC (permalink / raw)
  To: systemtap

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com
           Assignee|systemtap at sourceware dot org    |jlebon at redhat dot com

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
It looks like the new kprocess.exec doesn't supply all/any of the variables
extracted from the $context that the old one used to.

Robin, "stap --compatible=2.4 ..." should work around this problem.

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

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

end of thread, other threads:[~2014-01-31 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-31 11:54 [Bug tapsets/16514] New: String comparation doesn't work in kprocess.exec probe rhack at redhat dot com
2014-01-31 12:14 ` [Bug tapsets/16514] " 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).