[Date Prev][Date Next]
Re: (ITS#4395) slapd in endless loop when opening to many connections
On Friday 10 February 2006 18:28, Howard Chu wrote:
> firstname.lastname@example.org wrote:
> > Full_Name: Ralf Haferkamp
> > Version: 2.3.19, HEAD
> > OS: Linux (Kernel 2.6)
> > URL: ftp://ftp.openldap.org/incoming/
> > Submission from: (NULL) (18.104.22.168)
> > slapd is built to use epoll(). ulimit -n is 32 (Just for testing.
> > The bug is also there with larger values). I used a small test
> > programm that just opens new connection to the server. After it the
> > server ran into the ulimit and I stopped the test programm the
> > slapd process is spinning in a endless loop an 99% cpu utilization.
> > While trying to track the problem down I found that is spinning in
> > the main daemon loop and epoll_wait() is signaling activity on a
> > single descriptor. The revents for this descriptor are set to
> > "EPOLLERR | EPOLLHUP" and this case in not handled in the loop. (It
> > only handles EPOLLIN and EPOLLOUT) Now I could use some help how to
> > fix this condition and correctly close and delete the connection
> > that is causing this.
> Simplest would be to funnel the error case into the Read handler,
> since that code will detect EOF and do the proper connection
> shutdown. I've patched this in HEAD, please test.