[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

RE: [Libevent-users] epoll erros



> The first thing to do here is to use event_enable_debug_mode() to have
> libevent track event adds/deletes/etc to make sure that there's
> nothing screwy going on there.
> 
Here is the chain of events I was able to identify
- An event for fd 14 is created
- At some later point, my code deletes the event. strace does not show a
call to epoll_ctl to delete fd 14 from the set.
- fd 14 is closed by my code
- Shortly afterwards, there is a call to epoll_ctl to delete fd 14
- The call fails, of course, and a libevent warning says "DEL was
unnecessary". The comment in that place in the code says "... that's fine
too ... "
  - It's not fine. AFAIK, since the file descriptor is closed, epoll did not
actually remove it
- Further down the road, attempts to add fd 14 fail since epoll did not
remove fd 14 in the first place.

It seems like libevent delays the call to epoll_ctl, and by the time it
actually does that, it's too late.


***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.