After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 558678 - erroneous poll call with many watchers
erroneous poll call with many watchers
Status: RESOLVED DUPLICATE of bug 11059
Product: glib
Classification: Platform
Component: mainloop
2.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-10-31 15:30 UTC by Josselin Mouette
Modified: 2011-09-10 00:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Josselin Mouette 2008-10-31 15:30:11 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.
Comment 1 Allison Karlitskaya (desrt) 2011-09-10 00:55:29 UTC

*** This bug has been marked as a duplicate of bug 11059 ***