Thread traceback running test suite on Maverick
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
In Progress
|
Medium
|
John A Meinel |
Bug Description
After some time, I've come back to running the full test suite. I cannot run it without "--parallel=
Exception in thread Thread-
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
n = self.sock.send(out)
File "/home/
return self.__
File "/usr/lib/
raise error(EBADF, 'Bad file descriptor')
error: [Errno 9] Bad file descriptor
Exception in thread Thread-1774:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
n = self.sock.send(out)
File "/home/
return self.__
File "/usr/lib/
raise error(EBADF, 'Bad file descriptor')
error: [Errno 9] Bad file descriptor
I notice that it is all async requests. I also note that SFTPFile handles use an async request to close the handle when they are deconstructed. Leading to a high likelyhood that we are letting the file close async instead of a try/finally/
Related branches
- Martin Pool: Needs Fixing
- Martin Packman (community): Abstain
- Jelmer Vernooij (community): Approve
-
Diff: 227 lines (+71/-44)7 files modifiedbzr (+2/-2)
bzrlib/tests/per_transport.py (+13/-4)
bzrlib/transport/__init__.py (+34/-31)
bzrlib/transport/sftp.py (+2/-5)
doc/en/release-notes/bzr-2.4.txt (+9/-0)
doc/en/whats-new/whats-new-in-2.4.txt (+9/-0)
setup.py (+2/-2)
Changed in bzr: | |
assignee: | nobody → John A Meinel (jameinel) |
status: | Confirmed → In Progress |
On Wed, 2011-04-20 at 13:29 +0000, John A Meinel wrote: something" because we end up getting out-of- 1768:TransportT ests.test_ stat(ChrootTran sport,TestingCh rootServer) python2. 6/threading. py", line 532, in __bootstrap_inner python2. 6/threading. py", line 484, in run target( *self._ _args, **self.__kwargs) pymodules/ python2. 6/paramiko/ sftp_file. py", line 453, in _prefetch_thread _async_ request( self, CMD_READ, self.handle, long(offset), int(length)) pymodules/ python2. 6/paramiko/ sftp_client. py", line 649, in _async_request packet( t, str(msg)) pymodules/ python2. 6/paramiko/ sftp.py" , line 172, in _send_packet all(out) pymodules/ python2. 6/paramiko/ sftp.py" , line 136, in _write_all jameinel/ dev/bzr/ work/bzrlib/ transport/ ssh.py" , line 200, in send socket. send(data) python2. 6/socket. py", line 167, in _dummy python2. 6/threading. py", line 532, in __bootstrap_inner python2. 6/threading. py", line 484, in run target( *self._ _args, **self.__kwargs) pymodules/ python2. 6/paramiko/ sftp_file. py", line 453, in _prefetch_thread _async_ request( self, CMD_READ, self.handle, long(offset), int(length)) pymodules/ python2. 6/paramiko/ sftp_client. py", line 649, in _async_request packet( t, str(msg)) pymodules/ python2. 6/paramiko/ sftp.py" , line 172, in _send_packet all(out) pymodules/ python2. 6/paramiko/ sftp.py" , line 136, in _write_all jameinel/ dev/bzr/ work/bzrlib/ transport/ ssh.py" , line 200, in send socket. send(data) python2. 6/socket. py", line 167, in _dummy addCleanup .close(). And that fails
> Public bug reported:
>
> After some time, I've come back to running the full test suite. I cannot
> run it without "--parallel=
> file-handle errors. However, I just got these tracebacks which are
> happening in threads (and thus why it isn't blocking the test suite run
> as actual failed tests.) I wanted to record it before I forgot about it:
>
> Exception in thread Thread-
> Traceback (most recent call last):
> File "/usr/lib/
> self.run()
> File "/usr/lib/
> self.__
> File "/usr/lib/
> self.sftp.
> File "/usr/lib/
> self._send_
> File "/usr/lib/
> self._write_
> File "/usr/lib/
> n = self.sock.send(out)
> File "/home/
> return self.__
> File "/usr/lib/
> raise error(EBADF, 'Bad file descriptor')
> error: [Errno 9] Bad file descriptor
>
> Exception in thread Thread-1774:
> Traceback (most recent call last):
> File "/usr/lib/
> self.run()
> File "/usr/lib/
> self.__
> File "/usr/lib/
> self.sftp.
> File "/usr/lib/
> self._send_
> File "/usr/lib/
> self._write_
> File "/usr/lib/
> n = self.sock.send(out)
> File "/home/
> return self.__
> File "/usr/lib/
> raise error(EBADF, 'Bad file descriptor')
> error: [Errno 9] Bad file descriptor
>
> I notice that it is all async requests. I also note that SFTPFile
> handles use an async request to close the handle when they are
> deconstructed. Leading to a high likelyhood that we are letting the file
> close async instead of a try/finally/
> intermittently based on whether the server is closed before the client's
> file handle tries to close itself.
FWIW I can reproduce this on Natty as well.
Cheers,
Jelmer