Project

General

Profile

Bug #372

dev-poll interface problem on Solaris 10

Added by Anonymous about 11 years ago. Updated almost 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
-
Start date:
Due date:
% Done:

0%

Missing in 1.5.x:

Description

When using /dev/poll interface on Solaris 10,
ioctl(ev->devpoll_fd, DP_POLL, &dopoll);
fails. Problem seems to be in fdlimit, and check that was added in Sol10.

Long description of same problem in libevent:
http://forum.sun.com/thread.jspa?threadID=26396&tstart=0

Solution: do not use all available FDs, but at least one less, preferably 10 less, to be on safe side.

Change in server.c:
srv->max_fds = rlim.rlim_cur;

to:
srv->max_fds = rlim.rlim_cur - 10;

-- debnar

Associated revisions

Revision 796502e7 (diff)
Added by stbuehler almost 9 years ago

r2087@chromobil: stefan | 2008-02-26 17:01:12 +0100
Fix #1562 and try re-fixing #372: out of range access in fd array

- Bug is in original #372 fix [853]
- The re-fix for #372 is not tested:
the problem is that Solaris doesn't want to poll for maxfds (ulimit) events,
as at least one filedescriptor is used for the poll device.
So the solution is to just ask for one event less; the number of events
actually available is returned by the poll syscall, so it should work.

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2082 152afb58-edef-0310-8abb-c4023f1b3aa9

History

#1 Updated by jan about 11 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

thanks for the report,

fixed in r853

#2 Updated by stbuehler almost 9 years ago

This "fix" probably introduced a new bug, see #1562.

Also available in: Atom