2008-01-28 20:54:45

by Chuck Lever III

[permalink] [raw]
Subject: Re: NFS EINVAL on open(... | O_TRUNC) on 2.6.23.9

Hi Gianluca-

On Jan 27, 2008, at 7:08 AM, Gianluca Alberici wrote:
> Hello Chuck,
>
> i have produced the output you requested using the code i used to
> show you last time (which simply tries to open(... | O_TRUNC) a
> file onto the nfs mount and writes "Hello" into it. I simply
> iterate execution 2 times. The mount is a loop mount on 127.0.0.1
> Since the second execution (the first time it creates the file) you
> get EINVAL:
>
> FILE CREATION:
>
> hydra:~# tcpdump -s0 -i lo port 2049
> tcpdump: verbose output suppressed, use -v or -vv for full protocol
> decode
> listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
> 12:15:06.306619 IP localhost.251828621 > localhost.nfs: 120 getattr
> fh Unknown/
> 47521E2B0223C100000000000000000000000000000000000000000000000000
> 12:15:06.306666 IP localhost.nfs > localhost.251828621: reply ok 96
> getattr DIR 40777 ids 0/0 sz 4096
> 12:15:06.306705 IP localhost.268605837 > localhost.nfs: 128 lookup
> fh Unknown/
> 47521E2B0223C100000000000000000000000000000000000000000000000000
> "test"
> 12:15:06.306752 IP localhost.nfs > localhost.268605837: reply ok 28
> lookup ERROR: No such file or directory
> 12:15:06.306786 IP localhost.285383053 > localhost.nfs: 160 create
> fh Unknown/
> 47521E2B0223C100000000000000000000000000000000000000000000000000
> "test"
> 12:15:06.306917 IP localhost.nfs > localhost.285383053: reply ok
> 128 create fh Unknown/
> 48521E2B0323C120000000000000000000000000000000000000000000000000
> 12:15:06.307179 IP localhost.302160269 > localhost.nfs: 144 write
> fh Unknown/
> 48521E2B0323C120000000000000000000000000000000000000000000000000 5
> (5) bytes @ 0 (0)
> 12:15:06.307283 IP localhost.nfs > localhost.302160269: reply ok 96
> write

We need to have the raw output of tcpdump. Please use "-w dumpfile"
and send the raw output.

>> sudo tcpdump -s0 -w /tmp/dumpfile hostname-of-server


--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com


2008-01-29 13:07:29

by Gianluca Alberici

[permalink] [raw]
Subject: Re: NFS EINVAL on open(... | O_TRUNC) on 2.6.23.9

Hello Chuck,

I attach as you requested the two dumpfiles obtained by

tcpdump -s0 -i lo -w /tmp/dump-(not-)working port 2049



They contain the dump relative to the usual double try: at first the
open() syscall creates the file, while in the second tries to truncate
to zero length.

Hope these are ok with you.

I am waiting for istructions if you got any.

Thanks,

Gianluca

Chuck Lever wrote:

> Hi Gianluca-
>
> On Jan 27, 2008, at 7:08 AM, Gianluca Alberici wrote:
>
>> Hello Chuck,
>>
>> i have produced the output you requested using the code i used to
>> show you last time (which simply tries to open(... | O_TRUNC) a file
>> onto the nfs mount and writes "Hello" into it. I simply iterate
>> execution 2 times. The mount is a loop mount on 127.0.0.1
>> Since the second execution (the first time it creates the file) you
>> get EINVAL:
>>
>> FILE CREATION:
>>
>> hydra:~# tcpdump -s0 -i lo port 2049
>> tcpdump: verbose output suppressed, use -v or -vv for full protocol
>> decode
>> listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
>> 12:15:06.306619 IP localhost.251828621 > localhost.nfs: 120 getattr
>> fh Unknown/
>> 47521E2B0223C100000000000000000000000000000000000000000000000000
>> 12:15:06.306666 IP localhost.nfs > localhost.251828621: reply ok 96
>> getattr DIR 40777 ids 0/0 sz 4096
>> 12:15:06.306705 IP localhost.268605837 > localhost.nfs: 128 lookup fh
>> Unknown/
>> 47521E2B0223C100000000000000000000000000000000000000000000000000 "test"
>> 12:15:06.306752 IP localhost.nfs > localhost.268605837: reply ok 28
>> lookup ERROR: No such file or directory
>> 12:15:06.306786 IP localhost.285383053 > localhost.nfs: 160 create fh
>> Unknown/
>> 47521E2B0223C100000000000000000000000000000000000000000000000000 "test"
>> 12:15:06.306917 IP localhost.nfs > localhost.285383053: reply ok 128
>> create fh Unknown/
>> 48521E2B0323C120000000000000000000000000000000000000000000000000
>> 12:15:06.307179 IP localhost.302160269 > localhost.nfs: 144 write fh
>> Unknown/
>> 48521E2B0323C120000000000000000000000000000000000000000000000000 5
>> (5) bytes @ 0 (0)
>> 12:15:06.307283 IP localhost.nfs > localhost.302160269: reply ok 96
>> write
>
>
> We need to have the raw output of tcpdump. Please use "-w dumpfile"
> and send the raw output.
>
>>> sudo tcpdump -s0 -w /tmp/dumpfile hostname-of-server
>>
>
>
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
> -
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



Attachments:
dump-working (2.68 kB)
dump-not-working (1.97 kB)
Download all attachments