#1595 closed defect (fixed)
nondeterministic failure of allmydata.test.test_introducer.SystemTest.test_system on Windows: Address already in use
| Reported by: | davidsarah | Owned by: | somebody |
|---|---|---|---|
| Priority: | major | Milestone: | undecided |
| Component: | code | Version: | 1.9.0 |
| Keywords: | port test | Cc: | marcus@… |
| Launchpad Bug: |
Description (last modified by exarkun)
[ERROR]
Traceback (most recent call last):
File "/home/marcus/bbtahoe/Marcus_Cygwin_WinXP/build/src/allmydata/test/test_introducer.py", line 217, in _restart_introducer_tub
self.create_tub(self.central_portnum)
File "/home/marcus/bbtahoe/Marcus_Cygwin_WinXP/build/src/allmydata/test/test_introducer.py", line 85, in create_tub
l = tub.listenOn("tcp:%d" % portnum)
File "/home/marcus/bbtahoe/Marcus_Cygwin_WinXP/build/support/lib/python2.6/site-packages/foolscap-0.6.2-py2.6.egg/foolscap/pb.py", line 573, in listenOn
l.addTub(self)
File "/home/marcus/bbtahoe/Marcus_Cygwin_WinXP/build/support/lib/python2.6/site-packages/foolscap-0.6.2-py2.6.egg/foolscap/pb.py", line 111, in addTub
self.s.setServiceParent(self.parentTub)
File "/usr/lib/python2.6/site-packages/Twisted-11.1.0-py2.6-cygwin-1.7.9-i686.egg/twisted/application/service.py", line 186, in setServiceParent
self.parent.addService(self)
File "/usr/lib/python2.6/site-packages/Twisted-11.1.0-py2.6-cygwin-1.7.9-i686.egg/twisted/application/service.py", line 308, in addService
service.privilegedStartService()
File "/usr/lib/python2.6/site-packages/Twisted-11.1.0-py2.6-cygwin-1.7.9-i686.egg/twisted/application/internet.py", line 105, in privilegedStartService
self._port = self._getPort()
File "/usr/lib/python2.6/site-packages/Twisted-11.1.0-py2.6-cygwin-1.7.9-i686.egg/twisted/application/internet.py", line 133, in _getPort
'listen%s' % (self.method,))(*self.args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/Twisted-11.1.0-py2.6-cygwin-1.7.9-i686.egg/twisted/internet/posixbase.py", line 431, in listenTCP
p.startListening()
File "/usr/lib/python2.6/site-packages/Twisted-11.1.0-py2.6-cygwin-1.7.9-i686.egg/twisted/internet/tcp.py", line 622, in startListening
raise CannotListenError, (self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:2795: [Errno 112] Address already in use.
allmydata.test.test_introducer.SystemTest.test_system
This is on Windows cygwin. I don't know whether it is specific to cygwin; I seem to remember that Windows in general will give an error if you try to reuse a port just after it has been released.
Change History (4)
comment:1 Changed at 2011-11-24T00:21:21Z by marcusw
- Cc marcus@… added
comment:2 Changed at 2018-05-23T15:34:47Z by exarkun
- Description modified (diff)
- Keywords review-needed added; windows cygwin removed
comment:3 Changed at 2018-06-08T20:22:06Z by exarkun
- Resolution set to fixed
- Status changed from new to closed
comment:4 Changed at 2018-06-08T20:22:13Z by exarkun
- Keywords review-needed removed
Note: See
TracTickets for help on using
tickets.

The test has since been renamed but the underlying problem still exists. See #2787 for details.
The problem is also cross-platform (though different environments may encounter the problem with different frequency).
I've fixed the problem for non-Windows (:/) platforms. See https://github.com/tahoe-lafs/tahoe-lafs/pull/501 for the fix. See #2927 for the Windows fix.