This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Resource leak or dead lock in the function task_dentry_path?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]