Compatibility with other libraries using epoll

Marc Lehmann schmorp at
Wed May 9 17:52:00 CEST 2012

On Tue, May 08, 2012 at 02:48:52PM -0700, "Stephen D. Bowline" <sbowline at> wrote:
>   I've described my problems to both the Node and asio communities

Your description is not exactly detailed. I'd say having a valgrind message
telling you something that you disagree with is a very very good hint that
there is something in your code that you don't understand, and is buggy.

The alternative would be that valgrind is buggy (very unlikely) that asio is
buggy (no clue, probably not very likely), that epoll itself is buggy
(possible, but very unlikely in this case) or that liebv is buggy (very unlikely).

I suggest trying to understand why valgridn complains, and then fixing the
likely bug it pointed you at.

> without much luck, so maybe you guys can help.  It occurred to me that
> since both Node and asio are using the epoll mechanism that there
> could be a fundamental incompatibility and that maybe I should stop
> right where I am and not pursue trying to use asio in my Node module.

It is much more likely that you simply have a bug in your code, and valgrind
indirectly sees some effects of that.

>   Am I wasting my time trying to get asio to work within another
> library that is using libev for event handling?

There is no known mechanism in how they could interfere via epoll -
multiple epoll users in the same thread or process are routine and
commonly implemented.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list