[Dev] tizen-common kernel xattr memory leak

Janusz Kozerski j.kozerski at samsung.com
Thu Oct 9 09:20:39 GMT 2014


Hi Stephane,

I have a question about tizen-commom kernel. I think there is some issue in this
kernel. It looks like the kernel have a memory leak while writing to the xattrs.
Could you check it?

I've wrote a simple bash script-test. This command will add a random text value
to a "user.test" xattr for every file on a filesystem (these xattrs shoudn't
break anything):
---
find / \( -fstype rootfs -o -fstype ext4 \) -exec setfattr -n user.test1 -v
$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 228 | head -n 1) '{}' \;
2>/dev/null
---

Run in one console a 'top' command, look at the amount of free memory (keep this
'top' process alive). In other console run the script, and go back to the first
console and look at the memory counter. On my machine after running this script
there is about 100MB taken by the kernel (the "find" process itself takes no
more then a few MB). And even if the "find...' command is done the memory isn't
freed.

What is intreresting: no mather how many times I will run the commad - the
memory leak occurs only once.
We're trying to find the cause in kernel source.

(+ Tizen dev list)

BR,
Janusz Kozerski



More information about the Dev mailing list