lkml.org 
[lkml]   [2008]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: inotify_add_watch() returning ENOSPC in 2.6.24 [watch descriptor leak?]
    Hi,

    On Feb 6, 2008 4:40 PM, Clem Taylor <clem.taylor@gmail.com> wrote:
    > I also tested on a 2.6.20 x86 desktop machine. It took ~8k iterations
    > to fail, which matched max_user_watches. Once the program fails, it
    > will fail right away if it is re-run.

    Yeah, I had the same results, and it fails afterwards because it
    reaches the maximum number of watches per user.

    > Attached is a simple example that shows off the problem. On a system
    > with a problem, it will only run for about
    > fs.inotify.max_user_watches iterations. If everything is working, it
    > should run forever.

    Ok, I had a go with it and found the problem. We weren't releasing
    one-shot watches because the test for them was wrong. We're using the
    event's mask to test for one-shot watches when we should've been using
    the watch's mask.

    Patch against latest Linus git repo attached.

    Regards,

    -- Ulisses
    [unhandled content-type:application/octet-stream]
    \
     
     \ /
      Last update: 2008-02-07 19:57    [W:4.044 / U:0.400 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site