bug in unix sockets garbage collector

Robert Watson rwatson at FreeBSD.org
Mon Sep 1 12:04:54 UTC 2008


On Fri, 22 Aug 2008, Anton Yuzhaninov wrote:

> On servers where used unix sockets, sometimes thread taskq start to eat 100% 
> CPU: http://docs.FreeBSD.org/cgi/mid.cgi?474EFC5C.9060508
>
> Addition info about this problem - when this occurs
>
> sysctl net.local.inflight show negative number.
>
> % sysctl net.local.inflight net.local.inflight: -3
>
> And this condition become always true:
>
> if (local_unp_rights)
>                taskqueue_enqueue(taskqueue_thread, &unp_gc_task);
>
> It seems, that unp_rights decremented more often than incremented, or some 
> race exist.

Hi Anton:

On reviewing this code, I've identified at least one race condition that could 
lead to the behavior that you've spotted.  It will probably take me a couple 
of days to produce a patch for you to try.  However, could I ask you to file a 
PR for this problem, with the above and any related diagnostics, and when you 
receive the e-mail PR receipt, could you forward it to me so that I can take 
ownership of it?

Thanks,

Robert N M Watson
Computer Laboratory
University of Cambridge


More information about the freebsd-net mailing list