public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/24199] New: misleading error when providing wrong printf format for pid().
@ 2019-02-09 18:08 khaled.gnu at gmail dot com
  2019-02-09 18:14 ` [Bug tapsets/24199] " khaled.gnu at gmail dot com
  2019-02-15 19:51 ` fche at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: khaled.gnu at gmail dot com @ 2019-02-09 18:08 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 24199
           Summary: misleading error when providing wrong printf format
                    for pid().
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: khaled.gnu at gmail dot com
  Target Milestone: ---

[khaled@codex ~ ]$ uname -r && stap --version
4.18.16-300.fc29.x86_64
Systemtap translator/driver (version 4.1/0.174, commit
release-4.0-102-g1832b8f51819 + changes)
Copyright (C) 2005-2019 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.18 ... 5.0-rc3
enabled features: BPF PYTHON2 PYTHON3 LIBSQLITE3 LIBXML2 NLS


printing the pid() with the wrong format "%s" results in a tapset error.


[khaled@codex ~ ]$ cat file_list.stp 
#!/usr/local/bin/stap -v

probe vfs.{read,write,open} {

        printf("%s %s %s\n", execname(), pid(), pathname);

}


[khaled@codex ~ ]$ stap -v file_list.stp 
Pass 1: parsed user script and 484 library scripts using
310436virt/87072res/6324shr/81184data kb, in 170usr/30sys/211real ms.
semantic error: unknown type in dereference: operator '->' at
/usr/local/share/systemtap/tapset/linux/dev.stp:73:11
        source:         hd = bdev->bd_disk
                                 ^

Pass 2: analyzed script: 3 probes, 72 functions, 8 embeds, 0 globals using
528096virt/306376res/7892shr/298844data kb, in 1650usr/440sys/2094real ms.
Pass 2: analysis failed.  [man error::pass2]

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

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

* [Bug tapsets/24199] misleading error when providing wrong printf format for pid().
  2019-02-09 18:08 [Bug tapsets/24199] New: misleading error when providing wrong printf format for pid() khaled.gnu at gmail dot com
@ 2019-02-09 18:14 ` khaled.gnu at gmail dot com
  2019-02-15 19:51 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: khaled.gnu at gmail dot com @ 2019-02-09 18:14 UTC (permalink / raw)
  To: systemtap

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

Khaled Moussa <khaled.gnu at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |khaled.gnu at gmail dot com

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

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

* [Bug tapsets/24199] misleading error when providing wrong printf format for pid().
  2019-02-09 18:08 [Bug tapsets/24199] New: misleading error when providing wrong printf format for pid() khaled.gnu at gmail dot com
  2019-02-09 18:14 ` [Bug tapsets/24199] " khaled.gnu at gmail dot com
@ 2019-02-15 19:51 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2019-02-15 19:51 UTC (permalink / raw)
  To: systemtap

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |fche at redhat dot com
         Resolution|---                         |FIXED

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
After commit d36f6fe, we get:

./stap -p2 -e '                     
probe vfs.read {  
        printf("%s %s %s\n", execname(), pid(), pathname);
}'
semantic error: unknown type in dereference: operator '->' at
...../tapset/linux/dev.stp:73:11
        source:         hd = bdev->bd_disk
                                 ^

semantic error: type mismatch: expected string but found long: identifier 'pid'
at <input>:3:42
        source:         printf("%s %s %s\n", execname(), pid(), pathname);
                                                         ^

Pass 2: analysis failed.  [man error::pass2]
Number of similar error messages suppressed: 30.
Rerun with -v to see them.


So the second message is no longer hidden.
Suppressing the first message (which is a real problem but one that doesn't
impact this end-user script) will be tackled under separate cover.

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

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

end of thread, other threads:[~2019-02-15 19:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-09 18:08 [Bug tapsets/24199] New: misleading error when providing wrong printf format for pid() khaled.gnu at gmail dot com
2019-02-09 18:14 ` [Bug tapsets/24199] " khaled.gnu at gmail dot com
2019-02-15 19:51 ` 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).