[Twisted-Python] How do I debug this network problem?

Peter Westlake peter.westlake at pobox.com
Mon Nov 17 06:46:24 MST 2014


My previous strace output didn't include the poll() calls. This one
does, with the list of file descriptors shortened for readability.
According to the man page, the last parameter to poll() is a timeout,
in milliseconds. Looking at these calls, there are some very odd
values indeed: 154538, 154331, 2999999, 8, 0, 0, 0. The last four
calls time out, which isn't surprising if that's how long they wait!
The full strace output shows descending runs of values, with some
omissions and duplicates. If this was C, it would be an uninitialised
variable for sure.

Peter.

poll([{fd=5, events=POLLIN|POLLOUT}], 7, 154538) = 1 ([{fd=5,
revents=POLLOUT}]) sendto(5,
"\0\4_ask\0\004867c\0\10_command\0\tLogOutpu"..., 343, 0, NULL, 0) = 343
poll([{fd=5, events=POLLIN}], 7, 154537) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "\0\7_answer\0\004867c\0\6status\0\4True\0\0", 65536, 0,
NULL, NULL) = 31 poll([{fd=5, events=POLLIN|POLLOUT}], 7, 154331) = 1
([{fd=5, revents=POLLOUT}]) sendto(5,
"\0\4_ask\0\004867d\0\10_command\0\tLogOutpu"..., 183, 0, NULL, 0) = 183
poll([{fd=5, events=POLLIN}], 7, 3) = 0 (Timeout) poll([{fd=5,
events=POLLIN|POLLOUT}], 7, 299999) = 1 ([{fd=5, revents=POLLOUT}])
sendto(5, "\0\4_ask\0\004867e\0\10_command\0\4Ping\0\0", 30, 0, NULL, 0)
= 30 poll([{fd=5, events=POLLIN}], 7, 299999) = 1 ([{fd=5,
revents=POLLIN}]) recvfrom(5, 0x7fec3005c6d4, 65536, 0, 0, 0) = -1
EAGAIN (Resource temporarily unavailable) poll([{fd=5, events=POLLIN}],
7, 8) = 0 (Timeout) poll([{fd=5, events=POLLIN}], 7, 0) = 0 (Timeout)
poll([{fd=5, events=POLLIN}], 7, 0) = 0 (Timeout) poll([{fd=5,
events=POLLIN}], 7, 0) = 0 (Timeout) poll([{fd=5,
events=POLLIN|POLLOUT}], 7, 299999) = 1 ([{fd=5, revents=POLLOUT}])
sendto(5, "\0\4_ask\0\004867f\0\10_command\0\4Ping\0\0", 30, 0, NULL, 0)
= 30 poll([{fd=5, events=POLLIN}], 7, 299999) = 1 ([{fd=5,
revents=POLLIN}]) recvfrom(5,
"\0\7_answer\0\004867f\0\3ack\0\4True\0\0", 65536, 0, NULL, NULL) = 28


-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20141117/ff4b5a55/attachment-0002.html>


More information about the Twisted-Python mailing list