[Python-Dev] Buildbot timing out - test suite failure (original) (raw)
[Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?
Martin Panter vadmium+py at gmail.com
Thu Jan 28 03:35:59 EST 2016
- Previous message (by thread): [Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?
- Next message (by thread): [Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
After digging through testsocket.py for over an hour (the MRO for RecvmsgUDP6Test is enormous!!), I've boiled the issue down to this:
import socket MSG = b'asdf qwer zxcv' serv = socket.socket(socket.AFINET6, socket.SOCKDGRAM) serv.bind(("::1", 0)) cli = socket.socket(socket.AFINET6, socket.SOCKDGRAM) cli.bind(("::1", 0)) cli.sendto(MSG, serv.getsockname()) print(serv.recvmsg(len(MSG) - 3, 0, socket.MSGPEEK)) print(serv.recvmsg(len(MSG), 0, socket.MSGPEEK)) print(serv.recvmsg(len(MSG))) On my main system, this produces three lines of output: the first has truncated text, the second has full text, and the third also has full text. This proves that MSGPEEK is working correctly. On the buildbot, though, the first one stalls out. Commenting that line out produces correct results - peek the full data, then read it, and all is well. Any idea why partial read on a datagram socket would sometimes stall?
I think it would stall if there is no data to receive. Maybe check the return value of sendto(), to ensure it is sending the whole message.
Attached is a C program which should do the equivalent of your boiled-down Python script, in case that helps:
$ gcc -Wall peek-udp6.c -o peek-udp6 $ ./peek-udp6 Bytes sent: 14 Received [asdf qwer z] Received [asdf qwer zxcv] Received [asdf qwer zxcv]
Other things that come to mind are to see if there is anything odd about the buildbot’s Linux kernel and glibc versions. Maybe run the Python script under “strace” to see if anything strange is going on. -------------- next part -------------- A non-text attachment was scrubbed... Name: peek-udp6.c Type: text/x-csrc Size: 2404 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-dev/attachments/20160128/f9c68103/attachment.c>
- Previous message (by thread): [Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?
- Next message (by thread): [Python-Dev] Buildbot timing out - test suite failure - test_socket issue with UDP6?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]