Skip to contentSkip to conversation

buffered I/O causes testcases/network/nfs/nfsstress failure

LTP Caspar Zhang 2 participants 4 messages Sep 7, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1491422708.234901283861656504.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com

#1 lore raw

Hi all,
When I run testcases/network/nfs/nfsstress/ test, I found sometimes the
test failed due to buffered I/O, in detail, for example, there are the following lines in make_tree.c :

544 numchar[0] = sprintf(prog_buf,
545 "main()\n{\n\t printf(\"hello world\");\n}\n");

sometimes the generated .c file will be:
^@ain() // <- strange ASCII char '^@' appears instead of 'm'

{
        printf("hello world");
}

And running with this .c file will cause error.

That is to say, string 'prog_buf' gets a mistake during sprintf. And there're somewhere else using buffered I/O in this test as well. Do we have an unbuffered solution to this test?

Thanks,
Caspar

Signature · 16 lines
Quality Assurance Associate (Kernel) in
Red Hat Inc. (Beijing R&D Branch)

TEL: +86-10-62608150
Web: http://www.redhat.com/

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw
Quoted 14 lines · Caspar Zhang

Hi all,
 When I run testcases/network/nfs/nfsstress/ test, I found sometimes the test failed due to buffered I/O, in detail, for example, there are the following lines in make_tree.c :

544     numchar[0] = sprintf(prog_buf,
545                 "main()\n{\n\t printf(\"hello world\");\n}\n");

sometimes the generated .c file will be:
^@ain() // <- strange ASCII char '^@' appears instead of 'm' {
       printf("hello world");
}

Quoted 5 lines

And running with this .c file will cause error.

That is to say, string 'prog_buf' gets a mistake during sprintf. And there're somewhere else using buffered I/O in this test as well. Do we have an unbuffered solution to this test?

That seems a bit odd. Is the NFS mount/server TCP or UDP?

Thanks,
-Garrett

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 20 lines · ----- "Garrett Cooper
Quoted 2 lines · Caspar Zhang

Hi all,
 When I run testcases/network/nfs/nfsstress/ test, I found sometimes

the

Quoted 1 line

test failed due to buffered I/O, in detail, for example, there are

the following

Quoted 13 lines

lines in make_tree.c :

544     numchar[0] = sprintf(prog_buf,
545                 "main()\n{\n\t printf(\"hello world\");\n}\n");

sometimes the generated .c file will be:
^@ain() // <- strange ASCII char '^@' appears instead of 'm' {
       printf("hello world");
}

And running with this .c file will cause error.

Quoted 7 lines
Quoted 1 line

That is to say, string 'prog_buf' gets a mistake during sprintf. And

there're

Quoted 1 line

somewhere else using buffered I/O in this test as well. Do we have

an

Quoted 1 line

unbuffered solution to this test?

That seems a bit odd. Is the NFS mount/server TCP or UDP?

Hi Garrett, it's UDP.

Thanks,
Caspar

Signature · 16 lines
Quality Assurance Associate (Kernel) in
Red Hat Inc. (Beijing R&D Branch)

TEL: +86-10-62608150
Web: http://www.redhat.com/

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#4 lore raw
Quoted 24 lines · Caspar Zhang
Quoted 21 lines · ----- "Garrett Cooper
Quoted 2 lines · Caspar Zhang

Hi all,
 When I run testcases/network/nfs/nfsstress/ test, I found sometimes

the

Quoted 1 line

test failed due to buffered I/O, in detail, for example, there are

the following

Quoted 14 lines

lines in make_tree.c :

544     numchar[0] = sprintf(prog_buf,
545                 "main()\n{\n\t printf(\"hello world\");\n}\n");

sometimes the generated .c file will be:
^@ain() // <- strange ASCII char '^@' appears instead of 'm' {
       printf("hello world");
}

And running with this .c file will cause error.

That is to say, string 'prog_buf' gets a mistake during sprintf. And

Quoted 8 lines
Quoted 6 lines

there're

Quoted 1 line

somewhere else using buffered I/O in this test as well. Do we have

an

Quoted 1 line

unbuffered solution to this test?

That seems a bit odd. Is the NFS mount/server TCP or UDP?

Hi Garrett, it's UDP.

Ok. Something else that might be good to note is whether or not
it's v2, v3, or v4 on the client and server side.
Could you please try with TCP and see whether or not the issue
persists? I'm just curious if it's a potentially real issue with NFS code in the kernel, random networking infrastructure issues, etc. Thanks,
-Garrett

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list