[Python-Dev] socket listen problem under aix
Michael Petroni
michael at petroni.cc
Mon Nov 10 14:38:56 EST 2003
hi!
sorry for posting here as a non-member and non-developer, but i've a
problem that is (maybe) a bug:
i'm running python 2.2.3 under aix 4.3.3 compiled with gcc version
2.9-aix51-020209.
subsequent accept calls in the socket library block after a defined
number of calls depending on the accept queue size. the call then never
returns, a connection to the server port gets a timeout and netstat -a
still shows the port as listening.
see the following example code:
----
import socket
queue_size = 6
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("", 7111))
s.listen(queue_size)
while 1:
(c, addr) = s.accept()
c.close()
----
depending on "queue_size" the loop blocks after n calls:
size calls
1 1
2 3
3 4
4 6
5 7
6 9
i've tried the same code on various other systems with different python
versions -> no problem at all. looks like that some ressources for the
tcp connection queue are not freed any more.
have i found a bug or did i miss something?
sorry for the inconvenience once more and
thx.
mike
More information about the Python-Dev
mailing list