Skip to contentSkip to conversation

reads and writes hang if NFS server has v3 disabled

REGRESSION Benji Wiebe 3 participants 7 messages Sep 3 – Sep 8 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

I'm using a minimal Fedora 45 VM (kvm) for testing.  I export a directory with rw and mount it from my personal computer running Fedora 45 as well. If /etc/nfs.conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous loop of V3 NULL calls, with the server replying that it only supports v4. If nfs.conf has vers3=y, then the reads and writes succeed.
Introduced in 70b7e3526c53d9dd, still present in the latest mainline/master (841e384b841a).

The hung state can be rescued by changing the setting and restarting nfs-server, at which point the read/write will complete.

I can do more testing / get more information as needed.

Here's links to pcap files with it working/bugged:
http://grepper.net/lkml-files/nfs-working.pcap
http://grepper.net/lkml-files/nfs-bugged.pcap
http://grepper.net/lkml-files/nfs-bug-kernel.config

#regzbot introduced:  70b7e3526c53d9dd7caccdbeff5b0485640d8cf1

--
Benji Wiebe

A message that is not in the archive (sent off-list or not yet received): [email protected]

maintainer
#2 lore raw

[ Adding correct addresses from MAINTAINERS ]

Quoted 19 lines · Chuck Lever

I'm using a minimal Fedora 45 VM (kvm) for testing.   I export a directory with rw and mount it from my personal computer running Fedora 45 as well. If /etc/nfs. conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous

I'm using a minimal Fedora 45 VM (kvm) for testing.  I export a directory with rw and mount it from my personal computer running Fedora 45 as well.
If /etc/nfs.conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous loop of V3 NULL calls, with the server replying that it only supports v4.
If nfs.conf has vers3=y, then the reads and writes succeed. Introduced in 70b7e3526c53d9dd, still present in the latest mainline/master (841e384b841a).

The hung state can be rescued by changing the setting and restarting nfs-server, at which point the read/write will complete.

Quoted 8 lines

I can do more testing / get more information as needed.

Here's links to pcap files with it working/bugged:
http://grepper.net/lkml-files/nfs-working.pcap
http://grepper.net/lkml-files/nfs-bugged.pcap
http://grepper.net/lkml-files/nfs-bug-kernel.config

#regzbot introduced:  70b7e3526c53d9dd7caccdbeff5b0485640d8cf1

It's not immediately obvious to me why 70b7e3526c53d9dd should cause this kind of behavior regression.

Jeff, it's a netlink change. Can you triage?

Signature · 1 line
Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)
maintainer
#3 lore raw
Quoted 29 lines · Chuck Lever

[ Adding correct addresses from MAINTAINERS ]

Quoted 26 lines · Chuck Lever

I'm using a minimal Fedora 45 VM (kvm) for testing.   I export a directory with rw and mount it from my personal computer running Fedora 45 as well. If /etc/nfs. conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous

I'm using a minimal Fedora 45 VM (kvm) for testing.  I export a directory with rw and mount it from my personal computer running Fedora 45 as well.
If /etc/nfs.conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous loop of V3 NULL calls, with the server replying that it only supports v4.
If nfs.conf has vers3=y, then the reads and writes succeed. Introduced in 70b7e3526c53d9dd, still present in the latest mainline/master (841e384b841a).

The hung state can be rescued by changing the setting and restarting nfs-server, at which point the read/write will complete.

I can do more testing / get more information as needed.

Here's links to pcap files with it working/bugged:
http://grepper.net/lkml-files/nfs-working.pcap
http://grepper.net/lkml-files/nfs-bugged.pcap
http://grepper.net/lkml-files/nfs-bug-kernel.config

Quoted 7 lines
Quoted 1 line

#regzbot introduced:  70b7e3526c53d9dd7caccdbeff5b0485640d8cf1

It's not immediately obvious to me why 70b7e3526c53d9dd should cause this kind of behavior regression.

Jeff, it's a netlink change. Can you triage?

Sure.

Looking at the captures, it looks like the server is handing out a flexfiles v3 pNFS layout for the trivial server, and that's (of course) failing in this situation.

So we have at least one server bug there -- it shouldn't advertise a flexfiles v3 layout when it's not serving v3! I'll plan to fix that soon.

That doesn't seem to have anything to do with commit 70b7e3526c53d9dd though. I'm not sure why a bisect would have landed there.

What does the /etc/exports entry for this export look like? Disabling pnfs should work around this for now too if you have it explicitly enabled here.

Signature · 1 line
Jeff Layton <[email protected]>
maintainer
#4 lore raw
Quoted 48 lines · Jeff Layton
Quoted 29 lines · Chuck Lever

[ Adding correct addresses from MAINTAINERS ]

Quoted 26 lines · Chuck Lever

