* sunrpc patch that fixes nfs-server failure when reading files of specific sizes
@ 2013-11-04 10:52 George Prekas
2013-11-04 12:22 ` marco atzeri
0 siblings, 1 reply; 3+ messages in thread
From: George Prekas @ 2013-11-04 10:52 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 755 bytes --]
Nfs-server occasionally fails when serving files of specific sizes. The Linux client reports an input/output error and the user has to umount and mount the NFS share in order to continue using it.
The problem happens when the file's size is: 8192*k + 3896 or 8192*k + 3896 + 3996 where k = 0,1,2,...
Example file sizes are: 3896, 7892, 12088, 16084
Sunrpc sends data in chunks and under some conditions it fails to recognize that it is sending the last chunk and does not set the corresponding flag (last fragment bit).
The procedure to apply the patch is the following:
* Download source packages nfs-server and sunrpc.
* Execute fix_xdrrec_putbytes.sh
--
George Prekas
Dipl. Electrical and Computer Engineer, National Technical University of Athens
[-- Attachment #2: fix_xdrrec_putbytes.sh --]
[-- Type: application/x-sh, Size: 236 bytes --]
[-- Attachment #3: fix_compile.patch.bin --]
[-- Type: application/octet-stream, Size: 505 bytes --]
--- a/etc/portmap.c
+++ b/etc/portmap.c
@@ -52,7 +52,6 @@ static char sccsid[] = "@(#)portmap.c 1.32 87/08/06 Copyr 1984 Sun Micro";
static callit();
-char *malloc();
int reg_service();
void reap();
struct pmaplist *pmaplist;
diff --git a/rpc/xdr.c b/rpc/xdr.c
index e9c8382..f370b10 100644
--- a/rpc/xdr.c
+++ b/rpc/xdr.c
@@ -42,7 +42,6 @@ static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
*/
#include <stdio.h>
-char *malloc();
#include <rpc/types.h>
#include <rpc/xdr.h>
[-- Attachment #4: fix_xdrrec_putbytes.patch.bin --]
[-- Type: application/octet-stream, Size: 696 bytes --]
--- a/rpc/xdr_rec.c
+++ b/rpc/xdr_rec.c
@@ -277,17 +277,17 @@ xdrrec_putbytes(xdrs, addr, len)
register int current;
while (len > 0) {
+ if (rstrm->out_finger == rstrm->out_boundry) {
+ rstrm->frag_sent = TRUE;
+ if (! flush_out(rstrm, FALSE))
+ return (FALSE);
+ }
current = (u_int)rstrm->out_boundry - (u_int)rstrm->out_finger;
current = (len < current) ? len : current;
bcopy(addr, rstrm->out_finger, current);
rstrm->out_finger += current;
addr += current;
len -= current;
- if (rstrm->out_finger == rstrm->out_boundry) {
- rstrm->frag_sent = TRUE;
- if (! flush_out(rstrm, FALSE))
- return (FALSE);
- }
}
return (TRUE);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sunrpc patch that fixes nfs-server failure when reading files of specific sizes
2013-11-04 10:52 sunrpc patch that fixes nfs-server failure when reading files of specific sizes George Prekas
@ 2013-11-04 12:22 ` marco atzeri
2013-11-04 15:03 ` Charles Wilson
0 siblings, 1 reply; 3+ messages in thread
From: marco atzeri @ 2013-11-04 12:22 UTC (permalink / raw)
To: cygwin-apps
Il 11/4/2013 11:52 AM, George Prekas ha scritto:
> Nfs-server occasionally fails when serving files of specific sizes. The Linux client reports an input/output error and the user has to umount and mount the NFS share in order to continue using it.
>
> The problem happens when the file's size is: 8192*k + 3896 or 8192*k + 3896 + 3996 where k = 0,1,2,...
>
> Example file sizes are: 3896, 7892, 12088, 16084
>
> Sunrpc sends data in chunks and under some conditions it fails to recognize that it is sending the last chunk and does not set the corresponding flag (last fragment bit).
>
> The procedure to apply the patch is the following:
> * Download source packages nfs-server and sunrpc.
> * Execute fix_xdrrec_putbytes.sh
>
> --
> George Prekas
> Dipl. Electrical and Computer Engineer, National Technical University of Athens
>
Hi George,
unfortunately the nfs-server is without a package maintainer
http://cygwin.com/cygwin-pkg-maint
Are you interested to take over ?
If so please look at
http://cygwin.com/setup.html
Regards
MArco
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sunrpc patch that fixes nfs-server failure when reading files of specific sizes
2013-11-04 12:22 ` marco atzeri
@ 2013-11-04 15:03 ` Charles Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Charles Wilson @ 2013-11-04 15:03 UTC (permalink / raw)
To: cygwin-apps
On 11/4/2013 7:22 AM, marco atzeri wrote:
> Hi George,
> unfortunately the nfs-server is without a package maintainer
> http://cygwin.com/cygwin-pkg-maint
Yes, but the patch is actually for sunrpc, of which I am (nominally)
listed as the maintainer. There's an issue with sunrpc in general (I'll
have to check my logs on that), but I'm saving a copy of George's
patches for future use.
George -- thanks for the testing and the patches. I can't predict how
long it'll be until I can fold them in, but they will not be forgotten.
I'm open to relinquishing sunrpc, rpcgen, and several other
networking-related packages to a new maintainer if you're interested?
(But, as you've noticed, they seem pretty interrelated so they ought to
go to a common home without "breaking up the family")
--
Chuck
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-04 15:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-04 10:52 sunrpc patch that fixes nfs-server failure when reading files of specific sizes George Prekas
2013-11-04 12:22 ` marco atzeri
2013-11-04 15:03 ` Charles Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).