public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RPC inconsistency
@ 2012-05-14  5:42 Fedin Pavel
  2012-05-14  7:52 ` Fedin Pavel
  0 siblings, 1 reply; 2+ messages in thread
From: Fedin Pavel @ 2012-05-14  5:42 UTC (permalink / raw)
  To: cygwin

I have a problem with RPC libraries. Looks like either there is some 
serious inconsistency in Cygwin, or i seriously miss something.
For the start, i tried to recompile NFS server from source code, in 
order to hunt for some bugs i've got sick of. And here i got a problem.
First of all, i discovered that i miss include/rpc directory. Well, i 
know that newer systems migrate to ti-rpc. After tweaking makefiles i 
was able to build nfs server against ti-rpc. But the resuiting binary 
failed to run with:
nfsd[4268] 05/14/112 10:31 rpcmisc.c 101 : unable to register (nfsd, 2, udp)
which is an error from svc_register()
After digging some more in tirpc sources i discovered that this happens 
because ti-rpc libray attempts to talk to port mapper using 
/var/run/rpcbind.sock. And nobody is listening there.
This lead me to a conclusion:
1. portmap service we use is original Sun's portmapper, coming from 
sunrpc package.
2. ti-rpc should come with more advanced port mapper (google told me 
it's named rpcbind). ti-rpc library can't work with old portmap.
I examined sources for both packages. ti-rpc package contains sources 
for rpcbind daemon, as well as sunrpc package contains sources for 
librpc, as well as RPC includes missing on my system.
So, questions are:
1. Is this really correct? Why don't we have full ti-rpc package, as 
well as full ti-rpc package? They seem to be backward-compatible only in 
terms of client-server relationship.
2. Which one should i use to build NFS server?

-- 
  Kind regards
  Pavel Fedin
  Expert engineer, Samsung Moscow research center


--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RPC inconsistency
  2012-05-14  5:42 RPC inconsistency Fedin Pavel
@ 2012-05-14  7:52 ` Fedin Pavel
  0 siblings, 0 replies; 2+ messages in thread
From: Fedin Pavel @ 2012-05-14  7:52 UTC (permalink / raw)
  To: cygwin

On 14.05.2012 9:41, Fedin Pavel wrote:
> 2. ti-rpc should come with more advanced port mapper (google told me 
> it's named rpcbind). ti-rpc library can't work with old portmap.

After some more debugging...
1. In fact they should be interoperable. If UNIX socket fails, ti-rpc 
library tries backwards-compatible method (IP socket on localhost).
2. For some reason it tries IPv6 socket, and, of course, fails. It 
doesn't try IPv4 after this.
3. If i comment out IPv6 entries in /etc/netconfig, it will try IPv4 TCP 
socket. But for some weird reason it fails to connect() with EADDRINUSE 
error.
4. rpcbind is not part of ti-rpc library. I was confused by man file 
with this name.

I read about this problem, but i don't really understand this 
SO_REUSEADDR trick. So i decided not to modify the tirpc code, assuming 
it works, and it's some WinSock-specific glitch. Instead i quickly 
ported rpcbind (http://sourceforge.net/projects/rpcbind/), and the whole 
thing runs correctly now.

-- 
  Kind regards
  Pavel Fedin
  Expert engineer, Samsung Moscow research center


--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-14  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-14  5:42 RPC inconsistency Fedin Pavel
2012-05-14  7:52 ` Fedin Pavel

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).