-
-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
The CI reported this issue with mptcp_connect.sh -m mmap:
# INFO: disconnect
# 63 ns1 MPTCP -> ns1 (10.0.1.1:20001 ) MPTCP (duration 3292ms) [ OK ]
# 64 ns1 MPTCP -> ns1 (10.0.1.1:20002 ) TCP (duration 61300ms) [FAIL] client exit code 124, server 0
#
# netns ns1-0GyOLu (listener) socket stat for 20002:
# Failed to find cgroup2 mount
# Failed to find cgroup2 mount
# Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
# tcp LAST-ACK 0 1243655 10.0.1.1:20002 10.0.1.1:35890 timer:(persist,034ms,0) ino:0 sk:a7 cgroup:unreachable:1 ---
# skmem:(r0,rb131072,t0,tb2626560,f2810,w1266950,o0,bl0,d114) ts sack cubic wscale:10,10 rto:206 rtt:5.878/10.251 ato:40 mss:47616 pmtu:65535 rcvmss:47616 advmss:65483 cwnd:10 bytes_sent:5400576 bytes_acked:5400576 bytes_received:6644231 segs_out:332 segs_in:280 data_segs_out:115 data_segs_in:164 send 648057162bps lastsnd:172 lastrcv:17371 lastack:172 pacing_rate 1295976520bps delivery_rate 1295673464bps delivered:116 busy:17368ms rwnd_limited:17367ms(100.0%) rcv_rtt:1 rcv_space:65483 rcv_ssthresh:94770 notsent:1243655 minrtt:0.205 rcv_wnd:95232
# TcpActiveOpens 3 0.0
# TcpPassiveOpens 3 0.0
# TcpInSegs 1966 0.0
# TcpOutSegs 1969 0.0
# TcpExtTW 2 0.0
# TcpExtDelayedACKs 1 0.0
# TcpExtTCPPureAcks 882 0.0
# TcpExtTCPFromZeroWindowAdv 98 0.0
# TcpExtTCPToZeroWindowAdv 98 0.0
# TcpExtTCPWantZeroWindowAdv 1 0.0
# TcpExtTCPOrigDataSent 888 0.0
# TcpExtTCPACKSkippedSeq 95 0.0
# TcpExtTCPWinProbe 193 0.0
# TcpExtTCPDelivered 891 0.0
# MPTcpExtMPCapableSYNTX 3 0.0
# MPTcpExtMPCapableFallbackSYNACK 3 0.0
#
# netns ns1-0GyOLu (connector) socket stat for 20002:
# Failed to find cgroup2 mount
# Failed to find cgroup2 mount
# Failed to find cgroup2 mount
# Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
# tcp FIN-WAIT-2 0 0 10.0.1.1:35890 10.0.1.1:20002 ino:48603 sk:10b6 cgroup:unreachable:1 <--
# skmem:(r0,rb131072,t0,tb2626560,f2304,w0,o0,bl0,d194) ts sack cubic wscale:10,10 rto:203 rtt:2.522/0.68 ato:80 mss:47616 pmtu:65535 rcvmss:47616 advmss:65483 cwnd:10 bytes_sent:6644230 bytes_acked:6644232 bytes_received:5400576 segs_out:280 segs_in:334 data_segs_out:164 data_segs_in:115 send 1510420301bps lastsnd:17705 lastrcv:506 lastack:506 pacing_rate 3020690880bps delivery_rate 95351184bps delivered:165 busy:1113ms rwnd_limited:1088ms(97.8%) rcv_rtt:1.053 rcv_space:65495 rcv_ssthresh:95232 minrtt:0.161 snd_wnd:95232 tcp-ulp-mptcp flags:mc token:0000(id:0)/571c8429(id:0) seq:5365760 sfseq:5365761 ssnoff:3679620128 maplen:34816
# tcp TIME-WAIT 0 0 10.0.1.1:42406 10.0.1.1:20002 timer:(timewait,19sec,0) ino:0 sk:10b7
#
# tcp TIME-WAIT 0 0 10.0.1.1:55632 10.0.1.1:20002 timer:(timewait,41sec,0) ino:0 sk:10b8
#
# mptcp FIN-WAIT-2 132736 0 10.0.1.1:35890 10.0.1.1:20002 timer:(keepalive,59sec,0) ino:0 sk:10b9 cgroup:unreachable:1 ---
# skmem:(r132736,rb131072,t0,tb2630656,f128,w0,o0,bl0,d0) subflows_max:2 fallback token:571c8429 write_seq:9551119985441430328 snd_una:9551119985441430328 rcv_nxt:5400576 bytes_sent:6644230 bytes_received:5400576 bytes_acked:6644231 last_data_sent:17836 last_data_recv:513 last_ack_recv:61817
#
# 65 ns1 MPTCP -> ns1 (dead:beef:1::1:20003) MPTCP (duration 3289ms) [ OK ]
# 66 ns1 MPTCP -> ns1 (dead:beef:1::1:20004) TCP (duration 60007ms) [ OK ]
# 67 ns1 TCP -> ns1 (dead:beef:1::1:20005) MPTCP (duration 3176ms) [ OK ]
# [FAIL] Tests of the full disconnection have failed
It looks like the last data + fin are dropped by the MPTCP stack.
From Paolo:
I think commit dbbbba3 is wrong. If fin is carried by a data packet,
subflow_state_change()/subflow_sched_work_if_closed()will be executed before the dummy mapping for the incoming packet is created (tcp_queue_data()will happen later). The dummy mapping for the dummy data fin will be wrong (will reference/use the previous dummy mapping seq number) and will be ignored by the stack
on the flip side the above should be reproducible with pktdrill:
- fallback
- kernel shutdown
- incoming pktdrill fin + data
- kernel socket should be closed, will be stuck in fin_wait2?