public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: Jon Turney <jon.turney@dronecode.org.uk>
Cc: cygwin-developers@cygwin.com
Subject: Re: glib2.0 2.64.6-1 (TEST)
Date: Mon, 7 Aug 2023 11:51:02 +0200	[thread overview]
Message-ID: <ZNC+hlOsXu3IVU/X@calimero.vinschen.de> (raw)
In-Reply-To: <a4f26632-3d99-fac7-3de1-e5b295ff09b2@dronecode.org.uk>

On Aug  4 18:04, Jon Turney wrote:
> On 26/07/2023 15:33, Corinna Vinschen wrote:
> > On Jul  3 15:49, Jon Turney wrote:
> > > On 02/07/2023 15:30, Jon Turney wrote:
> > > > 
> > > > The following packages have been uploaded to the Cygwin distribution:
> > > > 
> > > > * libglib2.0_0-2.64.6-1
> > > > * libglib2.0-devel-2.64.6-1
> > > > * libglib2.0-doc-2.64.6-1
> > > > 
> > > [...]
> > > > 
> > > > There are many test-suite failures, however, as far as I can tell, they
> > > > are not regressions, so this should work as well as it ever did.
> > > 
> > > At least some of these test failures are due to bugs or shortcomings in the
> > > Cygwin DLL. In an ideal world, I'd have the time and motivation to
> > > investigate them all, but here's a brief summary of the few I looked into
> > > ...
> [...]
> > > 
> > > all the GDbus tests: these seem to get stuck during the handshake for an
> > > emulated unix-domain socket, somehow (It seems like all the dbus pacakge
> > > tests fail also, probably in the same way)
> > 
> > Does an extra call to setsockopt(fd, SOL_SOCKET, SO_PEERCRED, NULL, 0)
> > fix this, perhaps?
> > 
> 
> I don't quite understand where this call is supposed to go? In the client?
> in the listener?

Yes, both.  This switches off the handshake before calling connect or
accept.

> Isn't SO_PEERCRED only valid with getsockopt()?

Not after Christian Franke ported postfix to Cygwin back in 2014,
see commit 697b9afe00c21, especially the new comment in setsockopt.

The whole problem stems from the fact that we need to know that the
partner on the other side is a local Cygwin process and that it's
also an AF_UNIX emulation.  To accomplish that, Egor Duda introduced
the connect/accept handshake in commit 619f7fa0324c0 back in 2001.

The peercred stuff is in fact just some extra info we exchange during
that handshake, so maybe using SO_PEERCRED to switch off the handshake
was a bit weird.

If this is really the problem in your case, too, we should perhaps think
of a new solution to the problem we're trying to fix with the handshake.
I'm open to suggestions.

The unfinished work on fhandler/socket_unix.c using Windows Pipes was
one idea, but it's more complex than anticipated.  Another idea might
be to create a shared memory with a reproducible name, accessible from
both sides and used for the info handshake...


Corinna

      reply	other threads:[~2023-08-07  9:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <adaf0c49-3ab2-c883-474e-f9e00f79c5bb@dronecode.org.uk>
2023-07-03 14:49 ` Jon Turney
2023-07-26 14:33   ` Corinna Vinschen
2023-07-26 15:56     ` Jon Turney
2023-07-28 15:17     ` Jon Turney
2023-08-04 17:04     ` Jon Turney
2023-08-07  9:51       ` Corinna Vinschen [this message]

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=ZNC+hlOsXu3IVU/X@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-developers@cygwin.com \
    --cc=jon.turney@dronecode.org.uk \
    /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).