X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB0D73947C01
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1619535422;
	bh=7nQNsxaCNbrst5c1tYiqZtxPW8N7xgdmWSTQLo6wrtw=;
	h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=MZNAGBXSVhEjf7NeyUsAmMdu/rqubyOOqJe41E8cOl5roUvS4vpaCI0d2RGwgC2nK
	 9RvZQzQ/oBei1rXFpyFfr6VwRFHhMNLqu4+QcjlAGPwXXO4fhf7zlbx2TVANzsAyZh
	 vjBmQOBDO8DDDA3Ep0hWOL52KRRvJ7AcogdUyUic=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 96EFD3833029
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=chH/77+ygjIYWOAf7fR1f1rGc9h6GBx8VF2WTiSKAzKV6ca9V+uR5kvzlbbLCF4TAr68AeBExCwZNwyDU/FdeXnFRa4q+4ug1+bPDXynW1zQWcw0/QVqjAfHIf7xkU3HoguJLji2/iFalhMWaVKVvkUZxm4uXEpF93nZ3VwXcEngTS4D14/bE8A+9FT/eQA9U4+4/kSxcx3qve7RQpRL6vpMFkHhPJCuLh7ha/JW102MLTlhKmSHYk8o5DhHrE6B+ZoqBIu09VNVCyFCAcL7DBt4jaRSeTiuz4S7hE943XxUQxAF082nqQexOU1D25kwlj0xP65QH4wFVYoXSWlAhQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=/TeidNXQGKUSwxnqyBBXO7H1ktNLV3QWtDTJH7OIi0w=;
 b=c7BjOvkYq18DaYz3Qel4cptEY+bc5F3PqZUbPX0S6fq72JdHhx6vfrawh7UMI8e1XCZojUe4kpihJzT/FSsalDkq04TVbkQnIHv8CpCeAkzaF91j34u9tL9DSWoh6DE/VTJiZrzkUfJiwMD8xlPsWN/YhqF1RtI1bOEsjPwl1ruS4R+aaeOhLytvCeiqGB5yOxj81Ynjq2gEBolHWuu9YgYrYM9iJ+4NacGqTg+M9pqs0LLOMjNBHdSEQ8wxiXPvdTqPCzvgEv1xpxx7yw/pNx6bppx7izTkyOWa5U7O7yjRzBmGXh2IQfKLdATaK/+MR95zMzHtZEpoIP9N4LFu2Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu;
 dkim=pass header.d=cornell.edu; arc=none
Subject: Re: AF_UNIX/SOCK_DGRAM is dropping messages
To: sten.kristian.ivarsson@gmail.com, cygwin@cygwin.com
References: <04cc01d71ffa$7d1e6cf0$775b46d0$@gmail.com>
 <YFo/fFC2bITvnVGr@xps13> <00d901d7208e$97c05c50$c74114f0$@gmail.com>
 <860668bf-8cf9-0969-6a01-7fbf8b782db1@cornell.edu>
 <000901d72607$55dc5a90$01950fb0$@gmail.com>
 <3346cd1c-b93f-83c4-ff26-553ac95ec692@cornell.edu>
 <7c21a430-9609-7fd4-1a02-8b7c1978d2f8@cornell.edu>
 <001901d72af4$4009cd50$c01d67f0$@gmail.com>
 <134074c1-4c0b-0842-b88b-536a1ed4aefe@cornell.edu>
 <000e01d7306e$3c265580$b4730080$@gmail.com>
 <19cf8626-c653-76db-a409-730a5aa5c955@cornell.edu>
 <4380cdea-c95b-d9dc-50e3-e5adabb73b92@cornell.edu>
 <000701d73151$9c259660$d470c320$@gmail.com>
 <2e64e918-b28b-753e-8337-c757cc62b9bb@cornell.edu>
 <000001d731f9$58e417c0$0aac4740$@gmail.com>
 <65921e52-af84-3d2f-fd01-28e5c7866a73@cornell.edu>
Message-ID: <68a8835a-0992-296c-bf4b-28be0ff34818@cornell.edu>
Date: Tue, 27 Apr 2021 10:56:55 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.10.0
In-Reply-To: <65921e52-af84-3d2f-fd01-28e5c7866a73@cornell.edu>
Content-Language: en-US
X-Originating-IP: [65.112.130.200]
X-ClientProxiedBy: MN2PR16CA0037.namprd16.prod.outlook.com
 (2603:10b6:208:234::6) To BN7PR04MB4388.namprd04.prod.outlook.com
 (2603:10b6:406:f8::19)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from [10.13.22.8] (65.112.130.200) by
 MN2PR16CA0037.namprd16.prod.outlook.com (2603:10b6:208:234::6) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4087.25 via Frontend Transport; Tue, 27 Apr 2021 14:56:56 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: f5a4d486-e2d9-4695-819d-08d9098cb40c
