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.