TCP mode doesn't work correctly with two mtr's processes running simultaneously
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mtr |
New
|
Undecided
|
Unassigned |
Bug Description
When you use TCP mode in curses interface mode in two mtr processes running simultaneously hops from one process "leaks" to another process.
How to reproduce? First run simultaneously two mtr processes to two different directions A and B in report mode:
* Direction A
[grey@GreyPad tmp]$ mtr -Twrbc10800 onet.pl
Start: Mon Mar 2 21:00:12 2015
HOST: GreyPad Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.1.0.1 0.0% 10800 248.0 48.8 0.9 7022. 221.6
2.|-- 89-77-124-
3.|-- 89-75-6-
4.|-- 84.116.253.97 0.1% 10800 198.3 -92.5 -1711 62725 18684.4
5.|-- 84.116.253.118 0.1% 10800 212.8 512.6 7.4 14988 20151.4
6.|-- pni-pl-
7.|-- sdr1.m11r2.
8.|-- sg1.any.onet.pl (213.180.141.140) 0.0% 10800 252.0 101.7 11.0 7035. 196.7
* Direction B
[grey@GreyPad tmp]$ mtr -Twrbc10800 anidb.net
Start: Mon Mar 2 21:00:11 2015
HOST: GreyPad Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.1.0.1 0.0% 10800 274.8 46.1 0.9 7016. 226.4
2.|-- 89-77-124-
3.|-- 89-75-6-
4.|-- 84.116.253.185 0.1% 10800 258.1 384.7 12.6 18628 20063.2
5.|-- 84.116.138.94 0.1% 10800 147.4 270.2 -1499 18853 26810.4
6.|-- 213.46.178.90 0.1% 10800 138.5 655.4 11.4 19693 28885.0
7.|-- ae-5-5.
8.|-- 4.28.92.190 0.1% 10800 468.8 330.8 -2093 16223 28388.8
9.|-- static-
10.|-- static-
Results are normal and are good referential meterial. Second step is to run simultaneously two mtr processes to the same directions A and B but in curses mode:
* Direction A
GreyPad (0.0.0.0) Wed Mar 4 22:39:23 2015
Keys: Help Display mode Restart statistics Order of fields quit
Host Loss% Snt Last Avg Best Wrst StDev
1. 10.1.0.1 0.0% 1105 3.0 7.3 0.9 1005. 51.1
2. 89-77-124-
84.116.138.94
89-
3. 89-75-6-
4.28.92.190
84.116.138.94
4. 84.116.253.97 0.9% 1104 77.2 40.0 9.4 3071. 123.7
5. 84.116.253.118 0.1% 1104 58.3 462.5 8.4 47011 14154
84.116.253.185
6. pni-pl-
7. sdr1.m11r2.
10.1.0.1
8. sg1.any.onet.pl (213.180.141.140) 0.0% 1104 130.6 115.1 14.1 1122. 58.5
* Direction B
GreyPad (0.0.0.0) Wed Mar 4 22:39:20 2015
Keys: Help Display mode Restart statistics Order of fields quit
Host Loss% Snt Last Avg Best Wrst StDev
1. 10.1.0.1 0.0% 1098 5.8 6.1 0.9 1001. 42.0
2. 89-77-124-
84.116.253.97
3. 89-75-6-
4. 84.116.253.185 0.4% 1097 79.3 472.5 15.3 46793 14152
84.116.253.97
5. 84.116.138.94 0.4% 1097 95.2 39.4 12.9 1016. 55.5
6. 213.46.178.90 0.4% 1097 170.2 43.9 15.1 585.7 49.1
7. ae-5-5.
8. 4.28.92.190 0.9% 1097 322.1 1133. 176.5 10086 30588
pni-
9. static-
static-
sdr1.
10. static-
As you can see results are strange. E.g.:
For Direction A 7th hop 10.1.0.1 is the same as 1st.
For Direction A 3th hop 4.28.92.190 is the same as 8th hop in Direction B traceroute.
For Direction B 9th hop 213.180.151.129 is the same as 7th hop in Direction A.
This results are strange because are imposible.
10.1.0.1 is my local router so it can't be 7th hop.
4.28.92.190 is Level3 hop in USA. In reality trafic from me to onet.pl goes only through Polish networks. But 4.28.92.190 is of course normal hop for anidb.net.
213.180.151.129 is IP address in onet.pl datacenter. Referential traceroutes proves that traffic from me to anidb.net doesn't goes through onet.pl datacenter in Krakow in Poland.
I can always reproduce above strange behavior. From my home, my office or from any other place. You just have to wait a couple of minutes and strange hops appears.
This patch resolves the problem.
https:/ /github. com/yvs2014/ mtr/commit/ ca79a82b75e1355 8da88643a021630 b44bef51e1