[bug] sftp cleanup failures
Martin Pool
mbp at canonical.com
Tue Nov 7 03:34:21 GMT 2006
On 6 Nov 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> So at this point I would recommend:
>
> 1) Change sftp so SocketListener runs in non-daemon mode, but the
> _run_server_entry is run in daemon mode. It doesn't change much, but it
> seems cleaner. (By my present count, we have approx 6 threads that are
> hanging)
>
> 2) Try to figure out why certain tests are creating a SFTP connection,
> but causing the SFTP server to hang waiting for a response.
Probably a good idea whatever else we do.
> 3) I'd *really* like to change the socket to be non-blocking, but we
> would need to figure out what code paths expect file-like objects. And
> I've seen that bzrlib.transport.ssh uses makefile() to create the
> read-and-write handles for SSH connections. (And it is used by the smart
> server).
>
> That seems to be the only place that calls 'makefile()' directly, though
> I can say that other tests start to fail. Specifically:
> ...mentations.TransportTests.test_append(SFTPAbsoluteServer)
>
> Instead of cleaning up and getting the _stop_event() flag being set, it
> just spins, waiting until I set up another timeout. And when that
> triggers, the whole process just hangs.
Last time I looked, the smart transport didn't really need makefile, it
was just more convenient. It shouldn't be hard to change.
Personally I'd rather look into just running one server thread for all
the tests and then we don't have to worry so much whether it exits.
--
Martin
More information about the bazaar
mailing list