This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Resource leak or dead lock in the function task_dentry_path?
- From: Arkady <larytet at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Thu, 26 Jan 2017 19:11:52 +0200
- Subject: Re: Resource leak or dead lock in the function task_dentry_path?
- Authentication-results: sourceware.org; auth=none
- References: <CANA-60p1wXeADRdpSohbQU7Gz=SVm7XPS_pNzUPn00D0nM-GoQ@mail.gmail.com>
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