RPC: clnt_create() misbehaving with glibc 2.31?

Michael Brunnbauer brunni@netestate.de
Wed Apr 1 18:51:53 GMT 2020


hi all,

in case someone wonders, the solution is this patch to rpcbind that did not
find its way into an official release yet:

 https://sourceforge.net/p/libtirpc/mailman/message/36753747/

The rpcbind git repository has the patch.

My old 32bit libtirpc tries portmap/rpcbind protocol version 2 first, which
only returns port numbers - so it does not have the problem. Why I still
had the problem with a 64bit compile of the old libtirpc evades me. Maybe
I made a mistake somewhere.

Regards,

Michael Brunnbauer

On Mon, Mar 30, 2020 at 04:44:19PM +0200, Michael Brunnbauer wrote:
> 
> hi all,
> 
> I am currently moving from 32bit glibc 2.30 to 64bit glibc 2.31 and my
> 64bit clnt_create() is misbehaving with multihomed systems.
> 
> Assume the primary IP of the system is IP1 and the system has a secondary IP
> IP2. Now an RPC service binds to IP2 and registers program 576871000 with
> rpcbind. The 64bit clnt_create() called with IP2 as host will use IP2 to 
> connect to rpcbind but IP1 to connect to the actual service - so it fails with
> ": RPC: Remote system error - Connection refused". The 32bit clnt_create()
> still works fine.
> 
> I can reproduce this with rpcinfo also (actual IP replace with IP2):
> 
> # old 32 bit rpcinfo
> ./rpcinfo -t IP2 576871000
> program 576871000 version 1 ready and waiting
> program 576871000 version 2 ready and waiting
> # new 64bit rpcinfo
> /usr/bin/rpcinfo -t IP2 576871000
> IP2: RPC: Remote system error - Connection refused
> 
> This problem occurs with:
> -32bit rpcbind 0.2.1 from http://sourceforge.net/projects/rpcbind/
> -64bit rpcbind 1.2.5 from same source
> -64bit libtirpc 0.2.4 from http://sourceforge.net/projects/libtirpc/
> -64bit libtirpc 1.2.5 from same source
> 
> As using my old version of libtirpc - which was used for compilind the 32 bit 
> rpcinfo - does not help, I suspect the switch from 32 to 64bit or from
> glibc2.30 to 2.31 may have caused the problem.
> 
> My gcc is version 7.5.0 (x86_64-pc-linux-gnu).
> 
> Any ideas?
> 
> Regards,
> 
> Michael Brunnbauer
> 
> -- 
> ++  Michael Brunnbauer
> ++  netEstate GmbH
> ++  Geisenhausener Straße 11a
> ++  81379 München
> ++  Tel +49 89 32 19 77 80
> ++  Fax +49 89 32 19 77 89 
> ++  E-Mail brunni@netestate.de
> ++  https://www.netestate.de/
> ++
> ++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
> ++  USt-IdNr. DE221033342
> ++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
> ++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel



-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail brunni@netestate.de
++  https://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-help/attachments/20200401/f8cc1433/attachment.sig>


More information about the Libc-help mailing list