public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* (Noob) What's the difference between task_pid(task) and new_pid?
@ 2009-02-09 10:50 Luis Fernando Muñoz Mejías
  2009-02-10 10:18 ` Josh Stone
  0 siblings, 1 reply; 4+ messages in thread
From: Luis Fernando Muñoz Mejías @ 2009-02-09 10:50 UTC (permalink / raw)
  To: systemtap

Hello, world!

I'm doing some toy SystemTap probes and I found a weird thing. I want
to log every process that is created on my system, so I wrote this
tiny probe:

************************************************************
# Provides relevant information when a process is created
probe process.create {
        printf ("Process %d spawns child %d under uid (%d:%d)\n",
                pid(), new_pid, uid(), euid());
}
************************************************************

It does what I want it to do, but after ~3 hours it crashes. Some
annoying testing gives me a very small message like this:

"failed to access to address 0xYYYYYY on kread(&(t->tgid))"

The message I write by memory, the statement causing the crash is
exactly that one.

On the other hand, the following version:

************************************************************
# Provides relevant information when a process is created
probe process.create {
        printf ("Process %d spawns a new child %d under uid (%d:%d)\n",
                tid(), task_pid(task), uid(), euid());
}
************************************************************

has been running for three days with no problems. So, what's the
difference? Is it a bug?

I'm using systemtap-0.7.2-2.el5.el5, as shipped with RHEL 5.2.

Thanks.
-- 
Luis Fernando Muñoz Mejías
Luis.Fernando.Munoz.Mejias@cern.ch

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

end of thread, other threads:[~2009-02-13 10:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-09 10:50 (Noob) What's the difference between task_pid(task) and new_pid? Luis Fernando Muñoz Mejías
2009-02-10 10:18 ` Josh Stone
2009-02-10 15:55   ` Luis Fernando Muñoz Mejías
2009-02-13 19:38   ` Luis Fernando Muñoz Mejías

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).