From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by sourceware.org (Postfix) with ESMTPS id 444EE393839A for ; Wed, 28 Apr 2021 07:15:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 444EE393839A Received: by mail-lf1-x12d.google.com with SMTP id h36so43381650lfv.7 for ; Wed, 28 Apr 2021 00:15:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:content-language :thread-index; bh=/xXCMYL97nHGVit7rbsioLxVea3NsV3ThQUxzX5sBAk=; b=FyCLB6KToCOMoK1rd3bg368fcHEdoL8hUqeDflrHRJ3YFD6R75UnKsU1YJPzVjO7R3 F0+pivLtH/pabIJAAN2onR3R2TRDBlD7gbeqVkMvN0LjhEv0m5HH3GtGyZHbj5v+UnlJ ZRYOEibdCiAg07SroEzHGZOd5Gc+5wzkKq4KH23qD++m6mfZRmZCKEneeSHVzhGIgs0f mPSKUJ3dy0Vd9cd7yNVt8Zav/EAO8Mf3zedtJ0RFlQfcMMENP7Ik4IehiWI3Vu6bFbu8 XhR0nFPBTqgXCLb4mBg+hyUKLcE0XaOVqq6P6X0BuCFzUOE3vKc4K0rs+kTXO/oZ7YRC Ad2Q== X-Gm-Message-State: AOAM5307ymwX9mO9PB9PY3qQmvS23Aiyksz6U6neLIl66gf6o3LCtrMT zFziRlAN0bd0to6PaOTwDOei0K8TK3Q= X-Google-Smtp-Source: ABdhPJy5agswusSOfDIuQLXSXKilp5Hxj8JGVvVju5AFph2XUMzKPmJ+EiMIemWvnkv0Nh+9XeeRSg== X-Received: by 2002:a05:6512:2037:: with SMTP id s23mr19122166lfs.358.1619594123125; Wed, 28 Apr 2021 00:15:23 -0700 (PDT) Received: from zingo (87-249-172-112.ljusnet.se. [87.249.172.112]) by smtp.gmail.com with ESMTPSA id h11sm503541lfc.142.2021.04.28.00.15.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Apr 2021 00:15:22 -0700 (PDT) From: To: "'Ken Brown'" , References: <04cc01d71ffa$7d1e6cf0$775b46d0$@gmail.com> <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> <68a8835a-0992-296c-bf4b-28be0ff34818@cornell.edu> In-Reply-To: <68a8835a-0992-296c-bf4b-28be0ff34818@cornell.edu> Subject: RE: AF_UNIX/SOCK_DGRAM is dropping messages Date: Wed, 28 Apr 2021 09:15:22 +0200 Message-ID: <003d01d73bfe$416c7d80$c4457880$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: en-se Thread-Index: AQIPffBCgY7dkx32YYBd4buxXBOzegICwCl2At957CQCAh4QbgK/qZQ0Aiflzi4DDsW9ugMOPnyiAg8iLcEB0zQOqwLLQMAbAeO3FIwBoD1qHQE1vHVhAjxJi8UBxXDYsAIYgnI1qT2sJgA= X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 07:15:28 -0000 > >> [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. >=20 > 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. Yeah, that was my amateur analysis as well a while ago > Unfortunately, switching to native Windows AF_UNIX sockets wouldn't = help, > because they don't support DGRAM sockets.=20 That's a bummer =E2=98=B9 > I'm going to follow up on cygwin-developers. Great, I'll read about it there Keep up the good work Best regards, Kristian > Ken