Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 2000 15:36:49 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        Kirk McKusick <mckusick@mckusick.com>, arch@FreeBSD.ORG, net@FreeBSD.ORG
Subject:   Re: patch to cleanup inflight desciptor handling.
Message-ID:  <20001213153649.T16205@fw.wintelcom.net>
In-Reply-To: <20001213145341.S16205@fw.wintelcom.net>; from bright@wintelcom.net on Wed, Dec 13, 2000 at 02:53:41PM -0800
References:  <200012131852.KAA17423@beastie.mckusick.com> <200012132106.eBDL6Sg86570@earth.backplane.com> <20001213141917.Q16205@fw.wintelcom.net> <20001213145341.S16205@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> This causes a leak, I think the trick is to just always call sorflush()
> when the pcb is free'd.

Even this doesn't work.

> 
> Looking at linux they still are using gc.  I'll give this a lot
> more thought before resubmitting this idea.

Ok, the problem is you have 3 af_unix pairs all open between 2
processes

process B sends 3 over 2 to A
process B sends 2 over 3 to A
process B send 2 and 3 over 1 to A
process B closes 1 2 and 3
A then closes 3 2 and then 1

closing 3 and 2 doesn't cause the socketbuffer to be flushed because
they are still self referencing.

closing 1 causes the socketbuffer to be flushed,

on flushing it comes across 2 and drops a reference but doesn't flush,
it then hits 3 and drops a reference but doesn't flush.

since 3 references 2 and 2 references 3 and nothing else references
2 or 3, we just leaked 2 and 3.

I guess the gc has to stay.

dammit. :)

My apologies for wasting everyone's time here.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001213153649.T16205>