From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cann Subject: Re: UDP packets arriving on wrong sockets Date: Fri, 3 Aug 2018 00:19:11 -0400 Message-ID: <20180803041911.GA30724@canndrew.org> References: <20180802090505.GA29624@canndrew.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PNTmBPCT7hxwcZjr" Cc: netdev@vger.kernel.org To: Willem de Bruijn Return-path: Received: from canndrew.org ([199.167.29.165]:36772 "EHLO canndrew.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726301AbeHCGNe (ORCPT ); Fri, 3 Aug 2018 02:13:34 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Thu, Aug 02, 2018 at 11:21:41AM -0400, Willem de Bruijn wrote: > You have two sockets bound to the same address and port? Is this using > SO_REUSEPORT? Yes, this is using SO_REUSEPORT. My colleague wrote a python reproducer for this here: https://gist.github.com/povilasb/53f1c802dbc2aca36a0ffa5b4cb95536 If you run server.py, then client.py, you should see packets arriving at opposite sockets about half the time. My kernel version is NixOS 4.14.51, he tested on two different machines - a debian 4.9.0 and fedora 28 4.17.2. We can reproduce this on all kernels we tested. Thanks in advance for any help you can give :) - Andrew --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJbY9e/AAoJEJQq94U5BTTOBOkQALLfA/ipzl2sFxxpesUWo7wc C+9RGUbU7eKfYHjhaYlMy+YpcIsis5faINBvGFoBBf2MKtk4yRhGbmjqBFHq6EDU SxW4FhAi5fc4bh90vuNUNMLv187B5K8NwhgOmMMouNC1NIF0fGTZgz6qhDUa4KEL RAVZkXw9oSNIb4U7Qg7ZGaNY6umJS22XNPOPBMIGGiB7RVSx2TSGjGYk35vwwq6L ypGL+4VCjobMEdT4Dj05r8P+6kj9jbsSm57ns3QlgKrE//j2PnAXNJ1nZCqmEnye yx9nlqhhtEXwyHVlWT0BBVPZWIft2k6tBpZTt3IF6KHPe63vmvEMS6pJceo5uHqT Lt23qvITNJmug6Aa84foIZN5spV2q58ud/Op4WOkTO/CAM6y4e/o1QsnGjj++MOj NL1eaYHwlqOd2GoW2cUxsQ34blH6q09qA3gGD6wEmWD+DGUpuuXB1hPEo4fU4t/x z9qe11/YA1mSkDsbk7bgNOqbDJ9r4dQr064Bp653A3l+cgEJg5PYsLbiS2Linfmb uJJp7cfQhIXvrG+4v4ui4f4SSF4/POkqk1pK5uGwMrdZVexSy7sMed19WBdbCfB1 MptERf6P7n7X1ru45WlJdm0FH8TNwz5O2k3U4yWOcN2vqqYItGRhA7q5UvNxzDEV 9ETjA1NIwnz+YHdCVUnJ =GOjA -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--