selftest noise re _http_start

Bug #140614 reported by Ian Clatworthy
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Vincent Ladeuil

Bug Description

This has been introduced just recently in bzr.dev. It doesn't happen in 0.91rc2. It happens on both python 2.4 and python 2.5. It doesn't actually break tests but it's ugly noise.

ian@possum:~/bzr/bzr.dev$ python2.4 ./bzr selftest test_transport_implementations
testing: /home/ian/bzr/bzr.dev/bzr
   /home/ian/bzr/bzr.dev/bzrlib (0.92.0dev0 python2.4.4.final.0)

/home/ian/bzr/bzr.dev/bzrlib/transport/ftp.py:779: UserWarning: You must install medusa (http://www.amk.ca/python/code/medusa.html) for FTP tests
  warn("You must install medusa (http://www.amk.ca/python/code/medusa.html) for FTP tests")
Exception in thread Thread-2:
Traceback (most recent call last):
  File "threading.py", line 442, in __bootstrap
    self.run()
  File "threading.py", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ian/bzr/bzr.dev/bzrlib/tests/HttpServer.py", line 330, in _http_start
    httpd.socket.settimeout(0.1)
  File "<string>", line 1, in settimeout
  File "socket.py", line 136, in _dummy
    raise error(EBADF, 'Bad file descriptor')
error: (9, 'Bad file descriptor')

[317/884 in 14s, 28 skipped] test_transport_implementations.TransportTests.test_external_url(HttpServer_urllib) Exception in thread Thread-434:
Traceback (most recent call last):
  File "threading.py", line 442, in __bootstrap
    self.run()
  File "threading.py", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ian/bzr/bzr.dev/bzrlib/tests/HttpServer.py", line 330, in _http_start
    httpd.socket.settimeout(0.1)
  File "<string>", line 1, in settimeout
  File "socket.py", line 136, in _dummy
    raise error(EBADF, 'Bad file descriptor')
error: (9, 'Bad file descriptor')

[771/884 in 32s, 31 skipped] test_transport_implementations.TransportTests.test_relpath_at_root(HttpServer_PyCurl) Exception in thread Thread-908:
Traceback (most recent call last):
  File "threading.py", line 442, in __bootstrap
    self.run()
  File "threading.py", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ian/bzr/bzr.dev/bzrlib/tests/HttpServer.py", line 330, in _http_start
    httpd.socket.settimeout(0.1)
  File "<string>", line 1, in settimeout
  File "socket.py", line 136, in _dummy
    raise error(EBADF, 'Bad file descriptor')
error: (9, 'Bad file descriptor')

[884/884 in 36s, 44 skipped] test_transport_implementations.TransportTests.test_unicode_paths(UnlistableServer)
----------------------------------------------------------------------
Ran 884 tests in 36.894s

OK
44 tests skipped
tests passed

Revision history for this message
Vincent Ladeuil (vila) wrote : Re: [Bug 140614] selftest noise re _http_start

>>>>> "Ian" == Ian Clatworthy writes:

    Ian> Public bug reported:
    Ian> This has been introduced just recently in bzr.dev. It doesn't happen in
    Ian> 0.91rc2. It happens on both python 2.4 and python 2.5. It doesn't
    Ian> actually break tests but it's ugly noise.

I can't reproduce it, any hint about your setup ? OS ?

The strangest thing is that it happens during the test http
server start, and should break its initialization. So the test
should break too since noone is there to serve the requests.

Revision history for this message
Martin Pool (mbp) wrote :

I'm seeing this recently too. (Just today, I think.) It's on Ubuntu
Gutsy, core2duo (so dual-core), python2.5

Revision history for this message
Aaron Bentley (abentley) wrote :

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

vila wrote:
>>>>>> "Ian" == Ian Clatworthy writes:
>
> Ian> Public bug reported:
> Ian> This has been introduced just recently in bzr.dev. It doesn't happen in
> Ian> 0.91rc2. It happens on both python 2.4 and python 2.5. It doesn't
> Ian> actually break tests but it's ugly noise.
>
> I can't reproduce it, any hint about your setup ? OS ?

I saw this when I tested your socket leak fix, on Debian
Etch/Python2.4.4. It only seems to happen on one test case, but it
wasn't clear which one.

I presume that your changes have exposed a latent bug. But I felt they
were still worth merging even if that was the case.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG7+bZ0F+nu1YWqI0RAg6oAJ9IirGsvA9BTGZ+BksOHzKsfqkUzQCdGk6M
8flHTGA0fdnUl+tNjupMcfY=
=W7hs
-----END PGP SIGNATURE-----

Revision history for this message
Vincent Ladeuil (vila) wrote :

>>>>> "aaron" == Aaron Bentley> writes:

    aaron> vila wrote:
    >>>>>>> "Ian" == Ian Clatworthy writes:
    >>
    Ian> Public bug reported:
    Ian> This has been introduced just recently in bzr.dev. It doesn't happen in
    Ian> 0.91rc2. It happens on both python 2.4 and python 2.5. It doesn't
    Ian> actually break tests but it's ugly noise.
    >>
    >> I can't reproduce it, any hint about your setup ? OS ?

    aaron> I saw this when I tested your socket leak fix, on
    aaron> Debian Etch/Python2.4.4. It only seems to happen on
    aaron> one test case, but it wasn't clear which one.

Funny how all of you seem to be bitten by the bug while I couldn't
reproduce it on Solaris/OSX/Feisty :-)

    aaron> I presume that your changes have exposed a latent bug.
    aaron> But I felt they were still worth merging even if that
    aaron> was the case.

For the record, there was several hundreds sockets left in a
listen state, so, I really think it was worth merging too.

I updated to gutsy (lost some hours with a CPU at 100% making it
hard to debug the issue (but I digress)).

I can reproduce it now, seems both pretty random while easy to
reproduce, let the fun continues :)

Changed in bzr:
assignee: nobody → v-ladeuil
status: New → Confirmed
Vincent Ladeuil (vila)
Changed in bzr:
status: Confirmed → Fix Committed
importance: Undecided → Low
Vincent Ladeuil (vila)
Changed in bzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.