FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 07-24-2008, 11:48 PM
Christoph Höger
 
Default strace trap tool needed?

Hi,

a little tool came up to my mind today: How about the possibility to
strace a given binary upon execution and write the output to some file?
That could be easy to do (I've already roughly written the code down),
so I am not going to make a package of it.

To demonstrate my idea:
if you invoke the script like:

trap-strace /usr/bin/less -o /tmp/less.strace

after invoking less you cat /tmp/less.strace to see what was going on.

Does anyone else need such a tool?
If so, what package could collect it, and what constraints (language,
i/o, etc.) should it comply with?


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-24-2008, 11:56 PM
Dave Airlie
 
Default strace trap tool needed?

On Fri, 2008-07-25 at 01:48 +0200, Christoph Höger wrote:
> Hi,
>
> a little tool came up to my mind today: How about the possibility to
> strace a given binary upon execution and write the output to some file?
> That could be easy to do (I've already roughly written the code down),
> so I am not going to make a package of it.
>
> To demonstrate my idea:
> if you invoke the script like:
>
> trap-strace /usr/bin/less -o /tmp/less.strace
>
> after invoking less you cat /tmp/less.strace to see what was going on.
>
> Does anyone else need such a tool?
> If so, what package could collect it, and what constraints (language,
> i/o, etc.) should it comply with?
>

any reason

strace -o /tmp/less.strace /usr/bin/less

won't work?

Or did I miss something?

Dave.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-25-2008, 02:55 AM
John Reiser
 
Default strace trap tool needed?

> strace -o /tmp/less.strace /usr/bin/less

strace has obnoxious bugs, and the maintainer(s) have been slow to fix it,
or to make it useful in pipelines and shell scripts.
strace may lag behind the addition of new system calls in the kernel.

Applying strace can change the *semantics* of the executable,
in ways that have mattered to me. Sometimes the bug was fixed quickly:
http://bugzilla.redhat.com/show_bug.cgi?id=354261
Lockup on wait on exited child with exited child

but sometimes the bugs linger unfixed for years:
http://bugzilla.redhat.com/show_bug.cgi?id=162774
strace ignores int3 SIGTRAP
[open for 3 years]

http://bugzilla.redhat.com/show_bug.cgi?id=105371
RFE: add support to keep exit status of traced processes
[open almost 5 years]

--

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-25-2008, 07:56 AM
Caolan McNamara
 
Default strace trap tool needed?

On Thu, 2008-07-24 at 19:55 -0700, John Reiser wrote:
> > strace -o /tmp/less.strace /usr/bin/less
>
> strace has obnoxious bugs, and the maintainer(s) have been slow to fix it,
> or to make it useful in pipelines and shell scripts.
> strace may lag behind the addition of new system calls in the kernel.
>
> Applying strace can change the *semantics* of the executable,
> in ways that have mattered to me.

How about "ftrace" from the frysk suite, I've found that handy to e.g.
filter out only e.g. open calls and give a backtrace for each of them

C.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-25-2008, 11:20 AM
Christoph Höger
 
Default strace trap tool needed?

Am Freitag, den 25.07.2008, 09:56 +1000 schrieb Dave Airlie:
> On Fri, 2008-07-25 at 01:48 +0200, Christoph Höger wrote:
> > Hi,
> >
> > a little tool came up to my mind today: How about the possibility to
> > strace a given binary upon execution and write the output to some file?
> > That could be easy to do (I've already roughly written the code down),
> > so I am not going to make a package of it.
> >
> > To demonstrate my idea:
> > if you invoke the script like:
> >
> > trap-strace /usr/bin/less -o /tmp/less.strace
> >
> > after invoking less you cat /tmp/less.strace to see what was going on.
> >
> > Does anyone else need such a tool?
> > If so, what package could collect it, and what constraints (language,
> > i/o, etc.) should it comply with?
> >
>
> any reason
>
> strace -o /tmp/less.strace /usr/bin/less
>
> won't work?
>
> Or did I miss something?
>
> Dave.
>

well, strace starts the process itself, that is not always usefull.
Consider complex scripts or applications that fork-exec alot around.
Sometimes you (or, at least I ) just do not want the complete strace
with fork() or clone() but just the output of one particular binary in
the chain. My tool would set up a trap which invokes strace when the
binary is executed (basically you could do that by replacing the binary
with a script wrapper).
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-31-2008, 08:14 AM
Tim Waugh
 
Default strace trap tool needed?

On Fri, 2008-07-25 at 01:48 +0200, Christoph Höger wrote:
> a little tool came up to my mind today: How about the possibility to
> strace a given binary upon execution and write the output to some file?
[...]
> Does anyone else need such a tool?

Yes! Being able to do this for CUPS backends and filters (for example)
would be invaluable.

> If so, what package could collect it, and what constraints (language,
> i/o, etc.) should it comply with?

Don't know.

Tim.
*/

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 01:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org