[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] epoll erros
- To: libevent-users@xxxxxxxxxxxxx
- Subject: Re: [Libevent-users] epoll erros
- From: Nick Mathewson <nickm@xxxxxxxxxxxxx>
- Date: Fri, 17 Sep 2010 10:23:37 -0400
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Fri, 17 Sep 2010 10:23:44 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=tvcp6MP4IVkdhjUlHNc6DF7cLA3UFdo2QuWJNOiMid8=; b=fojAx50szZBpYF3ZGS2FMEIdODDqs+L3JWjwrRU09fEVUU1upycDChAYnzi8ez50RC pVUROXkZrtcuZETYusUEckgeuH+FEFkgPH+bpgOzsL+nhfi+zAUHvwcUrcAZ1Wm7I1ie RVI0fhJ8efBEjw5rJy4B19++aTzP1GA+qQnYE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=qYXYGRUj6fXvlzULowxi00Psu1sD5l2fWylpoL8mlSSM+K2RPANceqxMe2NitZdwxq 8bftrqqc4KjMD4gJUWOEEAuvL3WwH/4/gFvNzf143+xZHztV+GZZmNiYAx5jKSiPcxW/ +0slGaoihHgMovQ+Zikj0MGpqywYKf0IbMfTE=
- In-reply-to: <006801cb55d1$428af580$c7a0e080$@com>
- References: <006801cb55d1$428af580$c7a0e080$@com>
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
On Thu, Sep 16, 2010 at 2:59 PM, Gilad Benjamini
<gilad@xxxxxxxxxxxxxxxxx> wrote:
> My Linux code, which uses libevent 2.0.x occasionally prints these error
> messages
> Epoll ADD on fd 14 failed. Old events were 0; read change was 1 (add);
> write change was 0 (none).: File exists
> When they appear, it can be as frequent as once a second.
>
> Can someone shed some light on what the issue might be ?
First, make sure you're on 2.0.7-rc, not just any "2.0.x"; there was
an error like this that got fixed in 2.0.6-rc.
So the message means that libevent's epoll backend told the kernel to
start listening for reads on fd 14. Libevent believed that it was not
previously watching fd 14, so it used EPOLL_ADD rather than EPOLL_MOD
to add it. The kernel, though, disagreed, and gave an EEXIST error
("file exists") to say, "no, I was already watching events on that fd.
Two possibilities here: one is that Libevent is confused about which
fds it was listening on. Another one is that something in your code
screwed up Libevent's view of which fds it was listening on.
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.
yrs,
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.