From: Ken Brown <kbrown@cornell.edu>
To: sten.kristian.ivarsson@gmail.com, cygwin@cygwin.com
Subject: Re: AF_UNIX/SOCK_DGRAM is dropping messages
Date: Tue, 27 Apr 2021 10:56:55 -0400 [thread overview]
Message-ID: <68a8835a-0992-296c-bf4b-28be0ff34818@cornell.edu> (raw)
In-Reply-To: <65921e52-af84-3d2f-fd01-28e5c7866a73@cornell.edu>
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
next prev parent reply other threads:[~2021-04-27 14:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 15:37 sten.kristian.ivarsson
2021-03-23 19:20 ` Glenn Strauss
2021-03-24 9:18 ` sten.kristian.ivarsson
2021-03-30 14:17 ` Ken Brown
2021-03-31 8:24 ` sten.kristian.ivarsson
2021-03-31 15:07 ` Ken Brown
2021-04-01 16:02 ` Ken Brown
2021-04-06 7:52 ` Noel Grandin
2021-04-06 14:59 ` Ken Brown
2021-04-06 14:50 ` sten.kristian.ivarsson
2021-04-06 15:24 ` Ken Brown
2021-04-07 14:56 ` Ken Brown
2021-04-08 8:37 ` sten.kristian.ivarsson
2021-04-08 19:47 ` sten.kristian.ivarsson
2021-04-08 21:02 ` Ken Brown
2021-04-13 14:06 ` sten.kristian.ivarsson
2021-04-13 14:47 ` Ken Brown
2021-04-13 22:43 ` Ken Brown
2021-04-14 15:53 ` Ken Brown
2021-04-14 17:14 ` sten.kristian.ivarsson
2021-04-14 21:58 ` Ken Brown
2021-04-15 13:15 ` sten.kristian.ivarsson
2021-04-15 15:01 ` Ken Brown
2021-04-27 14:56 ` Ken Brown [this message]
2021-04-28 7:15 ` sten.kristian.ivarsson
2021-08-12 12:56 ` sten.kristian.ivarsson
2021-08-13 11:19 ` Ken Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=68a8835a-0992-296c-bf4b-28be0ff34818@cornell.edu \
--to=kbrown@cornell.edu \
--cc=cygwin@cygwin.com \
--cc=sten.kristian.ivarsson@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).