Bug 58084 - NFS client hangs
NFS client hangs
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-01-07 23:47 EST by Damien Miller
Modified: 2007-04-18 12:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-02-10 22:53:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Damien Miller 2002-01-07 23:47:35 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226

Description of problem:
When connecting to a OpenBSD 3.0 NFS server, writes to NFS mounted files will
hang indefinitely

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Mount a OpenBSD exported NFS volume
2.Attempt to write to a files


Actual Results:  The write blocks with the process stuck in a 'D' state. The
dmesg contains:

nfs: server shitei not responding, still trying
nfs: task 16 can't get a request slot

(shitei being my NFS server)

Nothing is logged at the server end.

Expected Results:  The write should complete normally.

Additional info:

Redhat 6.2 doesn't have this problem.
Comment 1 Damien Miller 2002-01-12 18:34:33 EST
Forgot to mention, I am using kernel-2.4.9-13.i686.rpm
Comment 2 Damien Miller 2003-02-09 22:23:48 EST
I eventually figured this out: Linux NFS sends fragmented UDP packets with the
DontFragment bit set. OpenBSD's packet filter (rightly IMO) drops these packets
as inconsistent. 

The workaround is to turn off packet normalisation for effected hosts. Another
is to turn off pmtu discovery on the Linux end.

The fix would be to make Linux NFS send consistent packets. 

Some threads discussing this:

Comment 3 Arjan van de Ven 2003-02-10 05:14:31 EST
fragmented UDP packets with the DF flag set are completely valid and actually
the only way to do pmtu discovery over udp...... 
Comment 4 Damien Miller 2003-02-10 18:01:36 EST
No, this is incorrect. RFC1191 even explicitly talks about the NFS case:

   Also, since a single NFS operation cannot be split across several UDP
   datagrams, certain operations (primarily, those operating on file
   names and directories) require a minimum datagram size that may be
   larger than the PMTU.  NFS implementations should not reduce the
   datagram size below this threshold, even if PMTU Discovery suggests a
   lower value.  (Of course, in this case datagrams should not be sent
   with DF set.)

(section 6.5, page 14)

Comment 5 David Miller 2003-02-10 22:53:59 EST
RFCs are not laws that cannot be broken when common sense must
prevail.  For example, nobody currently ships a system that
does RFC compliant URG handling, you wouldn't be able to talk
to any other stack if that were the case.

And common sense here dictates that without being able to set
DF on fragmented frames, UDP path mtu discovery is basically
impossible and at best useless.

The behavior stands, and it will not be changed.  These weird BSD firewalls are
   the only systems blocking these packets, and I'm not going to
give up UDP pmtu discovery for the sake of making these systems
Comment 6 Daniel Hartmeier 2003-02-12 16:20:50 EST
Based on your feedback, OpenBSD's packet filter has been changed so fragments with DF can be passed, even if normalization/reassembly is enabled.

The option is disabled by default, as fragments with DF are not unanimously accepted as legitimate and unambiguous traffic. But we acknowledge that they are used with certain UDP protocols (when PMTU discovery is used) and recommend enabling the option to pass them selectively.

With release 3.0 to 3.2, the fragments can be passed by disabling normalization/reassembly ('scrub') for the relevant UDP traffic, and future releases include the option to pass such fragments in all combinations with scrub.

Further questions can be directed to the OpenBSD mailing lists (http://www.openbsd.org/mail.html).

Note You need to log in before you can comment on or make changes to this bug.