delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/01/30/05:07:58

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:mime-version; q=dns; s=default; b=sIkT85VdgmJzd7jGthtAXHFBLnVm3
6nfIMIXObwk4uIlteb+QXCaOSyZtaOCB4xvaiCptdKQcfsBfinoxxWLaFR6EU/HU
RvxQWxBFYE0tYuG7Gc4v6SfKOpp+xtTSPk15may6kLS+9G0IIYhy54OgWTUh7I+m
OwPwm550iGZ1OE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:mime-version; s=default; bh=f/DLUf2cgBnqt5afUN4SLxQb0L8=; b=NKv
GjmIC0LmKNS66xLDUvIBu/BYTS4DlGNEc3WUd99l1/GldKD/+xacYgALWDRKx7Ja
jyxFM1ZBryyJkQf23/d1N0TmEZEtYFxrMBsxkWJlYsh8d8Dc+oOMuDfnqbtt8K2I
Akb6Tp/2NOIj2diVbbMaBPcQZ2eCRZjoVU7bz70Y=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,CYGWIN_OWNER_BODY,GIT_PATCH_2,KAM_ASCII_DIVIDERS,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=H*MI:local, H*M:local, profits, SERVICES
X-HELO: mailrelay.dillinger.de
From: "PAULUS, Raimund, TI-ABN" <Raimund DOT Paulus AT dillinger DOT biz>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: RPC clnt_create() adress already in use
Date: Tue, 30 Jan 2018 10:07:35 +0000
Message-ID: <59D90AF8D70E9740907BACDE2BCB520836E01220@RESW102.resdom01.local>
MIME-Version: 1.0
X-IsSubscribed: yes

--_002_59D90AF8D70E9740907BACDE2BCB520836E01220RESW102resdom01_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Mark,

in my email (https://sourceware.org/ml/cygwin/2017-12/msg00194.html) i desc=
ribed 2 approaches. I prefer  nr 1.
Here the part of the source in bindresvport.c:
---------------------------------------------------------------------------=
---------------------------------------
        if (port =3D=3D 0) {
                port =3D (getpid() % NPORTS) + STARTPORT;
        }
        res =3D -1;
        errno =3D EADDRINUSE;

/* fix for bind() */
port =3D 0;
                again:
        for (i =3D 0; i < nports; ++i) {
                *portp =3D htons(port++);
                 if (port > endport)
                        port =3D startport;
                res =3D bind(sd, sa, salen);
                if (res >=3D 0 || errno !=3D EADDRINUSE)
                        break;
        }
        if (i =3D=3D nports && startport !=3D LOWPORT) {
            startport =3D LOWPORT;
            endport =3D STARTPORT - 1;
            nports =3D STARTPORT - LOWPORT;
            port =3D LOWPORT + port % (STARTPORT - LOWPORT);
            goto again;
        }
        mutex_unlock(&port_lock);

        return (res);
}
---------------------------------------------------------------------------=
----------------------------

This causes bind() to search an unused port. I use libtirpc with this fix s=
ince several weeks and it works for me. I don't know an other way (fixing C=
ygwin) to success.
The RPC-client on my pc is started every few minutes and has to connect to =
the RPC-server.  Without the fix libtirpc is not usable and I have to use C=
ygwin 1.5.18 with the old librpc.

Raimund


-----Urspr=FCngliche Nachricht-----
Von: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] Im Auftrag vo=
n Mark Geisert
Gesendet: Dienstag, 30. Januar 2018 10:05
An: cygwin AT cygwin DOT com
Betreff: Re: RPC clnt_create() adress already in use

PAULUS, Raimund, TI-ABN wrote:
> Hi Mark,
> as Corinna wrote in the thread " Cygwin socket option SO_REUSEADDR operat=
es unlike Linux", the cause for the problem in libtirpc is Microsofts imple=
mentation of socket handling. If i implement a simple socket client, that i=
s not so much of an issue, because I call the functions separately and can =
handle the error. Moreover in this case bind() is not necessary.
> But in the case of libtirpc the implementation of clnttcp_create() determ=
ines the sequence of bind() and connect() for the local port and you cannot=
 correct the error of bind() after the call of connect(). Therefore I think=
 best is to set the port number to zero (port =3D 0) before the call to bin=