X-MS-TrafficTypeDiagnostic: BN8PR04MB6369:
X-Microsoft-Antispam-PRVS: <BN8PR04MB63690E2D25D9A03849BAA3CBD8419@BN8PR04MB6369.namprd04.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:7219;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: jDVu4p0p3bdcf5YQ0uSCcXGF531TF3D0LfMvpTPRKU1EeAPbkGJZBeN4CoNfgtvMDQE5YJSnNJ8Pd1N/hP03/RIeJMJH9pkN5PRiAaub07IHtMTBPFqv3szRgd6FewhRPu7itO1IzbW6sqGVLgDLocyyWmB25vYoEv8Dk/s7cJirdLWbbh7dDnuksMtCs7rZAYU5Y4+74Mowbt+xk/emLuFht7PFAOKFI47j9hHGq4YFyYJEmZ2Pw9qcS6aKkz0TYzO4Jzazpdehwz01sPDI4QiWpQ+6R7261yo40FnYp0xtGWdoHguu0vJCzOWwH+JaCKnCS7X4XkyMHN9ndIFsWT9CcFgpUDe6NXbZO2npQ97vk1QRtHqsZLFNpu+YhqDn847bVwQa05arincV1025XxrwhdD0id5YNJUBPmxnaK70m1afRFYJ9w977IUw5HvqELkc1kL9W7chzF6n0jfXMjvCJwaCJKYhlsboTbsfnlmY3nVWV+pp1iynkJyGSBeGzecPKW7ooW6GvbDw6sur5rHHll/bvpRirXVs5wpXVeHr4Te7ddVg9HNwBOnFd5GUx4cL4dH7aRYD5yksVJgGoiZJVAgD8ohratH17T9/CBmbig9JrGK+MKaKAgf3YAVbpUJvH1HcokoacKBIePGwdpWdM55rTPHvrY7Tn0TlFZIW1IG3gp+q6dz23ZcNKZ4kqutWMQDU90X9xdislWF7Sg==
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:BN7PR04MB4388.namprd04.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(4636009)(39860400002)(366004)(136003)(396003)(346002)(376002)(26005)(66476007)(66556008)(38100700002)(36756003)(8936002)(15650500001)(6486002)(478600001)(53546011)(83380400001)(8676002)(5660300002)(16526019)(186003)(2616005)(31696002)(16576012)(786003)(2906002)(52116002)(66946007)(31686004)(316002)(75432002)(956004)(86362001)(38350700002)(43740500002)(45980500001);
 DIR:OUT; SFP:1102; 
