GNOME Bugzilla – Bug 558678
erroneous poll call with many watchers
Last modified: 2011-09-10 00:55:29 UTC
[ Forwarded from http://bugs.debian.org/503626 by Marc Lehmann ] When there are many watchers on the same fd (more than the current ulimit == OPEN_MAX on linux), then enters an endless loop where it prints: GLib-WARNING **: poll(2) failed due to: Invalid argument. The reason is that poll indeed fails with EINVAL, since posix limits the number of pollfd structures one can pass to poll, and glib exceeds that limit when there are duplicate watchers. While this example is pretty synthetic, in practise it is often the case that one has two watchers on the same fd (e.g. read and write, or just temporarily), and this makes glib fail less than gracefully when one is near the resource limit.
*** This bug has been marked as a duplicate of bug 11059 ***