Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#4361 defect closed duplicate (duplicate)

[PATCH] Reactor sometimes refuses to start on Windows (can't assign requested address for InstallWaker)

Reported by: Szumo Owned by:
Priority: normal Milestone:
Component: core Keywords: easy windows
Cc: Branch:
Author: Szumo


Trying to start trial on Windows sometimes results in following traceback:

    from twisted.internet import reactor, protocol, error, defer
  File "c:\python25\lib\site-packages\twisted-10.0.0-py2.5-win32.egg\twisted\internet\", line 38, in <module>
  File "c:\python25\lib\site-packages\twisted-10.0.0-py2.5-win32.egg\twisted\internet\", line 200, in install
    reactor = SelectReactor()
  File "c:\python25\lib\site-packages\twisted-10.0.0-py2.5-win32.egg\twisted\internet\", line 72, in __init__
  File "c:\python25\lib\site-packages\twisted-10.0.0-py2.5-win32.egg\twisted\internet\", line 171, in __init__
  File "c:\python25\lib\site-packages\twisted-10.0.0-py2.5-win32.egg\twisted\internet\", line 470, in __init__
  File "c:\python25\lib\site-packages\twisted-10.0.0-py2.5-win32.egg\twisted\internet\", line 892, in _initThreads
  File "c:\python25\lib\site-packages\twisted-10.0.0-py2.5-win32.egg\twisted\internet\", line 207, in installWaker
    self.waker = _Waker(self)
  File "c:\python25\lib\site-packages\twisted-10.0.0-py2.5-win32.egg\twisted\internet\", line 75, in __init__
  File "<string>", line 1, in connect
socket.error: (10049, "Can't assign requested address")

It turns out socket.getsockname _sometimes_ returns ('', port) instead of ('', port) on Windows.

I use attached simple patch to fix the problem, could one of core developers please review/commit it.

Attachments (1)

patch (692 bytes) - added by Szumo 10 years ago.
Patch to internet/

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Szumo

Attachment: patch added

Patch to internet/

comment:1 Changed 10 years ago by Jean-Paul Calderone

Resolution: duplicate
Status: newclosed

Thanks for the patch. This looks a lot like a duplicate of #3831, though. Can you re-open that ticket and comment about why it shouldn't have been closed? There's some discussion there about what causes this; if you could comment on the validity of that as well, it would be very helpful.

comment:2 Changed 10 years ago by Szumo

Did so, problem seems indeed to be caused by AVG 8.5.

comment:3 Changed 9 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.