From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Fw: [Bug 199995] New: Ramdomly sent TCP Reset from Kernel with bonding mode "brodcast" Date: Fri, 8 Jun 2018 09:59:54 -0700 Message-ID: <20180608095954.4a0437e4@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: Eric Dumazet Return-path: Received: from mail-pg0-f54.google.com ([74.125.83.54]:34239 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751244AbeFHQ75 (ORCPT ); Fri, 8 Jun 2018 12:59:57 -0400 Received: by mail-pg0-f54.google.com with SMTP id q4-v6so5604063pgr.1 for ; Fri, 08 Jun 2018 09:59:57 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: Begin forwarded message: Date: Fri, 08 Jun 2018 16:06:40 +0000 From: bugzilla-daemon@bugzilla.kernel.org To: stephen@networkplumber.org Subject: [Bug 199995] New: Ramdomly sent TCP Reset from Kernel with bonding mode "brodcast" https://bugzilla.kernel.org/show_bug.cgi?id=199995 Bug ID: 199995 Summary: Ramdomly sent TCP Reset from Kernel with bonding mode "brodcast" Product: Networking Version: 2.5 Kernel Version: since 4.15.0 Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: IPV4 Assignee: stephen@networkplumber.org Reporter: l.bendel@portunity.de Regression: No Created attachment 276401 --> https://bugzilla.kernel.org/attachment.cgi?id=276401&action=edit TCP Dump Hi, after a dist upgrade from Ubuntu 17.10 (Kernel 4.13.x) to Ubuntu 18.04 (Kernel 4.15.0) I suffer from ramdomly generated TCP RST packets sent (presumably) by the Kernel on a bonding device that uses bonding mode "brodcast" with 2 physical NICs. With tcpdump/whireshark I can see that the kernel randomly sends TCP-RST packets after the SYN/ACK/ACK packet is received (see attached PCAP). This only happens if the kernel receives the initial SYN packet on both physical NICs (and therefore seeing it twice), before the connection is established by sending SYN/ACK. It's not happening in 100% of all cases and only, if the system can use two or more CPU cores/threads. With only one CPU available to the system, this behaviour is not reproducable. I can reproduce this on multiple physical servers with 2 bonded Intel NICs connected over 2 seperate Switches and with virtual machines on a KVM Host using 2 dedicated host bridges. This also happens with a fresh installed Ubuntu 18.04 and Fedora 28 (kernel 4.16), so I decided to compile and boot with Kernel 4.17.0 on ubuntu, getting the same result. Only disabling/blocking the second network connection or reducing the amount of CPU cores of the VM to one core solves the problem, so I think this could be a race condition on systems with more than one CPU core and thread. For my tests I used a very basic Ubuntu 18.04 (x86-64) running xinetd tcp-echo service (port 7/TCP). On the client I used the netcat-traditional packet with the following command: while true; do echo $(date) | nc.traditional -q 1 ECHO-SERVER 7; sleep 0.1 ; done This gives the following output: --------------------------------------- Fr 8. Jun 09:12:43 UTC 2018 Fr 8. Jun 09:12:43 UTC 2018 Fr 8. Jun 09:12:43 UTC 2018 Fr 8. Jun 09:12:43 UTC 2018 Fr 8. Jun 09:12:43 UTC 2018 Fr 8. Jun 09:12:43 UTC 2018 Fr 8. Jun 09:12:43 UTC 2018 Fr 8. Jun 09:12:43 UTC 2018 (UNKNOWN) [192.168.86.101] 7 (echo) : Connection reset by peer (UNKNOWN) [192.168.86.101] 7 (echo) : Connection reset by peer (UNKNOWN) [192.168.86.101] 7 (echo) : Connection reset by peer Fr 8. Jun 09:12:44 UTC 2018 Fr 8. Jun 09:12:44 UTC 2018 Fr 8. Jun 09:12:44 UTC 2018 Fr 8. Jun 09:12:44 UTC 2018 Fr 8. Jun 09:12:44 UTC 2018 Fr 8. Jun 09:12:44 UTC 2018 Fr 8. Jun 09:12:44 UTC 2018 Fr 8. Jun 09:12:44 UTC 2018 Fr 8. Jun 09:12:44 UTC 2018 Fr 8. Jun 09:12:44 UTC 2018 (UNKNOWN) [192.168.86.101] 7 (echo) : Connection reset by peer (UNKNOWN) [192.168.86.101] 7 (echo) : Connection reset by peer Fr 8. Jun 09:12:44 UTC 2018 --------------------------------------- -- You are receiving this mail because: You are the assignee for the bug.