[PATCH] Re: Feature Request: 'bzr mv --after' to tell bzr that file(s) have already been moved in the working tree

John Arbash Meinel john at arbash-meinel.com
Mon Nov 6 16:14:40 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley wrote:
...

> 
>>>   - run 'bzr selftest', because the selftest of 'bzr.dev' seems to hang
>>> on my machine
> 
> That's pretty serious.  Does "bzr selftest whoami" hang, or is it only
> long runs that hang?  Does a progress bar show?  Does it print anything?
> 
> Aaron

I've been able to reproduce the hang.

First, we have lots of tests fail with this traceback:
...ions.TransportTests.test_copy(SmartTCPServer_for_testing)FAIL
  77ms
    end of file reading from server.


And then we get this error in random threads:
Exception in thread Thread-223:
Traceback (most recent call last):
  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
    self.run()
  File "/usr/lib/python2.4/threading.py", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/cygdrive/h/dev/bzr/bzr.dev/bzrlib/transport/sftp.py", line
1053, in _run_server_entry
    return self._run_server(sock)
  File "/cygdrive/h/dev/bzr/bzr.dev/bzrlib/transport/sftp.py", line
1138, in _run_server
    server.start_subsystem('sftp', None, sock)
  File "/usr/lib/python2.4/site-packages/paramiko/sftp_server.py", line
81, in start_subsystem
    self._send_server_version()
  File "/usr/lib/python2.4/site-packages/paramiko/sftp.py", line 121, in
_send_server_version
    self._send_packet(CMD_VERSION, str(msg))
  File "/usr/lib/python2.4/site-packages/paramiko/sftp.py", line 159, in
_send_packet
    self._write_all(out)
  File "/usr/lib/python2.4/site-packages/paramiko/sftp.py", line 137, in
_write_all
    n = self.sock.send(out)
error: unable to select on socket


I'm not sure what is going on here, other than thinking that the socket
might have closed, and it is causing an exception to be raised, rather
than just saying the socket needs to be closed.

And finally, the test that hangs for me is:
...entations.TransportTests.test_copy_to(SFTPAbsoluteServer)

I assume the problem is that the SFTP server is crashing (posssibly from
the earlier traceback), and then the sftp client is hanging waiting for
a response. I've at least seen that happen in the past.

I'm not sure if we can just set a timeout on the socket, so that we
don't hang forever. But I thought we had a problem where on win32 if you
set a socket to non-blocking it starts raising "this would block"
exceptions, and that caused problems because other code expects it to
block until data is ready.

Maybe we could set NONBLOCKING, and then just create a retry-10-times
loop. But certainly we need to do something. Having a test fail cause
the test suite to hang is a very bad thing.

One other possibility would be to have an external thread, which could
kill any test that hangs for longer than 1 minute. I don't think any of
our selftest tests should be written such that they take longer than
that to complete. (I realize on win32 they take longer than under Linux,
but this should really be 10s versus 1s, never 1 minute).


I'm going to try changing my version of paramiko, and see if that fixes
some of this stuff (right now I'm using 1.6)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFT19wJdeBCYSNAAMRAu3vAJ9g5YfvnwP487yE5718QahNVR5xgACgq+op
olof8yo2dkZrozdEY7lG3wE=
=8o+O
-----END PGP SIGNATURE-----




More information about the bazaar mailing list