I'm using a minimal Fedora 45 VM (kvm) for testing.   I export a directory with rw and mount it from my personal computer running Fedora 45 as well. If /etc/nfs. conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous

I'm using a minimal Fedora 45 VM (kvm) for testing.  I export a directory with rw and mount it from my personal computer running Fedora 45 as well.
If /etc/nfs.conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous loop of V3 NULL calls, with the server replying that it only supports v4.
If nfs.conf has vers3=y, then the reads and writes succeed. Introduced in 70b7e3526c53d9dd, still present in the latest mainline/master (841e384b841a).

The hung state can be rescued by changing the setting and restarting nfs-server, at which point the read/write will complete.

I can do more testing / get more information as needed.

Here's links to pcap files with it working/bugged:
http://grepper.net/lkml-files/nfs-working.pcap
http://grepper.net/lkml-files/nfs-bugged.pcap
http://grepper.net/lkml-files/nfs-bug-kernel.config

Quoted 7 lines
Quoted 1 line

#regzbot introduced:  70b7e3526c53d9dd7caccdbeff5b0485640d8cf1

It's not immediately obvious to me why 70b7e3526c53d9dd should cause this kind of behavior regression.

Jeff, it's a netlink change. Can you triage?

Sure.

Looking at the captures, it looks like the server is handing out a flexfiles v3 pNFS layout for the trivial server, and that's (of course) failing in this situation.

So we have at least one server bug there -- it shouldn't advertise a flexfiles v3 layout when it's not serving v3! I'll plan to fix that soon.

Quoted 6 lines

That doesn't seem to have anything to do with commit 70b7e3526c53d9dd though. I'm not sure why a bisect would have landed there.

What does the /etc/exports entry for this export look like? Disabling pnfs should work around this for now too if you have it explicitly enabled here.

Could be:

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-testing&id=89225ab5f186ed80b7044cdf3b50902f4c1ee024

Signature · 1 line
Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)
maintainer
#5 lore raw
Quoted 53 lines · Chuck Lever
Quoted 51 lines · Jeff Layton
Quoted 29 lines · Chuck Lever

[ Adding correct addresses from MAINTAINERS ]

Quoted 26 lines · Chuck Lever

I'm using a minimal Fedora 45 VM (kvm) for testing.   I export a directory with rw and mount it from my personal computer running Fedora 45 as well. If /etc/nfs. conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous

I'm using a minimal Fedora 45 VM (kvm) for testing.  I export a directory with rw and mount it from my personal computer running Fedora 45 as well.
If /etc/nfs.conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous loop of V3 NULL calls, with the server replying that it only supports v4.
If nfs.conf has vers3=y, then the reads and writes succeed. Introduced in 70b7e3526c53d9dd, still present in the latest mainline/master (841e384b841a).

The hung state can be rescued by changing the setting and restarting nfs-server, at which point the read/write will complete.

I can do more testing / get more information as needed.

Here's links to pcap files with it working/bugged:
http://grepper.net/lkml-files/nfs-working.pcap
http://grepper.net/lkml-files/nfs-bugged.pcap
http://grepper.net/lkml-files/nfs-bug-kernel.config

Quoted 7 lines
Quoted 1 line

#regzbot introduced:  70b7e3526c53d9dd7caccdbeff5b0485640d8cf1

It's not immediately obvious to me why 70b7e3526c53d9dd should cause this kind of behavior regression.

Jeff, it's a netlink change. Can you triage?

Sure.

Looking at the captures, it looks like the server is handing out a flexfiles v3 pNFS layout for the trivial server, and that's (of course) failing in this situation.

So we have at least one server bug there -- it shouldn't advertise a flexfiles v3 layout when it's not serving v3! I'll plan to fix that soon.

That doesn't seem to have anything to do with commit 70b7e3526c53d9dd though. I'm not sure why a bisect would have landed there.

Quoted 7 lines
Quoted 3 lines

What does the /etc/exports entry for this export look like? Disabling pnfs should work around this for now too if you have it explicitly enabled here.

Could be:

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-testing&id=89225ab5f186ed80b7044cdf3b50902f4c1ee024

Yep, that's it. That patch didn't make it in for some reason, so pnfs is always enabled without it. We'll need that to go to stable soon.

I'll work on how to go about disabling flexfiles layouts when v3 isn't enabled.

Signature · 1 line
Jeff Layton <[email protected]>
#6 lore raw
In reply to Jeff Layton
Quoted 44 lines · Jeff Layton
Quoted 29 lines · Chuck Lever

[ Adding correct addresses from MAINTAINERS ]

Quoted 26 lines · Chuck Lever

I'm using a minimal Fedora 45 VM (kvm) for testing.   I export a directory with rw and mount it from my personal computer running Fedora 45 as well. If /etc/nfs. conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous

