fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
cbzx has quit [Ping timeout: 240 seconds]
drsmith has left #systemtap [#systemtap]
cbzx has joined #systemtap
hpt has joined #systemtap
cbzx has quit [Ping timeout: 240 seconds]
brolley has joined #systemtap
brolley has left #systemtap [#systemtap]
wakatana2 has left #systemtap [#systemtap]
sfink has quit [Ping timeout: 240 seconds]
bchrisman has quit [Read error: Connection reset by peer]
wmealing has joined #systemtap
bchrisman has joined #systemtap
<wmealing> if one does something similar to this
<wmealing> stap -L 'kernel.function("vfs_read")'
<wmealing> i dont get back the local vars at that point
<wmealing> like this
<wmealing> kernel.function("vfs_read@fs/read_write.c:277") $file:struct file* $buf:char* $count:size_t $pos:loff_t*
<wmealing> it works for kernel functions..
<wmealing> but not for module functions.. am i doing it wrong ?
<wmealing> kernel.function("vfs_read@fs/read_write.c:408") $file:struct file* $buf:char* $count:size_t $pos:loff_t*
<wmealing> oops
<wmealing> tap -L 'module("fuse").function("fuse_fill_write_pages")'
<wmealing> module("fuse").function("fuse_fill_write_pages@fs/fuse/file.c:955")
<wmealing> is that expected, am i doing something wrong ?
<wmealing> i also tried inspecting params..
<wmealing> Exec stupid2 => fuse_fill_write_pages
<wmealing> Params pos=? ii=? mapping=? req=?
<wmealing> so it doesn't seem to be able to resolve it in a probe either
<wmealing> why do i have the feeling this ends up being, a run the kernel debug
scox has joined #systemtap
cbzx has joined #systemtap
cbzx has quit [Ping timeout: 250 seconds]
sfink has joined #systemtap
sfink has quit [Read error: No route to host]
cbzx has joined #systemtap
cbzx has quit [Ping timeout: 272 seconds]
<irker248> systemtap: fche systemtap.git:refs/heads/master * release-2.9-185-gb1d1725 / man/error::pass2.7stap: man error::pass2: mention prologue-searching for unavailable $context http://tinyurl.com/jcwftyp
<fche> wmealing, good question; it should work, if the module debuginfo is as available as the kernel's is
<fche> fwiw stap -L 'module("fuse").function("*")' here on f22 x86-64 works fine
<fche> incl. for that particular function
<fche> so wade, what kernel/stap versions were you using?
<fche> (see also man error::reporting)
sfink has joined #systemtap
<wmealing> it is
<wmealing> [root@unused-9-133 modules]# rpm -ql kernel-debuginfo |grep fuse.ko
<wmealing> /usr/lib/debug/lib/modules/3.10.0-327.el7.x86_64/kernel/fs/fuse/fuse.ko.debug
<fche> ok so rhel7
<wmealing> yes
<wmealing> i can get you shell if requried
<wmealing> required
<fche> sure, for a quick look around
<fche> is this an inline function by the way?
<wmealing> doesn't seem to be, i'll just check
<wmealing> see internal irc msg
<wmealing> for ip / l / p
<fche> stap -L 'module("fuse").function("fuse_fill_write_pages").*'
<fche> module("fuse").function("fuse_fill_write_pages@fs/fuse/file.c:955").callee("pagefault_enable@include/linux/uaccess.h:26")
<fche> module("fuse").function("fuse_fill_write_pages@fs/fuse/file.c:955").inline
<fche> so yeah, inlined by gcc, probably related to being called only once
* wmealing nods
<wmealing> damn
<fche> looking at the debuginfo, some location data is available for some of those variables, but not at the entry pc
<fche> it might be worthwhile adding that to the BZ (incl. readelf -w dump of the .ko.debug); the compiler folks like to see preprocessed source + gcc command line, but that's not trivially available
<fche> try a statement probe by source file:line
<fche> see also [man error::dwarf]
<wmealing> righto
<wmealing> this will be the first time ive done that
<fche> yeah
<wmealing> this would be module.statement(""fuse_fill_write_pages@fs/fuse/file.c:955")
<fche> I'd use a line range to see what works
<wmealing> or prod the line directly that i'm intrested in
<wmealing> ok
<fche> ... but on your box I'm having trouble having any of them
<fche> (the line directly would be ideal)
<wmealing> please ignore the exploits in /root .. they are not there.
<fche> stap -L 'module("fuse").statement("*@file.c:955-1050")' <-- e.g
<fche> ls -l /root
<fche> /root/make-money-fast.txt
<wmealing> heh
ananth has joined #systemtap
cbzx has joined #systemtap
cbzx has quit [Read error: Connection reset by peer]
naveen has joined #systemtap
ego has joined #systemtap
srikar_away is now known as srikar
nkambo has quit [Ping timeout: 250 seconds]
nkambo has joined #systemtap
nkambo has quit [Ping timeout: 240 seconds]
nkambo has joined #systemtap
ananth has quit [Ping timeout: 272 seconds]
lorddoskias has left #systemtap [#systemtap]
ananth has joined #systemtap
naveen has quit [Ping timeout: 272 seconds]
irker248 has quit [Quit: transmission timeout]
naveen has joined #systemtap
<wmealing> fche: still awake ?
<wmealing> i had an idea
<wmealing> and i wanted to run it past you
mjw has quit [Quit: Leaving]
naveen has quit [Ping timeout: 272 seconds]
ego has quit [Ping timeout: 240 seconds]
naveen has joined #systemtap
hpt has quit [Ping timeout: 256 seconds]
ananth has quit [Quit: Leaving]
hpt has joined #systemtap
ego has joined #systemtap
hpt has quit [Ping timeout: 250 seconds]
mjw has joined #systemtap
cbzx has joined #systemtap
pfallenop has quit [Ping timeout: 240 seconds]
ego has quit [Ping timeout: 250 seconds]
pfallenop has joined #systemtap
drsmith has joined #systemtap
cbzx has quit [Ping timeout: 256 seconds]
ego has joined #systemtap
pfallenop has quit [Remote host closed the connection]
pfalleno1 has joined #systemtap
ego has quit [Ping timeout: 272 seconds]
wcohen has quit [Ping timeout: 240 seconds]
lorddoskias has joined #systemtap
<lorddoskias> if i set a probe on return to a function, do i have access to the local variables defined in the function? (provided that they are defined at the top of the function and not some inner block)? since stap -L doesn't show the local variables
ego has joined #systemtap
groleo has quit [Quit: Leaving.]
<mjw> lorddoskias, no, because when the return probe hits you already left the function.
<lorddoskias> right, so i jus tplaced a .statement probe
<mjw> yes, that should work
<lorddoskias> and how can I use defines from .h files or enums for example?
<lorddoskias> because right now i'm using the raw numbers of the define? does gcc preserve such debug information?
<lorddoskias> ls
ego has quit [Ping timeout: 256 seconds]
<mjw> gcc might preserve some if using -g3, but stap won't see the defines. Maybe it should. But you can use "guru mode" -g and include the .h file to get access to them sometimes.
nkambo has quit [Ping timeout: 272 seconds]
<lorddoskias> mjw: which part of the documentation discusses this aspect e.g. referring to c defines within stp script?
<mjw> I don't immediately know.
<mjw> You can find some examples in some of the standard tapsets e.g. syscalls_aux.stp
<mjw> but those are all kernel related
<mjw> it might actually not be that easy for user space...
<lorddoskias> i'm interested in kernelspace in fact
<lorddoskias> cool. will check this out
wcohen has joined #systemtap
mbenitez has joined #systemtap
mbenitez has quit [Changing host]
mbenitez has joined #systemtap
jlebon has quit [Ping timeout: 245 seconds]
jlebon has joined #systemtap
srikar is now known as srikar_away
srikar_away is now known as srikar
tromey has joined #systemtap
brolley has joined #systemtap
srikar is now known as srikar_away
srikar_away is now known as srikar
fLiPr3VeRsE has quit [Quit: Lost terminal]
lzap has quit [Ping timeout: 260 seconds]
<lorddoskias> i've setup a probe like so: probe kernel.statement("sys_umount@fs/namespace.c:1626") {
<lorddoskias> if ($retval != 0) {
<lorddoskias> printf("Failed due to first check\n");
<lorddoskias> if ($path->dentry != $path->mnt->mnt_root) {
<lorddoskias> printf("Failed due to mount being locked\n");
lzap has joined #systemtap
<lorddoskias> } else {
<lorddoskias> } else if ($mnt->mnt->mnt_flags & 0x800000) {
<lorddoskias> printf("Failed due to check_mnt\n");
<lorddoskias> }
<lorddoskias> }
<lorddoskias> }
<lorddoskias> and when i run my stap script it says: semantic error: unable to find local 'retval', [man error::dwarf] dieoffset 0x189d6e8 in kernel, near pc 0xffffffff811c34bf in SyS_umount fs/namespace.c (alternatives: $ret, $name, $flags)): identifier '$retval' at loop.stp:43:6
<lorddoskias> source: if ($retval != 0) {
<lorddoskias> but retval is defined inside sys_umount in fs/namespace.c
<fche> the compiler may have nuked that variable at that location
<lorddoskias> ;\
<fche> perhaps try a range of line numbers in the vicitinity
<fche> or use a .return probe
<lorddoskias> but with the return probe i won't have access to the local variables necessary to perform the inner checks
<fche> $path and $mnt?
<lorddoskias> yep
<fche> you could have two cooperating probes; one to save $path/$mnt, and another one to process $return later
<lorddoskias> yeah, i thought of that just now :). basically stick them in global variables
<fche> yup, that's what they're for
<fche> (index them with [tid()])
<lorddoskias> i see
<lorddoskias> cool, thanks, will have a go at that. Still plenty of tricks to learn
<fche> yeah
<fche> we work in an imperfectly debuginfo'd world :)
Humble has quit [Ping timeout: 272 seconds]
<fche> or have you considered probing do_umount instead ?
<fche> or is the code jumping over that in your scenario?
<lorddoskias> already did, my failure doesn't go there, i.e. it fails in sys_umount
Humble has joined #systemtap
<lorddoskias> rather the failure I'm after happens in sys_umount
fLiPr3VeRsE has joined #systemtap
<fche> considered line-by-line tracing the function?
<lorddoskias> i'll give whythefails a go :D
nkambo has joined #systemtap
<fche> working?
naveen has quit [Ping timeout: 240 seconds]
cbzx has joined #systemtap
nkambo has quit [Ping timeout: 255 seconds]
naveen has joined #systemtap
naveen has quit [Quit: Leaving.]
wakatana2 has joined #systemtap
wakatana2 has quit [Max SendQ exceeded]
cbzx has quit [Ping timeout: 246 seconds]
cbzx has joined #systemtap
srikar is now known as srikar_away
wakatana2 has joined #systemtap
wakatana2 has quit [Max SendQ exceeded]
cbzx has quit [Ping timeout: 240 seconds]
mjw has quit [Quit: Leaving]
lzap has quit [Ping timeout: 246 seconds]
lzap has joined #systemtap
cbzx has joined #systemtap
mjw has joined #systemtap
modem has joined #systemtap
irker781 has joined #systemtap
<irker781> systemtap: jistone systemtap.git:refs/heads/master * release-2.9-186-g162267f / stapdyn/mutator.cxx: stapdyn: use the simpler DYNINST_9_1 macro for callback changes http://tinyurl.com/gm52r5o
cbzx has quit [Quit: Konversation terminated!]
bchrisman has quit [Ping timeout: 240 seconds]
tromey has quit [Quit: ERC (IRC client for Emacs 25.1.50.1)]
mbenitez has quit [Quit: Leaving]
modem has quit [Quit: Quitte]
drsmith has left #systemtap [#systemtap]
wcohen has quit [Ping timeout: 260 seconds]
bchrisman has joined #systemtap
brolley has left #systemtap [#systemtap]
wcohen has joined #systemtap
hpt has joined #systemtap
hpt has quit [Ping timeout: 255 seconds]
mjw has quit [Quit: Leaving]