[cups.bugs] [MOD] STR #3256: cupsdRemoveSelect() not calling cupsArrayRemove() if kevent() fails

Edgar Fuß ef at math.uni-bonn.de
Wed Jul 8 06:09:04 PDT 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I must admit not knowing the root cause for this effect.
I stumbled over it during heavy DTrace'ing of CUPS' select mechanism
(trying to solve a problem which eventually showed up as nc localhost
using IPv6 while CUPS was listening for UDP broadcasts on IPv4 only plus
the Mac OS X 10.5 blocking browse broadcasts).

CUPS had a socket open on UDP *:631.
cupsdRemoveSelect() was called for that socket's fd; however, the kevent()
failed with "Bad file descriptor" (I don't know the root cause for that --
somehow CUPS and the Kernel seem to be out of sync wrt. which kevents are
registered).
Now, cupsdRemoveSelect() returns without cupsArrayRemove()ing the
corresponding fd.
Next time cupsdAddSelect() was called with that fd, kevent() was not
called because the corresponding read_cb was allegedly unchanged.

Setting BrowseProtocols to LDAP and back to CUPS resolved the issue.

I attach the corresponding D script.

Link: http://www.cups.org/str.php?L3256
Version: 1.3.8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cups.d
Type: application/octet-stream
Size: 1427 bytes
Desc: not available
URL: <https://lists.cups.org/pipermail/cups/attachments/20090708/aaaf2dda/attachment.obj>


More information about the cups mailing list