public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Cedric Blancher <cedric.blancher@gmail.com>
To: cygwin@cygwin.com
Subject: Re: [EXTERNAL] Re: mkfifo: cannot set permissions of 'x.fifo': Not a directory
Date: Thu, 24 Aug 2023 07:28:00 +0200	[thread overview]
Message-ID: <CALXu0UeFE_p=aZBq5GYEDfpNkJB+qjugKV05J999qU-GG1pimg@mail.gmail.com> (raw)
In-Reply-To: <14a692f6-7244-4a7e-a69b-d14521fb01e8@secure-endpoints.com>

On Wed, 23 Aug 2023 at 17:44, Jeffrey Altman via Cygwin
<cygwin@cygwin.com> wrote:
>
> On 8/22/2023 10:52 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> wrote:
> >> FIFOs which don't make *any* sense
> >> ... FWIW, a remote NFS fileystem.
> > I got an impression that the OP is trying to deploy something (maybe the entire Cygwin) onto an NFS share.  So the named FIFO "file" is also created in there.
> >
> > It's pointless to assume that the FIFO can be used as a communication device between the hosts that can mount the share, but it can be quite feasible to envision a scenario, in which the same host opens the FIFO located on the share from two processes and establish the communication using that special "file" (which is basically a special data-less i-node).
>
> I've been following this thread with quite a bit of curiosity. For those
> who do not know me, I'm the lead developer of the AFS filesystem on
> Windows. There have been requests for more than two decades for AFS
> clients to add support for locally created pipe files because AFS
> volumes are often used as home directories (even on Windows) and so many
> applications allocate a pipe in the home directory as a method of
> inter-process communication or a lock. The problem is that even if the
> intended usage of the file is entirely local, the directory object, the
> directory entry and the allocated inode (or equivalent) is network
> visible. What happens when the user executes two copies of an
> application such as PyCharm on two separate machines sharing the same
> home directory? Does the directory entry and inode get reused on startup
> and/or deleted on exit? How does that impact the process instance on the
> other machine? The conclusion I came to long ago is that if pipes are to
> be implemented in a network file system namespace then the pipes must be
> fully functional network pipes. In just about all cases applications can
> be configured to use a non-default paths. In my opinion they should not
> be placed in a shared file system.

This is NOT what POSIX says. We're talking about mkfifo(), which
creates pipes on the local system. The filesystem is just used to use
filesystem paths for identification.

If you want truly networked fifos, I suggest socket(), preferably with
SCTP. But this is OFFTOPIC here. We just want mkfifo() to work on NFS.

>
> I've also been following this thread because both the Microsoft NFSv3
> and the Citi NFSv4 clients are rather incomplete filesystem
> implementations from the perspective of the Installable File System
> interface and the Multiple UNC Provider interface.

Good. This is actually worth writing a bug report against the CITI
NFSv4 client, because the Microsoft NFSv3 client is only extended or
fixed if someone is willing to pay a five-digit euro sum to M$.
Literally.  We asked, and got a longer document describing the
expenses.
So better fix the NFSv4 client.

> In my opinion,
> Microsoft NFSv3 is the bare minimum that must be implemented for
> Microsoft to advertise that NFSv3 is available on Windows. The NFSv3
> symlink interface leveraging extended attributes as a method of setting
> and reading the target predates the introduction of
> IO_REPARSE_TAG_SYMLINK for NTFS. Prior to the allocation of
> IO_REPARSE_TAG_SYMLINK I obtained a proprietary tag allocation from
> Microsoft for AFS symlinks but switched to IO_REPARSE_TAG_SYMLINK once
> it was available because then AFS symlinks work the same as NTFS.
>
> The Citi NFSv4 implementation is not only incomplete from a Windows
> interface perspective but Citi never obtained from Microsoft the
> required filesystem registrations.

Please elaborate

> For example, it doesn't have a
> Microsoft assigned FLT_FILESYSTEM_TYPE, WNNC network type, name or
> NodeTypeCode values. FLT_FSTYPE_NFS, WNNC_NET_MS_NFS, and "nfs" are
> specific to the Microsoft NFSv3 (aka \FileSystem\NfsRdr) implementation.

This is not correct. The CITI NFSv4 client was originally written
using $$$ from a grant from Microsoft, and is intended to be a drop-in
replacement for the NFSv3 client. Hence it shares the same "nfs" name,
uses the same extension apis (fsattr3), and should behave almost the
same.

