[Bug 1101666] Re: inotify fd leak
On a little used desktop the script from comment 25 failed after 117 iterations, on the principal desktop, which has seemed slow recently, the script failed on the first iteration attempt! Both machines running kernel 3.5.0-22 uname -a Linux ionman 3.5.0-22-generic #34-Ubuntu SMP Tue Jan 8 21:47:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux The new kernel 3.5.0-23 behaves correctly against the script. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
Ok I posted a new fix here with the proper patch set: http://people.canonical.com/~arges/lp1101666.1/ You should follow the new bug 1110605, where I have the test cases posted. Let me know if there are any issues when testing on P/Q. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
I see this bug too on real hardware: Linux epib-genstat3 3.2.0-36-generic #57-Ubuntu SMP Tue Jan 8 21:44:52 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux This is on a server and showed up after 9 days of uptime. Furthermore, it doesn't only show up when running tail -f, but also keeps libvirt-bin in a restart loop. /var/log/libvirt/libvirtd.log keeps repeating (with a different pid each time of course): 2013-01-30 13:43:35.046+: 25431: info : libvirt version: 0.9.8 2013-01-30 13:43:35.046+: 25431: error : umlStartup:471 : cannot initialize inotify 2013-01-30 13:43:35.046+: 25431: error : virStateInitialize:854 : Initialization of UML state driver failed 2013-01-30 13:43:35.046+: 25431: error : daemonRunStateInit:1157 : Driver state initialization failed Unfortunately, since this is a production server I can't easily reboot with a new kernel... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
Well, for now running sysctl fs.inotify.max_user_instances=256 to increase the maximum number of instances (was 128) helps. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
The patches that cause this issue were reverted. ** Changed in: linux (Ubuntu) Status: Confirmed = Fix Released ** Changed in: linux (Ubuntu Precise) Status: In Progress = Fix Committed ** Changed in: linux (Ubuntu Precise) Status: Fix Committed = Fix Released ** Changed in: linux (Ubuntu Quantal) Status: In Progress = Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
I am using linux-image-3.2.0-37-generic (Version: 3.2.0-37.58) now and did not experience the problem anymore (so far). At the very least the new version does not appear to be harmful on my machine (i.e. I did not notice any new bugs). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
3.5.0-23-generic #35-Ubuntu fixes the problem for me on quantal. ** Tags removed: verification-needed-quantal ** Tags added: verification-done-quantal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
The backported kernel 3.5.0-23.35~precise1 works fine, too. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
I may be suffering from this. I'm on Ubuntu 12.04, uname says 3.2.0-36-generic-pae #57-Ubuntu, # tail -f /var/log/syslog complains tail: inotify cannot be used, reverting to polling: Too many open files and (oddly) dbus-daemon is using 79% of CPU according to top, and 17% according to ps. This is on a desktop with three users logged into it; my son complained of slowness during minecraft. Don't know how repeatable it is yet. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
The attachment inotify/fanotify ref count fix of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report. [This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.] ** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
Lino, thanks a lot you for your time. Unfortunately, the patchset that introduced this regression has been reverted from the Ubuntu kernels for the time being. We will be bringing them back soon. We are currently testing your patch, and reviewing our backport. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
This bug is awaiting verification that the kernel for Precise in -proposed solves the problem (3.2.0-37.58). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-precise' to 'verification-done-precise'. If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you! ** Tags added: verification-needed-precise -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
This bug is awaiting verification that the kernel for Quantal in -proposed solves the problem (3.5.0-23.35). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-quantal' to 'verification-done-quantal'. If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you! ** Tags added: verification-needed-quantal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
** Tags removed: verification-needed-precise ** Tags added: verification-done-precise -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
3.2.0-37.58 (precise) works for me, i will test the backported quantal- kernel as soon it becomes available. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
** Branch linked: lp:ubuntu/precise-proposed/linux-lts-quantal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
First, thanks to Eugene and Adar for reporting and investigation. I have had some time now to debug this and I found the reason for the bug. Obviously something went wrong during the port of the patch series mentioned above from mainline to ubuntu kernel: There is the function fsnotify_destroy() which is never called in ubuntu. But this function ensures that all pending events are flushed and thereby ref counts on a fsnotify group held by those events are released. So what has to be done is call fsnotify_destroy in inotify_release(). Otherwise there will always be references held to the inotify group and the group will never get destroyed - which sooner or later results in a number of alive groups that exceeds the allowed max number. The same flaw can be found in the fanotify code. I will attach a patch that should fix the ref counts for both inotify and fanotify. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
** Patch added: inotify/fanotify ref count fix https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+attachment/3499556/+files/fsnotify-inotify-call-destroy_group-in-inotify-fanot.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
@jsalisbury: As stated in #1101797 comment 4: Yes, 3.2.0-36 is also affected, it introduced the bug into the 3.2 kernel line. The previuous kernel, 3.2.0-35 is (still) working fine. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
@markusj, There are actually two versions of 3.2.0-36. It appears 3.2.0-36.57 has the bug, since that is what the bug was reported against. However, there is also 3.2.0-36.56. I was curious to see if that version has the bug since it contains a different version of the fsnotify patches. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
** Changed in: linux (Ubuntu Precise) Assignee: Joseph Salisbury (jsalisbury) = (unassigned) ** Changed in: linux (Ubuntu Quantal) Assignee: Joseph Salisbury (jsalisbury) = (unassigned) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
I confirm Eugene's words: darkk@darkk-ya-thinkpad:~$ cat /proc/sys/fs/inotify/max_user_instances 128 darkk@darkk-ya-thinkpad:~$ ls -l /proc/*/fd/ 2/dev/null | grep -c anon_inode:inotify 36 darkk@darkk-ya-thinkpad:~$ sudo ls -l /proc/*/fd/ 2/dev/null | grep -c anon_inode:inotify 51 darkk@darkk-ya-thinkpad:~$ uname -a Linux darkk-ya-thinkpad 3.5.0-22-generic #34-Ubuntu SMP Tue Jan 8 21:47:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux darkk@darkk-ya-thinkpad:~$ uptime 16:57:08 up 4 days, 4:55, 15 users, load average: 0.60, 0.97, 0.82 darkk@darkk-ya-thinkpad:~$ tail -f /etc/hosts /dev/null tail: inotify cannot be used, reverting to polling: Too many open files ^C -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
Does this only happen when running Precise in a VM? Do you happen to know if the bug also exists on bare metal? ** Changed in: linux (Ubuntu) Importance: Undecided = Medium ** Tags added: regression-update ** Tags added: kernel-da-key ** Tags added: needs-bisect quantal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
@Adar, Do you happen to know that last Good and first Bad kernel versions? If we can identify these two versions, I can perform a kernel bisect to identify the commit that introduced this bug. It appears you are running 3.2.0-36.57-generic. If this is correct, can you test the following two kernels and report back: 3.2.34: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.2.34-precise/ 3.2.35: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.2.35-precise/ ** Also affects: linux (Ubuntu Precise) Importance: Undecided Status: New ** Also affects: linux (Ubuntu Quantal) Importance: Undecided Status: New ** Changed in: linux (Ubuntu Precise) Status: New = Incomplete ** Changed in: linux (Ubuntu Quantal) Status: New = Incomplete ** Changed in: linux (Ubuntu Precise) Importance: Undecided = Medium ** Changed in: linux (Ubuntu Quantal) Importance: Undecided = Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
Happens on real amd64 iron here. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
@Joseph, I see the bug on real hw, but I use quantal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
Running quantal. The problem does NOT happen on this: Linux pccross 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux The problem does happen on this: Linux pccross 3.5.0-22-generic #34-Ubuntu SMP Tue Jan 8 21:47:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
I'm going to build a test kernel with the fsnotify patches reverted. I'll post the kernel shortly. This may also be related to bug 1101355 and bug 1101797 ** Changed in: linux (Ubuntu Precise) Status: Incomplete = In Progress ** Changed in: linux (Ubuntu Precise) Status: In Progress = Confirmed ** Changed in: linux (Ubuntu Quantal) Status: Incomplete = Confirmed ** Changed in: linux (Ubuntu) Status: Incomplete = Confirmed ** Changed in: linux (Ubuntu Precise) Status: Confirmed = In Progress ** Changed in: linux (Ubuntu Quantal) Status: Confirmed = In Progress ** Changed in: linux (Ubuntu Precise) Assignee: (unassigned) = Joseph Salisbury (jsalisbury) ** Changed in: linux (Ubuntu Quantal) Assignee: (unassigned) = Joseph Salisbury (jsalisbury) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
** Changed in: linux (Ubuntu Precise) Assignee: Joseph Salisbury (jsalisbury) = (unassigned) ** Changed in: linux (Ubuntu Quantal) Assignee: Joseph Salisbury (jsalisbury) = (unassigned) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
Actually the quickest test would be to boot the 3.2.0-36.56 kernel and see if it also exhibits this bug. It can be downloaded from: https://launchpad.net/ubuntu/+source/linux/3.2.0-36.56 From that link, select your particular arch under the Builds section. Thanks in advance! ** Changed in: linux (Ubuntu Precise) Assignee: (unassigned) = Joseph Salisbury (jsalisbury) ** Changed in: linux (Ubuntu Quantal) Assignee: (unassigned) = Joseph Salisbury (jsalisbury) ** Tags removed: needs-bisect -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
One additional request in addition to testing 3.2.0-36.56. Can folks affected by this bug also test the v3.2.0-35 kernel, which can downloaded from: https://launchpad.net/ubuntu/+source/linux/3.2.0-35.55 Again, from that link, select your particular arch under the Builds section. Thanks in advance! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
I can confirm that Eugene's script yields the same results in my VM as well: ... 62: ./eugene_script.sh: line 11: 10940 Terminated tail -f /etc/hosts /dev/null 63: ./eugene_script.sh: line 11: 10943 Terminated tail -f /etc/hosts /dev/null 64: tail: inotify cannot be used, reverting to polling: Too many open files ./eugene_script.sh: line 11: 10945 Terminated tail -f /etc/hosts /dev/null 65: tail: inotify cannot be used, reverting to polling: Too many open files ./eugene_script.sh: line 11: 10947 Terminated tail -f /etc/hosts /dev/null -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
I would like to find out what goes wrong with inotifys user instance counting but unfortunately I dont know how to reproduce this. @adar could you be a little bit more precise in what your python unit tests look like? Thx -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
#!/bin/bash i=0 while [ $i -lt 1000 ];do i=$((i+1)) echo -n $i: tail -f /etc/hosts /dev/null pid=$! sleep 1 kill $pid done Running it gives this result: [...] 65: /tmp/t.sh: line 11: 17838 Terminated tail -f /etc/hosts /dev/null 66: /tmp/t.sh: line 11: 17840 Terminated tail -f /etc/hosts /dev/null 67: /tmp/t.sh: line 11: 17842 Terminated tail -f /etc/hosts /dev/null 68: tail: inotify cannot be used, reverting to polling: Too many open files /tmp/t.sh: line 11: 17844 Terminated tail -f /etc/hosts /dev/null 69: tail: inotify cannot be used, reverting to polling: Too many open files /tmp/t.sh: line 11: 17847 Terminated tail -f /etc/hosts /dev/null 70: tail: inotify cannot be used, reverting to polling: Too many open files /tmp/t.sh: line 11: 17850 Terminated tail -f /etc/hosts /dev/null 71: tail: inotify cannot be used, reverting to polling: Too many open files ^C -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
Thanks, Eugene. I had begun putting together a repro case with pyinotify, but a shell + tail certainly takes the cake. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
I see this problem in quantal after kernel upgrade to 3.5.0-22-generic #34-Ubuntu. Perhaps it's due to one of these: 10 days ago Lino Sanfilippofsnotify: pass group to fsnotify_destroy_mark() tree | commitdiff 10 days ago Lino Sanfilippofsnotify: use reference counting for groups tree | commitdiff 10 days ago Chris J ArgesRevert UBUNTU: SAUCE: fsnotify: use reference counting... tree | commitdiff 10 days ago Chris J ArgesRevert UBUNTU: SAUCE: fsnotify: pass group to fsnotify... tree | commitdiff 2012-12-14 Lino SanfilippoUBUNTU: SAUCE: fsnotify: pass group to fsnotify_destroy... tree | commitdiff 2012-12-14 Lino SanfilippoUBUNTU: SAUCE: fsnotify: use reference counting for... tree | commitdiff -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
And by the way, two unexpected manifestations are: 1. Sound applet disappear from the panel, and Sound settings do not show any devices. 2. Dropbox applet turns red and reports Cannot access Dropbox folder so there may be a lot of duplicate reports in distant areas of launchpad... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
** Attachment added: version.log https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+attachment/3488366/+files/version.log -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
I should add that when I reboot the system, the problem goes away until I run my pyinotify unit tests again. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1101666] Re: inotify fd leak
apport information ** Tags added: apport-collected precise running-unity ** Description changed: I'm running Ubuntu 12.04 in a VM. After a recent kernel upgrade, I'm finding that I can reliably put the system in a position where the inotify_init() syscall returns -EMFILE, but /proc/*/fd shows fewer anon_inode:inotify entries than /proc/sys/fs/inotify/max_user_instances. Unfortunately the only way I know how to reproduce this is to run some internal Python unit tests that exercise pyinotify. But after a few such invokations, there appears to be a leak. Perhaps a regression of CVE-2010-4250? adar@adar-dev:~$ for foo in /proc/*/fd/*; do readlink -f $foo; done | grep inotify | sort | wc -l 24 adar@adar-dev:~$ cat /proc/sys/fs/inotify/max_user_instances 128 adar@adar-dev:~$ cat inotify_test.c #include stdio.h #include sys/inotify.h void main(int argc, char *argv[]) { int err = inotify_init(); if (err == -1) { perror(inotify_init); } } adar@adar-dev:~$ gcc inotify_test.c -o inotify_test adar@adar-dev:~$ ./inotify_test inotify_init: Too many open files + --- + AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24. + ApportVersion: 2.0.1-0ubuntu17.1 + Architecture: amd64 + ArecordDevices: + List of CAPTURE Hardware Devices + card 0: AudioPCI [Ensoniq AudioPCI], device 0: ES1371/1 [ES1371 DAC2/ADC] +Subdevices: 1/1 +Subdevice #0: subdevice #0 + AudioDevicesInUse: + USERPID ACCESS COMMAND + /dev/snd/controlC0: adar 2363 F pulseaudio + CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found. + Card0.Amixer.info: + Card hw:0 'AudioPCI'/'Ensoniq AudioPCI ENS1371 at 0x2040, irq 16' +Mixer name : 'Cirrus Logic CS4297A rev 3' +Components : 'AC97a:43525913' +Controls : 24 +Simple ctrls : 13 + DistroRelease: Ubuntu 12.04 + HibernationDevice: RESUME=UUID=69da1950-dcd9-4f58-bcfc-c575290982a5 + InstallationMedia: Ubuntu 11.10 Oneiric Ocelot - Release amd64 (20111012) + IwConfig: + lono wireless extensions. + + eth0 no wireless extensions. + Lsusb: + Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub + Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub + Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse + Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub + MachineType: VMware, Inc. VMware Virtual Platform + MarkForUpload: True + Package: linux (not installed) + ProcEnviron: + TERM=xterm + PATH=(custom, no user) + LANG=en_US.UTF-8 + SHELL=/bin/bash + ProcFB: 0 svgadrmfb + ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-36-generic root=UUID=a63e42ec-99f0-4141-a1f2-f0f1b0cc3dbf ro quiet splash + ProcVersionSignature: Ubuntu 3.2.0-36.57-generic 3.2.35 + RelatedPackageVersions: + linux-restricted-modules-3.2.0-36-generic N/A + linux-backports-modules-3.2.0-36-generic N/A + linux-firmware1.79.2 + RfKill: + + Tags: precise running-unity + Uname: Linux 3.2.0-36-generic x86_64 + UpgradeStatus: Upgraded to precise on 2012-05-09 (254 days ago) + UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare wireshark + dmi.bios.date: 07/02/2012 + dmi.bios.vendor: Phoenix Technologies LTD + dmi.bios.version: 6.00 + dmi.board.name: 440BX Desktop Reference Platform + dmi.board.vendor: Intel Corporation + dmi.board.version: None + dmi.chassis.asset.tag: No Asset Tag + dmi.chassis.type: 1 + dmi.chassis.vendor: No Enclosure + dmi.chassis.version: N/A + dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd07/02/2012:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A: + dmi.product.name: VMware Virtual Platform + dmi.product.version: None + dmi.sys.vendor: VMware, Inc. ** Attachment added: AcpiTables.txt https://bugs.launchpad.net/bugs/1101666/+attachment/3488367/+files/AcpiTables.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1101666 Title: inotify fd leak To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1101666/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs