The systemtap task_cwd_path() function results in an in-kernel memory leak

Solution Verified - Updated -

Issue

  • The task_cwd_path() function in systemtap 3.0 is causing a memory leak in the kernel. The size of KernelStack increase as processes are executed in /proc/meminfo with a task_cwd_path() using systemtap script in use:
$ while [ 1 ]; do grep KernelStack: /proc/meminfo; sleep 1;  done
KernelStack:       89024 kB
KernelStack:       89040 kB
KernelStack:       89088 kB
KernelStack:       89552 kB
KernelStack:       89632 kB
KernelStack:       89712 kB
<snip>

Environment

  • Red Hat Enterprise Linux 7.3
    • systemtap-3.0-7.el7.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content