> The NodeTypeCode range used by the Citi NFSv4 filesystem (0xFC00) is
> outside the block allocated to third party filesystems and appears to be
> from a published sample which could lead to corruption if two
> filesystems allocating FileControlBlocks with the same NodeTypeCodes are
> present on the system. The returned WNNC value is also from a sample.

Please file a bug report. This should be fixable.

> Perhaps the original poster knows where development of the Citi NFSv4
> client is currently taking place. The source code repos I've been able
> to find do not have any commits since 2012 (tag v1.0.0) and have been
> flagged as archival on GitHub.

Seriously just my personal opinion, not speaking for my employer:
2013 on the github, and the DFG (Deutsche Forschungs Gemeinschaft) has
an ongoing fork since 2019, more or less the same year M$ came up with
the insane cost estimate for "fixing" their own horrible NFSv3 client.
Basically their retaliation to M$ wanting money for broken things. The
hard part is now to get them to throw the patches over the fence, get
them reviewed and tested.

Also, I don't like that you hit on the CITI NFSv4 client work. It is
good and stable enough for routine cluster usage, and much faster than
Microsoft's own NFSv3 client. There are issues, but none which happen
in said environment.

The only REAL issue is the lack of public binaries with signed
binaries, as any self-compiled ones cannot be loaded into a Windows
kernel with SecureBoot enabled.

>
> In my opinion, for Cygwin to reliably work with either of these
> implementations is going to require on-going developer effort and
> continuous integration testing. Not only of Cygwin but in the case of
> Citi NFSv4 from the team maintaining the product. Unless something has
> significantly changed since 2013 I do not expect Microsoft to be willing
> to invest much effort into enhancing the NFSv3 implementation. The
> likely recommendation would be to re-export the NFS file shares via
> Samba and access them via CIFS.

I don't want to bash, or rant about CIFS, but getting CIFS into
embedded medical devices is a security nightmare. I know, we tried,
and seriously ended up with both the Linux NFSv4 kernel client, and
the NFS4j for JAVA standalone applications.

Ced
-- 
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

  parent reply	other threads:[~2023-08-24  5:30 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 14:42 Martin Wege
2023-08-07 18:26 ` Brian Inglis
2023-08-07 19:14   ` Corinna Vinschen
2023-08-07 21:14     ` Martin Wege
2023-08-08  8:20       ` Corinna Vinschen
2023-08-08 19:38         ` Martin Wege
2023-08-09  8:01           ` Corinna Vinschen
2023-08-09  9:12             ` Martin Wege
2023-08-09  9:56               ` Corinna Vinschen
2023-08-10 12:49                 ` Martin Wege
2023-08-18  4:02 ` Martin Wege
2023-08-18  8:34   ` Corinna Vinschen
2023-08-18 13:14     ` Martin Wege
2023-08-21  4:49     ` Cedric Blancher
2023-08-21  8:37       ` Corinna Vinschen
2023-08-22 14:52         ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-08-22 23:05           ` How to fix |mkfifo()| failure if |pathname| is on NFS ? / was: " Roland Mainz
2023-08-24 16:45             ` Martin Wege
2023-08-25  4:25               ` Cedric Blancher
2023-08-26 17:58               ` Martin Wege
2023-08-25 12:18             ` Corinna Vinschen
2023-08-25 12:25               ` Corinna Vinschen
2023-08-26 11:26                 ` Cedric Blancher
2023-08-26 14:15                   ` Corinna Vinschen
2023-08-26 17:40                     ` Martin Wege
2023-08-26 19:16                       ` Brian Inglis
2023-08-25 15:14               ` Roland Mainz
2023-08-26 11:27                 ` Cedric Blancher
2023-08-25 23:21               ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-08-26 14:28                 ` Corinna Vinschen
2023-08-26 14:39                   ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-08-26 17:44               ` Documenting Cygwin on NFS, no longer only exchange-medium! " Martin Wege
2023-08-26 19:16                 ` Brian Inglis
2023-08-27 12:35                 ` Corinna Vinschen
2023-08-28  5:35                   ` Cedric Blancher
2023-08-28 10:02                     ` Corinna Vinschen
2023-08-28 11:41                   ` Joshuah Hurst
     [not found]           ` <14a692f6-7244-4a7e-a69b-d14521fb01e8@secure-endpoints.com>
2023-08-23 17:39             ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-08-24  5:28             ` Cedric Blancher [this message]
2023-08-24 16:40             ` Martin Wege
2023-08-21 12:12     ` Martin Wege

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='CALXu0UeFE_p=aZBq5GYEDfpNkJB+qjugKV05J999qU-GG1pimg@mail.gmail.com' \
    --to=cedric.blancher@gmail.com \
    --cc=cygwin@cygwin.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).