[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-dev
Subject:    Re: Bug in epoll
From:       Davi Arnaut <davi () haxent ! com ! br>
Date:       2007-01-18 3:26:12
Message-ID: 45AEE8D4.7030808 () haxent ! com ! br
[Download RAW message or body]

Paul Querna wrote:
> Hey All,
> 
> I am observing a bug in apr_pollset_poll.
> 
..
> 
> To me, the non-kernel programmer, it looks like epoll is only getting
> triggered on the wakeup timer for the timeout, and not returning
> instantly when it has found a socket available for read.  When it
> finally does hit the timeout wakeup, it does notice that there is a
> socket available to read, and returns it, rather than an actual timeout.
> 
> For the short term, I am satisfied with disabling epoll on my builds of
> APR.  I think we should consider disabling epoll by default on APR, if I
> can isolate the bug to a kernel revision.
> 

epoll code hasn't changed much in ages..I would probably blame
apr_memcache code :)

Example:

apr_memcache_multgetp():

..
    rv = apr_pollset_create(&pollset, apr_hash_count(server_queries),
temp_pool, 0);
..
..
    apr_pool_clear(temp_pool);
    apr_pollset_destroy(pollset);

Also there a lot of calls that the returns values are not checked.
Anyway, better double check the apr_memcache code. A full strace log
should help shed some light on the issue.

--
Davi Arnaut
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic