{"action":"created","issue":{"url":"https://api.github.com/repos/mirage/mirage-tcpip/issues/157","labels_url":"https://api.github.com/repos/mirage/mirage-tcpip/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/mirage/mirage-tcpip/issues/157/comments","events_url":"https://api.github.com/repos/mirage/mirage-tcpip/issues/157/events","html_url":"https://github.com/mirage/mirage-tcpip/issues/157","id":91431793,"number":157,"title":"Possible regression in 2.5.0 - iperf test w/packet loss frequently times out","user":{"login":"MagnusS","id":1076486,"avatar_url":"https://avatars.githubusercontent.com/u/1076486?v=3","gravatar_id":"","url":"https://api.github.com/users/MagnusS","html_url":"https://github.com/MagnusS","followers_url":"https://api.github.com/users/MagnusS/followers","following_url":"https://api.github.com/users/MagnusS/following{/other_user}","gists_url":"https://api.github.com/users/MagnusS/gists{/gist_id}","starred_url":"https://api.github.com/users/MagnusS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MagnusS/subscriptions","organizations_url":"https://api.github.com/users/MagnusS/orgs","repos_url":"https://api.github.com/users/MagnusS/repos","events_url":"https://api.github.com/users/MagnusS/events{/privacy}","received_events_url":"https://api.github.com/users/MagnusS/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-27T08:13:52Z","updated_at":"2015-07-01T10:02:42Z","closed_at":null,"body":"A few weeks ago I was able to run the iperf test w/uniform packet loss 150 times locally without timeout (as mentioned [here](https://github.com/mirage/mirage-tcpip/pull/142)) with the master branch. I just repeated the experiment with current master (f31810cb9a0a02745fa9dc6abb8162ee05e96c0a) and after a few attempts I've been unable to run more than max 8 tests in a row. Release 2.5.0 (455263dcc47409fbb1266c8a6553230a8b6f6d87) also times out frequently. \r\n\r\nWith rev aab57095018b6afa8b6c30abc0e3c4957fe7fcea the test runs fine. To rule out a bug in the newest version of the test I've also tried using the tests from master with aab57095018b6afa8b6c30abc0e3c4957fe7fcea and got the same result (no timeouts). I also tried to double the timeout, in case it was caused by the reduced performance of the recently merged debug branch, but the test still times out - the connection seems to just stall when the test fails (see pcap output below).\r\n\r\nThis is the command I use - it runs 100 iperf tests and terminates if one of them fails. \r\n```\r\nfor c in $(seq 1 100); do echo $c; date; ./test.byte test iperf 2 -v || break ; done\r\n```\r\n\r\nI've also increased the data size from 10mb back to 25mb in [lib_tests/lib_iperf.ml](https://github.com/mirage/mirage-tcpip/blob/master/lib_test/test_iperf.ml#L220), as this was set lower to reduce timeouts in Travis. With 10mb the test is less likely to timeout, but it is still unreliable (I was able to run 20 tests with 10mb vs 8 with 25mb).\r\n\r\nHere are the last packets in the pcap output from three failed tests.\r\n\r\n```\r\n28749 109.963717   10.0.0.101 -> 10.0.0.100   TCP 1514 [TCP Previous segment not captured] 14476 > 5001 [PSH, ACK] Seq=21089701 Ack=1 Win=262140 Len=1460\r\n28750 109.963846   10.0.0.101 -> 10.0.0.100   TCP 1514 14476 > 5001 [PSH, ACK] Seq=21091161 Ack=1 Win=262140 Len=1460\r\n28751 109.963906   10.0.0.100 -> 10.0.0.101   TCP 54 [TCP Dup ACK 28748#1] 5001 > 14476 [ACK] Seq=1 Ack=21088241 Win=262140 Len=0\r\n28752 109.964019   10.0.0.101 -> 10.0.0.100   TCP 1514 14476 > 5001 [PSH, ACK] Seq=21092621 Ack=1 Win=262140 Len=1460\r\n28753 109.964080   10.0.0.100 -> 10.0.0.101   TCP 54 [TCP Dup ACK 28748#2] 5001 > 14476 [ACK] Seq=1 Ack=21088241 Win=262140 Len=0\r\n```\r\n\r\n```\r\n29957 104.624361   10.0.0.100 -> 10.0.0.101   TCP 54 [TCP Dup ACK 29951#3] 5001 > 10208 [ACK] Seq=1 Ack=21978841 Win=262140 Len=0\r\n29958 104.624419   10.0.0.101 -> 10.0.0.100   TCP 1514 [TCP Fast Retransmission] 10208 > 5001 [PSH, ACK] Seq=21978841 Ack=1 Win=262140 Len=1460\r\n29959 104.624589   10.0.0.100 -> 10.0.0.101   TCP 54 5001 > 10208 [ACK] Seq=1 Ack=21984681 Win=262140 Len=0\r\n29960 104.624684   10.0.0.101 -> 10.0.0.100   TCP 1514 [TCP Previous segment not captured] 10208 > 5001 [PSH, ACK] Seq=21986141 Ack=1 Win=262140 Len=1460\r\n29961 104.624788   10.0.0.100 -> 10.0.0.101   TCP 54 [TCP Dup ACK 29959#1] 5001 > 10208 [ACK] Seq=1 Ack=21984681 Win=262140 Len=0\r\n```\r\n```\r\n9338 103.079093   10.0.0.100 -> 10.0.0.101   TCP 54 5001 > 14140 [ACK] Seq=1 Ack=6841561 Win=262140 Len=0\r\n9339 103.079269   10.0.0.101 -> 10.0.0.100   TCP 1514 [TCP Previous segment not captured] 14140 > 5001 [PSH, ACK] Seq=6843021 Ack=1 Win=262140 Len=1460\r\n9340 103.079326   10.0.0.100 -> 10.0.0.101   TCP 54 [TCP Dup ACK 9338#1] 5001 > 14140 [ACK] Seq=1 Ack=6841561 Win=262140 Len=0\r\n9341 103.079439   10.0.0.101 -> 10.0.0.100   TCP 1514 14140 > 5001 [PSH, ACK] Seq=6844481 Ack=1 Win=262140 Len=1460\r\n9342 103.079501   10.0.0.100 -> 10.0.0.101   TCP 54 [TCP Dup ACK 9338#2] 5001 > 14140 [ACK] Seq=1 Ack=6841561 Win=262140 Len=0\r\n```\r\n\r\nThis test sent 92 dup ack's before stalling:\r\n```\r\n29331  96.955952   10.0.0.101 -> 10.0.0.100   TCP 1514 [TCP Previous segment not captured] 18257 > 5001 [PSH, ACK] Seq=21510181 Ack=1 Win=262140 Len=1460\r\n29332  96.956058   10.0.0.100 -> 10.0.0.101   TCP 54 [TCP Dup ACK 29330#1] 5001 > 18257 [ACK] Seq=1 Ack=21508721 Win=262140 Len=0\r\n29333  96.956126   10.0.0.101 -> 10.0.0.100   TCP 1514 18257 > 5001 [PSH, ACK] Seq=21511641 Ack=1 Win=262140 Len=1460\r\n29334  96.956231   10.0.0.100 -> 10.0.0.101   TCP 54 [TCP Dup ACK 29330#2] 5001 > 18257 [ACK] Seq=1 Ack=21508721 Win=262140 Len=0\r\n29335  96.956295   10.0.0.101 -> 10.0.0.100   TCP 1514 18257 > 5001 [PSH, ACK] Seq=21513101 Ack=1 Win=262140 Len=1460\r\n[...]\r\n29514  96.979388   10.0.0.100 -> 10.0.0.101   TCP 54 [TCP Dup ACK 29330#92] 5001 > 18257 [ACK] Seq=1 Ack=21508721 Win=262140 Len=0\r\n29515  96.979492   10.0.0.101 -> 10.0.0.100   TCP 1514 18257 > 5001 [PSH, ACK] Seq=21644501 Ack=1 Win=262140 Len=1460\r\n```"},"comment":{"url":"https://api.github.com/repos/mirage/mirage-tcpip/issues/comments/117575641","html_url":"https://github.com/mirage/mirage-tcpip/issues/157#issuecomment-117575641","issue_url":"https://api.github.com/repos/mirage/mirage-tcpip/issues/157","id":117575641,"user":{"login":"yomimono","id":4086825,"avatar_url":"https://avatars.githubusercontent.com/u/4086825?v=3","gravatar_id":"","url":"https://api.github.com/users/yomimono","html_url":"https://github.com/yomimono","followers_url":"https://api.github.com/users/yomimono/followers","following_url":"https://api.github.com/users/yomimono/following{/other_user}","gists_url":"https://api.github.com/users/yomimono/gists{/gist_id}","starred_url":"https://api.github.com/users/yomimono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yomimono/subscriptions","organizations_url":"https://api.github.com/users/yomimono/orgs","repos_url":"https://api.github.com/users/yomimono/repos","events_url":"https://api.github.com/users/yomimono/events{/privacy}","received_events_url":"https://api.github.com/users/yomimono/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T10:02:42Z","updated_at":"2015-07-01T10:02:42Z","body":"Still failing in a855bac542 (current latest) , unfortunately."}}