Skip to contentSkip to conversation

NFS issue when loading two files

RFC Matthias Brugger 2 participants 3 messages Dec 5, 2012 – Dec 6, 2012

lore
Share & tools
lore
#0 lore raw

Hi all,

I run into an NFS issue when trying to load two files from nfs for booting (uImage and device tree binary):

When I try to unmount after loading the first file, I get some timeouts from the host which will lead to a re-send of the message. Eventually I get a response from the host, but with a smaller rpc_id, as rpc_id is incremented on every re-send as well. This leads in an abort of the boot procedure, although a valid answer was given from the host.

Incrementing the NFS_TIMEOUT or adding the board IP to /etc/hosts resolves the issue, but is nothing more as a workaround.

I digged into the NFS protocol implementation, but I'm not quite sure if:
1) we shouldn't increment the rpc_id when re-sending a command.
2) change NFS_TIMEOUT value dynamically
3) add a state "wait" when we get an answer with an rpc_id smaller the one we sent.

Especially 1) I think isn't a good idea, as we break the RPC mechanism (I suppose), and we run in other issues. When we unmount after successfully load the first file, the mount of the second file will most probably get as answer a reply from a fromaly re-sent unmount command, and the boot process stops as well. [1]

Any ideas, which would be the best solution for this problem?

Best regards,
Matthias Brugger

[1] the process looks like:
mount
read file
unmount (timed out) #1
unmount (timed out) #2
unmount
get response of #1
mount
get response of #2
error!

#1 lore raw

Dear Matthias Brugger,

Quoted 9 lines · In message <[email protected]> you wrote:

I run into an NFS issue when trying to load two files from nfs for booting (uImage and device tree binary):

When I try to unmount after loading the first file, I get some timeouts from the host which will lead to a re-send of the message. Eventually I get a response from the host, but with a smaller rpc_id, as rpc_id is incremented on every re-send as well. This leads in an abort of the boot procedure, although a valid answer was given from the host.

How do you do the umount in U-Boot?

Quoted 10 lines

[1] the process looks like:
mount
read file
unmount (timed out) #1
unmount (timed out) #2
unmount
get response of #1
mount
get response of #2
error!

What is the exact sequence of U-Boot coomands that would trigger such an error?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Always try to do things in chronological order; it's  less  confusing
that way.
#2 lore raw

Hello Wolfgang, hello all,

sorry for re-sending, but the list didn't accept an attachment.

Quoted 7 lines · Wolfgang Denk

Dear Matthias Brugger,

Quoted 4 lines · In message <[email protected]> you wrote:

I run into an NFS issue when trying to load two files from nfs for booting (uImage and device tree binary):

Quoted 7 lines
Quoted 5 lines

When I try to unmount after loading the first file, I get some timeouts from the host which will lead to a re-send of the message. Eventually I get a response from the host, but with a smaller rpc_id, as rpc_id is incremented on every re-send as well. This leads in an abort of the boot procedure, although a valid answer was given from the host.

How do you do the umount in U-Boot?

I wasn't clear on this, sorry.
It seems that u-boot sends a umountall command to the nfs server after having received the file.

Quoted 12 lines
Quoted 11 lines

[1] the process looks like:
mount
read file
unmount (timed out) #1
unmount (timed out) #2
unmount
get response of #1
mount
get response of #2
error!

Quoted 2 lines

What is the exact sequence of U-Boot coomands that would trigger such an error?

I use igep0020 board. You can find my uEvent.txt at
http://pastebin.com/6mG6RJmf
Please note that I just load the uImage and the device tree binary from nfs, as device tree yet does not support network for my kernel.

If you want, I can send you a wireshark dump I made to analyse the problem.

Later this day I'll send a patch which resolves the issue. Basically it does not increment rpc_id if a time out leads to a resend and it make the state machine drop messages with a lower rpc_id as the one in the state machine.

Best regards,
Matthias Brugger

Quoted 5 lines

Best regards,

Wolfgang Denk