d().
>
> Raimund
>
>
> -----Urspr=FCngliche Nachricht-----
> Von: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] Im=20
> Auftrag von PAULUS, Raimund, TI-ABN
> Gesendet: Dienstag, 9. Januar 2018 09:14
> An: cygwin AT cygwin DOT com
> Betreff: WG: AW: RPC clnt_create() adress already in use
[...]

Hi Raimund,
Where, exactly, would you set the port number to zero?  I can imagine how t=
his would solve the problem you're seeing but I'm concerned about other use=
 cases.

It also seems a little odd to me we'd be making a Cygwin-specific patch rat=
her than "fixing" Cygwin itself so the patch would not be necessary.  But I=
 don't feel strongly either way here.  libtirpc already has Cygwin-specific=
 patches.

..mark


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


--_002_59D90AF8D70E9740907BACDE2BCB520836E01220RESW102resdom01_
Content-Type: text/plain; name="bindresvport.c"
Content-Description: bindresvport.c
Content-Disposition: attachment; filename="bindresvport.c"; size=6301;
	creation-date="Tue, 30 Jan 2018 09:54:42 GMT";
	modification-date="Tue, 30 Jan 2018 09:51:07 GMT"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0KCXNhLT5zYV9mYW1pbHkgPSBhZjsKCglpZiAoKnBvcnRw
ID09IDApIHsKCQlzb2NrbGVuX3Qgb2xkbGVuID0gc2l6ZW9mKG9sZCk7CgoJ
CWVycm9yID0gZ2V0c29ja29wdChzZCwgcHJvdG8sIHBvcnRyYW5nZSwgJm9s
ZCwgJm9sZGxlbik7CgkJaWYgKGVycm9yIDwgMCkKCQkJcmV0dXJuIChlcnJv
cik7CgoJCWVycm9yID0gc2V0c29ja29wdChzZCwgcHJvdG8sIHBvcnRyYW5n
ZSwgJnBvcnRsb3csCgkJICAgIHNpemVvZihwb3J0bG93KSk7CgkJaWYgKGVy
cm9yIDwgMCkKCQkJcmV0dXJuIChlcnJvcik7Cgl9CgoJZXJyb3IgPSBiaW5k
KHNkLCBzYSwgc2FsZW4pOwoKCWlmICgqcG9ydHAgPT0gMCkgewoJCWludCBz
YXZlZF9lcnJubyA9IGVycm5vOwoKCQlpZiAoZXJyb3IgPCAwKSB7CgkJCWlm
IChzZXRzb2Nrb3B0KHNkLCBwcm90bywgcG9ydHJhbmdlLCAmb2xkLAoJCQkg
ICAgc2l6ZW9mKG9sZCkpIDwgMCkKCQkJCWVycm5vID0gc2F2ZWRfZXJybm87
CgkJCXJldHVybiAoZXJyb3IpOwoJCX0KCgkJaWYgKHNhICE9IChzdHJ1Y3Qg
c29ja2FkZHIgKikmbXlhZGRyKSB7CgkJCS8qIEhtbSwgd2hhdCBkaWQgdGhl
IGtlcm5lbCBhc3NpZ24/ICovCgkJCWlmIChnZXRzb2NrbmFtZShzZCwgc2Es
ICZzYWxlbikgPCAwKQoJCQkJZXJybm8gPSBzYXZlZF9lcnJubzsKCQkJcmV0
dXJuIChlcnJvcik7CgkJfQoJfQoJcmV0dXJuIChlcnJvcik7Cn0KI2VuZGlm
Cg==


--_002_59D90AF8D70E9740907BACDE2BCB520836E01220RESW102resdom01_
Content-Type: text/plain; charset=us-ascii


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019