r2401 - trunk/varnish-cache/bin/varnishd
Anders Nordby
anders at fupp.net
Fri Feb 1 17:19:58 CET 2008
Hi,
On Tue, Jan 29, 2008 at 05:05:54PM +0100, phk at projects.linpro.no wrote:
> Author: phk
> Date: 2008-01-29 17:05:54 +0100 (Tue, 29 Jan 2008)
> New Revision: 2401
>
> Modified:
> trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
> Log:
> I am not sure if this is a/the race some users are seeing, or if it
> even can have any effect, but this will close it at a cost of one
> extra kevent(2) every 100ms timer tick.
>
> The (perceived) problem is that we have pending kqueue changes we
> have not yet told the kernel about, then close a number of expired
> FD's which might be instantly be recycled by the accept(2) over in
> the other thread before we tell the kernel about the pending changes.
>
> In that case, the kernel has no way of knowing that our changes
> referred to the previous instance of the fd and not the new one.
>
> The solution is to push the changes to the kernel before servicing
> the timer.
I tried trunk/2415, and I am still having problems with kqueue:
Child said (2, 32794): <<Assert error in vca_kev(),
cache_acceptor_kqueue.c line 220:
Condition(sp->fd == kp->ident) not true.
>>
Child said (2, 32794): << errno = 2 (No such file or directory)
>>
Cache child died pid=32794 status=0x86
(gdb) bt
#0 0x0000000800d08fec in thr_kill () from /lib/libc.so.7
#1 0x0000000800d92c5b in abort () from /lib/libc.so.7
#2 0x000000080066a9df in lbv_assert (func=Variable "func" is not
available.
) at assert.c:63
#3 0x00000000004087e3 in vca_kqueue_main (arg=Variable "arg" is not
available.
) at cache_acceptor_kqueue.c:220
#4 0x0000000800a90a88 in pthread_getprio () from /lib/libthr.so.3
#5 0x0000000000000000 in ?? ()
Cannot access memory at address 0x7fffff5fc000
(gdb) frame 3
#3 0x00000000004087e3 in vca_kqueue_main (arg=Variable "arg" is not
available.
) at cache_acceptor_kqueue.c:220
220 assert(sp->fd == kp->ident);
(gdb) print sp
Variable "sp" is not available.
(gdb) print *sp
Variable "sp" is not available.
(gdb) print *kp
No symbol "kp" in current context.
(gdb) print kp
No symbol "kp" in current context.
(gdb) quit
Bye,
--
Anders.
More information about the varnish-commit
mailing list