Bug 204890

Summary: named pipes (FIFOs) not seen as such over NFS
Product: Base System Reporter: Mikhail Teterin <mi>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Many People CC: jilles, pi
Priority: ---    
Version: 10.2-STABLE   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
tcpdump-capture of NFS-client doing an ls none

Description Mikhail Teterin freebsd_committer freebsd_triage 2015-11-29 06:47:31 UTC
A named pipe created on an NFS-server is not seen as such on NFS-clients.

For example, I have a filesystem mounted as /green on an NFS-server (running 10.2-STABLE #0 r289145). After creating a FIFO there with mkfifo, I can see it properly:

prw-r--r--  1 mi  wheel  0 Nov 29 00:05 /green/tmp/test

However, an NFS-client (running 10.2-STABLE FreeBSD 10.2-STABLE #0 r291365) sees the same entry differently:

?rw-r--r--  1 mi  wheel  0 Nov 29 00:05 /green/tmp/test
(note the question mark for type...)

stat(1) demonstrates other differences:

NFS-server:
92 74636334 prw-r--r-- 1 mi wheel 0 0 "Nov 29 00:05:51 2015" "Nov 29 00:05:51 2015" "Nov 29 00:05:51 2015" "Nov 29 00:05:51 2015" 16384 0 0 /green/tmp/test

NFS-client:
973143811 74636334 ?rw-r--r-- 1 mi wheel 4294967295 0 "Nov 29 00:05:51 2015" "Nov 29 00:05:51 2015" "Nov 29 00:05:51 2015" "Dec 31 18:59:59 1969" 16384 0 0 /green/tmp/test
Comment 1 Mikhail Teterin freebsd_committer freebsd_triage 2015-11-29 06:51:26 UTC
FWIW, I do not see the same problem on another pair of servers -- both running 10.1-STABLE.
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2015-11-29 09:16:18 UTC
Tested: nfs server 10.1p24, nfs client 10.2p7, sees:

prw-rw-r--  1 root  wheel  0 Nov 29 10:12 bla
Comment 3 Mikhail Teterin freebsd_committer freebsd_triage 2015-11-29 18:21:44 UTC
Created attachment 163657 [details]
tcpdump-capture of NFS-client doing an ls

Attaching the tcpdump-capture as requested by Rick by e-mail.

Meanwhile, I tested the two computers mounting their own shares. The old:

   % mount 192.168.1.8:/green /mnt
   % ls -l /mnt/tmp/test
   ?rw-r--r--  1 mi  wheel  0 29 лис 00:05 /mnt/tmp/test

The new:

   % mount 192.168.1.2:/spare /mnt
   % mkfifo /spare/fifo
   % ls -l /spare/fifo /mnt/fifo
   prw-r--r--  1 root  wheel  0 29 лис 13:12 /mnt/fifo
   prw-r--r--  1 root  wheel  0 29 лис 13:12 /spare/fifo

I then mounted the other way -- with the old system being the NFS-client -- and could not see the bug either. I think, this points conclusively at a bug in NFS-server of 10.2-STABLE #0 r289145 -- which must've been fixed by the time of 
r291365.

I'll rebuild the kernel on the old server to confirm...