weird problem with clnt_create() and EADDRINUSE

Kevin Layer layer@franz.com
Wed Mar 22 20:22:00 GMT 2017


I have a C program (attached) that I run to test a Windows NFS server
(built in Lisp, https://github.com/franzinc/nfs).

I can run this program on Linux and I've never had a problem with it.
On Windows, I randomly get errors like this:

./hammernfs.exe -i 3 -v 2 -t 60 -b 8192 -p tcp 127.0.0.1:/nfs.test/nfstestfile
clnt_create_with_retry: 100003: clnt_create failed.  rpc_createerr.cf_stat: 12, rpc_createerr.cf_error.re_errno: 112
clnt_create_with_retry: Try #1: clnt_create: RPC: Remote system error - Address already in use
clnt_create_with_retry: 100003: clnt_create failed.  rpc_createerr.cf_stat: 12, rpc_createerr.cf_error.re_errno: 112
clnt_create_with_retry: Try #2: clnt_create: RPC: Remote system error - Address already in use
clnt_create_with_retry: 100003: clnt_create failed.  rpc_createerr.cf_stat: 12, rpc_createerr.cf_error.re_errno: 112
...

The errno 112 is EADDRINUSE and that's an odd thing to get, in this
case.

I'm kinda at wit's end on this and I'm hoping someone here has an
idea.

Below is hammernfs.c.  It's made like this:

cc -O -o hammernfs.exe -I/usr/include/tirpc test/hammernfs.c \
   test/hammernfs-libs/mount_xdr.c test/hammernfs-libs/mount_clnt.c \
   test/hammernfs-libs/nfs_clnt.c test/hammernfs-libs/nfs_xdr.c -ltirpc

The hammernfs-libs/*.c files are available on the `devel' branch in
the git repo above.  The hammernfs.c in that repo is slightly
different (the output is just slightly different, but the execution is
the same).

Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hammernfs.c
Type: text/x-c
Size: 12628 bytes
Desc: hammernfs.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20170322/c7110a25/attachment.bin>
-------------- next part --------------

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list