X-MS-Exchange-AntiSpam-MessageData: =?Windows-1252?Q?scDwRJhccLuQIikhQ5GihmGNU0QxMzdlXrpUlAVzTRnwG1J/5fDDokx4?=
 =?Windows-1252?Q?qWDA92dA4wSw1i2+KAewh8okZeg387L2SkFNgGA+n2y4IUcvKdLNIuHH?=
 =?Windows-1252?Q?pRguiGMq+Gmvv7RjO5gg1chbLjlQJUez/flyzSAxQAKg7P0qZmIMWCpi?=
 =?Windows-1252?Q?jy8/yf2eZ+qSSRUbt/+mTbRnJangsRQn4cigQGAyxXt8AWaz5EXhcjip?=
 =?Windows-1252?Q?bfGDMgMwxvSxq7I3q3h8/96CPCs0m4w//IvvsYS038BI9P4/YMiVxrZE?=
 =?Windows-1252?Q?t5oGAcxgsi60POHJHM8YWOCPO2qw1NoVdjDuFJKLQIBH13j0jROi1gKg?=
 =?Windows-1252?Q?Neh8vlfTc0V2f3iQIN5+XYYwuVf40kebi0GFTihrabaPZP0vBFCKGE26?=
 =?Windows-1252?Q?rluWgua2BqFZHnLs9B/N2yvOaliTJL9YI58+/Q2Z9jwLTSw47MQGMJyy?=
 =?Windows-1252?Q?1Jxj7SDbSVjTwgnvVxF217669crTXzzXFIrrEo6dZeikOzaPG8tokDsc?=
 =?Windows-1252?Q?ZILG8aIbaOv6rBbH0m5Q17awTzbRx97QbGUaj2+VuV7XjBNJz5YWsrEQ?=
 =?Windows-1252?Q?paJkMI3wSWbg+c5o8xRSbxG51rCu2RJc23fPDhLEv1kuJP/hyHtEvrO3?=
 =?Windows-1252?Q?hLY0as4gqSHgBvptCVTTKd9JVtkxxedZjf962jAW99sMnBlYQVwh9NFD?=
 =?Windows-1252?Q?fkH552OtmCDHvpJh+vsDnbimbcScc9pHY9dNaDLJnnZfW/hEYC913Lqe?=
 =?Windows-1252?Q?xS+HfjI9Z/SpUVxMKSmuMDosBODgG16AkrxCB3k12qg6OImlVEOcwKMV?=
 =?Windows-1252?Q?ocahwzr9/6Beh5/vAZLjSVoYhTG6mK/I4acVylG5cKtVxvK0Vhqz+YXK?=
 =?Windows-1252?Q?b4st5hEdfigsFzSbKA5EHsAPBPvFOOCuHx6NKqtwHaSG6DgzsoK8MQL+?=
 =?Windows-1252?Q?+XHk+p19W4ltJVybAkSE6qEpbmT9HR+TE7YiI5EvlTp82+uM3/TYq/kN?=
 =?Windows-1252?Q?5Bbt1h/+8b41ZbPTpzAhGFhxwZAb41hU0L2r+fK/aqj0vE2HVS/jquvw?=
 =?Windows-1252?Q?9p+gLPZv70J90Y0dkgfm4n23lO0cWsm9/eC1v/ahOMvsCjd6n11jv5P3?=
 =?Windows-1252?Q?A12+IPENE/l08RNRKbxKhX3MkNPGKXI5dTDOK36xDF2ZmltKYUVAYNxN?=
 =?Windows-1252?Q?mx8liKeVVfqZm+8Y2w7olZAj4qjYvTJFKPVeuhZPPrO07bu4tlM7Ke36?=
 =?Windows-1252?Q?r/J4vr3U6kGY5WEEKRPprrKwnVx/yajcuM99pnVePYIA4rwvyN9j49d/?=
 =?Windows-1252?Q?bgpaPwPKMej6ztYu++AcKm1pienXuIykkcYBrWWuY68JIXAhlpM70qrm?=
 =?Windows-1252?Q?R5mk6bE0pz2oG2af8ifS02aUWfJ2cKPC80/P+4VOcWVmdLn8DvbrYDUY?=
X-OriginatorOrg: cornell.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: f5a4d486-e2d9-4695-819d-08d9098cb40c
X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2021 14:56:57.2294 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: YPRV57q1WPNxb8Wb1iF/zvCsVHBhiGAYUrI0+Egn/rU+DPx8uLn2UUgVOH5c7Jtl1sMQAUsdTUkFqoF6HvzYWQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR04MB6369
X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00, DKIM_INVALID,
 DKIM_SIGNED, KAM_DMARC_STATUS, MSGID_FROM_MTA_HEADER, NICE_REPLY_A,
 RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS,
 TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Ken Brown via Cygwin <cygwin@cygwin.com>
Reply-To: Ken Brown <kbrown@cornell.edu>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 13REv5Cl026700

On 4/15/2021 11:01 AM, Ken Brown via Cygwin wrote:
> On 4/15/2021 9:15 AM, sten.kristian.ivarsson@gmail.com wrote:
>> [snip]
>>
>>>> I tried SOCK_STREAM (and SOCK_SEQPACKET I think) for CYGWIN 3.2.0 but
>>>> that didn't work at all
>>>>
>>>> As far as I understand, both all types on pretty much all
>>>> implementations preserves message ordering though
>>>>
>>>> I haven't tried SOCK_STREAM and/or SOCK_SEQPACKET with the
>>> topic/af_unix-branch. Is that worth a try ?
>>>
>>> SOCK_STREAM is definitely worth a try.  The implementation of that should be
>>> much more reliable than the implementation of SOCK_DGRAM at the
>>> moment.  We don't implement SOCK_SEQPACKET.
>>
>> It might be a complete rewrite of our semantics though, because it's 
>> connection based and allows just one writer on each "channel" and messages 
>> (chunks) cannot be handled "atomically"
> 
> In that case, let's try to get the DGRAM case to work.

I decided to (finally) dig into the AF_UNIX implementation on the master branch 
and try to understand why DGRAM sockets are unreliable.  I think the answer is 
simply that Cygwin implements AF_UNIX sockets using Windows AF_INET sockets, and 
DGRAM sockets in this setting are documented to be unreliable.  It appears that 
if too much is written without anything being read, the Windows WSASendTo 
function simply drops messages without giving any error.

Unfortunately, switching to native Windows AF_UNIX sockets wouldn't help, 
because they don't support DGRAM sockets.

I'm going to follow up on cygwin-developers.

Ken

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

