[MERGE] [Bug 226769] Disable some strace tests

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed May 7 09:46:50 BST 2008


>>>>> "robert" == Robert Collins <robertc at robertcollins.net> writes:

    robert> On Tue, 2008-05-06 at 18:10 +0200, Vincent Ladeuil wrote:
    >> 
    >> gives (far too much to paste here) 1089 tests reporting between 6
    >> and -9 leaked threads.
    >> 
    >> The negative numbers are for garbage collected threads, which
    >> means the approach in the patch above is not reliable since some
    >> leaked threads may have been missed, but I think it gives a rough
    >> idea abouth the amount of work required to make your proposal
    >> usable :-/
    >> 
    >> You're not seriously asking me to fix all of that ?

    robert> Mhmm. Not right now :).

Pfew, that was close :)

    robert> OTOH if they are all http/1.1 tests then perhaps the
    robert> author of that module could be persuaded :).

Not all of them, only 343 :)

    robert> Lets raise XFAIL for strace tests if they encounter > 1 active thread.

Ok.

    robert> Lets merge a patch which collects statistics on leaked threads from
    robert> tests, and reports at the end:
    robert>  - the number of tests where the thread count changed
    robert>  - the name of the first such test

Ok.

    robert> Lets talk about http/1.1 - trailing gc is really not that good.

Ok. So from memory and to start the discussion.

The crux of the problem (for http/1.1) is that the client (a bzr
transport) keeps the connection to server opened (that's the
point with persistent connections).

Since the client is a transport, it has no close_connection
method that can be called.

So the server has no idea about when to shutdown.

We can force the server to close the connection, but it requires
maintaining a list of such connections (each one is an
independent thread).

And then we must wait for the socket to close.

This was the considerations that led me to rely on trailing gc,
which I agree is not that good but in that case seemed
appropriate.

Note that when I did that, I was tracking socket leaks, and none
were leaked anymore.

Since we are discussing the leaking tests, I attached them.

gc trailing seems "à la mode" in quite a few areas :)

    Vincent

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: leaking-tests
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080507/370c78c3/attachment-0001.diff 


More information about the bazaar mailing list