Resource leak or dead lock in the function task_dentry_path?
Arkady
larytet@gmail.com
Thu Jan 26 17:12:00 GMT 2017
Update.
Apparently task_cwd_path() is an evil. This modification also causes the failure
function task_cwd_full_path(pid)
{
task = task_current()
path = task_cwd_path(task)
return path
}
On Thu, Jan 26, 2017 at 5:31 PM, Arkady <larytet@gmail.com> wrote:
> Hi,
>
> I have the following script
>
> function task_cwd_full_path(pid)
> {
> task = task_current()
> path = task_cwd_path(task)
> s = fullpath_struct_path(path)
> return s
> }
>
> global PATHS%;
>
> probe kernel.function("do_execve")
> {
> s = task_cwd_full_path(pid())
> PATHS[tid()] = s
> }
>
> probe syscall.fchdir.return
> {
> s = task_cwd_full_path(pid())
> PATHS[tid()] = s
> }
>
> global Tick;
>
> probe begin
> {
> Tick = 0;
> }
>
> probe timer.sec(1)
> {
> Tick = Tick + 1
> printf("Time=%4u\n", Tick)
> }
>
> I run the following loop in the shell
>
> sudo find / -name '*' -type f -exec stat {} \;
>
> I am getting "find: cannot fork: Resource temporarily unavailable" in
> ~60s on ubuntu 4.4.0-59
>
> What am I missing?
>
> Thanks
More information about the Systemtap
mailing list