inotify oops with wd == 4096
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Expired
|
Medium
|
|||
linux (Ubuntu) |
Fix Released
|
Medium
|
Andy Whitcroft | ||
Dapper |
Won't Fix
|
Undecided
|
Unassigned | ||
Hardy |
Fix Released
|
Undecided
|
Unassigned | ||
Intrepid |
Won't Fix
|
Undecided
|
Unassigned | ||
Jaunty |
Fix Released
|
Undecided
|
Unassigned | ||
Karmic |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Medium
|
Andy Whitcroft |
Bug Description
inotify_rm_watch() fails when you call it with watch descriptor 4096, even if this watch descriptor is valid.
it only ever happens with 4096. All other numbers work OK.
this is really bad because the watch remains in effect and when the process exits, you get this from the kernel:
[ 1097.904754] ------------[ cut here ]------------
[ 1097.904775] WARNING: at /build/
[ 1097.904782] Hardware name: 7448CTO
[ 1097.904787] inotify closing but id=0 for entry=ffff88006
[ 1097.904794] Modules linked in: binfmt_misc ppdev bridge stp bnep kvm_intel kvm nfsd lockd nfs_acl auth_rpcgss sunrpc snd_hda_
[ 1097.904917] Pid: 2949, comm: fail Tainted: G WC 2.6.31-16-generic #51~pre2-Ubuntu
[ 1097.904922] Call Trace:
[ 1097.904936] [<ffffffff8105e
[ 1097.904945] [<ffffffff8105e
[ 1097.904952] [<ffffffff81153
[ 1097.904962] [<ffffffff81273
[ 1097.904970] [<ffffffff81153
[ 1097.904979] [<ffffffff81151
[ 1097.904987] [<ffffffff81153
[ 1097.904996] [<ffffffff81151
[ 1097.905004] [<ffffffff81151
[ 1097.905012] [<ffffffff81153
[ 1097.905020] [<ffffffff81120
[ 1097.905027] [<ffffffff81120
[ 1097.905037] [<ffffffff8111c
[ 1097.905045] [<ffffffff81060
[ 1097.905052] [<ffffffff81060
[ 1097.905060] [<ffffffff81061
[ 1097.905069] [<ffffffff8106d
[ 1097.905077] [<ffffffff81061
[ 1097.905085] [<ffffffff8106f
[ 1097.905093] [<ffffffff8106d
[ 1097.905104] [<ffffffff81011
[ 1097.905115] [<ffffffff81529
[ 1097.905122] [<ffffffff8106c
[ 1097.905130] [<ffffffff8106c
[ 1097.905138] [<ffffffff81011
[ 1097.905146] [<ffffffff8106c
[ 1097.905154] [<ffffffff81012
[ 1097.905161] ---[ end trace e98b6c8990922934 ]---
[ 1097.905167] entry->group=(null) inode=(null) wd=4096
----
the kernel telling me "Probably leaking memory" is particularly scary.
i get this on the latest (stable) karmic kernel but i also get the same bug on the prerelease kernel from smb's PPA:
Linux marzipan 2.6.31-16-generic #51~pre2-Ubuntu SMP Thu Nov 12 14:47:25 UTC 2009 x86_64 GNU/Linux
i'll attach a test program that makes it happen pretty quickly.
Related branches
tags: | added: kernel-karmic |
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
Changed in linux: | |
status: | Unknown → In Progress |
Changed in linux (Ubuntu Intrepid): | |
status: | Confirmed → Won't Fix |
Changed in linux: | |
importance: | Unknown → Medium |
Changed in linux (Ubuntu Dapper): | |
status: | Confirmed → Won't Fix |
Changed in linux: | |
status: | In Progress → Expired |
Putting the test case in a loop and watching slabtop, I would confirm the memory leak.