I'm using a minimal Fedora 45 VM (kvm) for testing.  I export a directory with rw and mount it from my personal computer running Fedora 45 as well.
If /etc/nfs.conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous loop of V3 NULL calls, with the server replying that it only supports v4.
If nfs.conf has vers3=y, then the reads and writes succeed. Introduced in 70b7e3526c53d9dd, still present in the latest mainline/master (841e384b841a).

The hung state can be rescued by changing the setting and restarting nfs-server, at which point the read/write will complete.

I can do more testing / get more information as needed.

Here's links to pcap files with it working/bugged:
http://grepper.net/lkml-files/nfs-working.pcap
http://grepper.net/lkml-files/nfs-bugged.pcap
http://grepper.net/lkml-files/nfs-bug-kernel.config

Quoted 7 lines
Quoted 1 line

#regzbot introduced:  70b7e3526c53d9dd7caccdbeff5b0485640d8cf1

It's not immediately obvious to me why 70b7e3526c53d9dd should cause this kind of behavior regression.

Jeff, it's a netlink change. Can you triage?

Sure.

Looking at the captures, it looks like the server is handing out a flexfiles v3 pNFS layout for the trivial server, and that's (of course) failing in this situation.

Quoted 6 lines

So we have at least one server bug there -- it shouldn't advertise a flexfiles v3 layout when it's not serving v3! I'll plan to fix that soon.

That doesn't seem to have anything to do with commit 70b7e3526c53d9dd though. I'm not sure why a bisect would have landed there.

I checked and rechecked several times (and again now!) and 70b7e3526c53d9dd always had the bug present and 565ee23ea2374 did not have the bug present.>

Quoted 3 lines

What does the /etc/exports entry for this export look like? Disabling pnfs should work around this for now too if you have it explicitly enabled here.

The /etc/exports entry I'm using:
/home/export *(rw,no_root_squash)

I'm new to the kernel development process; is there a patch I can apply now to see if it fixes the bug?

maintainer
#7 lore raw
Quoted 49 lines · Benji Wiebe
Quoted 48 lines · Jeff Layton
Quoted 29 lines · Chuck Lever

[ Adding correct addresses from MAINTAINERS ]

Quoted 26 lines · Chuck Lever

I'm using a minimal Fedora 45 VM (kvm) for testing.   I export a directory with rw and mount it from my personal computer running Fedora 45 as well. If /etc/nfs. conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous

I'm using a minimal Fedora 45 VM (kvm) for testing.  I export a directory with rw and mount it from my personal computer running Fedora 45 as well.
If /etc/nfs.conf has vers3=n, then reads and writes hang in D+ state, and there's a continuous loop of V3 NULL calls, with the server replying that it only supports v4.
If nfs.conf has vers3=y, then the reads and writes succeed. Introduced in 70b7e3526c53d9dd, still present in the latest mainline/master (841e384b841a).

The hung state can be rescued by changing the setting and restarting nfs-server, at which point the read/write will complete.

I can do more testing / get more information as needed.

Here's links to pcap files with it working/bugged:
http://grepper.net/lkml-files/nfs-working.pcap
http://grepper.net/lkml-files/nfs-bugged.pcap
http://grepper.net/lkml-files/nfs-bug-kernel.config

Quoted 7 lines
Quoted 1 line

#regzbot introduced:  70b7e3526c53d9dd7caccdbeff5b0485640d8cf1

It's not immediately obvious to me why 70b7e3526c53d9dd should cause this kind of behavior regression.

Jeff, it's a netlink change. Can you triage?

Sure.

Looking at the captures, it looks like the server is handing out a flexfiles v3 pNFS layout for the trivial server, and that's (of course) failing in this situation.

So we have at least one server bug there -- it shouldn't advertise a flexfiles v3 layout when it's not serving v3! I'll plan to fix that soon.

Quoted 5 lines
Quoted 2 lines

That doesn't seem to have anything to do with commit 70b7e3526c53d9dd though. I'm not sure why a bisect would have landed there.

I checked and rechecked several times (and again now!) and 70b7e3526c53d9dd always had the bug present and 565ee23ea2374 did not have the bug present.>

The bug is in 565ee23ea2374, but until 70b7e3526c53d9dd is applied, the code it's in is not used, so that explains why you're seeing it there.

Quoted 9 lines
Quoted 3 lines

What does the /etc/exports entry for this export look like? Disabling pnfs should work around this for now too if you have it explicitly enabled here.

The /etc/exports entry I'm using:
/home/export *(rw,no_root_squash)

I'm new to the kernel development process; is there a patch I can apply now to see if it fixes the bug?

You want commit f76017a7663c4ce5e379f8a8d39f032bdb1fd865 from Chuck's nfsd-fixes branch. Basically, what's happening is that pnfs is being enabled even though you haven't requested it:

https://lore.kernel.org/linux-nfs/[email protected]/

Signature · 1 line
Jeff Layton <[email protected]>