public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "PAULUS, Raimund, TI-ABN" <Raimund.Paulus@dillinger.biz>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: RPC clnt_create() adress already in use
Date: Mon, 05 Feb 2018 08:19:00 -0000	[thread overview]
Message-ID: <59D90AF8D70E9740907BACDE2BCB520836E325EF@RESW102.resdom01.local> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3428 bytes --]

Hello Mark,

unfortunately i must correct my statement from Friday.
The program works, but only if the connections to the server are established in a loop inside the program.
If the program ends and you start it anew, a connection is not possible for a long time. you have to wait before you can establish a new connection.

Actually only our approaches in the original bindresvport() seem to work for all cases.
You have proposed to use the static variable usecount in bindresvport(). But how is the value of the variable handled if the program starts anew. Is it possible to get an used portnumber 
and run in EADDRINUSE?

Greetings
Raimund

-----Ursprüngliche Nachricht-----
Von: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] Im Auftrag von PAULUS, Raimund, TI-ABN
Gesendet: Freitag, 2. Februar 2018 13:58
An: cygwin@cygwin.com
Betreff: Re: RPC clnt_create() adress already in use

Hi Mark,

it works. Maybe it's the best solution for the problem.

Greetings

Raimund


-----Ursprüngliche Nachricht-----
Von: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] Im Auftrag von Mark Geisert
Gesendet: Freitag, 2. Februar 2018 09:11
An: cygwin@cygwin.com
Betreff: Re: RPC clnt_create() adress already in use

Mark Geisert wrote:
> Corinna Vinschen wrote:
>> On Jan 31 00:15, Mark Geisert wrote:
>>> PAULUS, Raimund, TI-ABN wrote:
>>>> Hi Mark,
>>>>
>>>> in my email
>>>> (https://sourceware.org/ml/cygwin/2017-12/msg00194.html) i described 2 approaches. I prefer  nr 1.
>>>> Here the part of the source in bindresvport.c:
>>>> [...]
> [...]
>>
>> I'm a bit puzzled here in terms of using your own bindresvport.  
>> Cygwin implements bindresvport{_sa} for quite some time, 2006 or earlier.
>
> Yeesh; I did not know that.  Thanks for pointing that out. So that 
> means there's another possible way to try solving the OP's issue: by 
> using Cygwin's
> bindresvport* in place of the one supplied with libtirpc.
>
> If we see the OP's issue with Cygwin's bindresvport*, I think it makes 
> more sense to patch libtirpc than to change Cygwin's bindresvport*.
> The crux of OP's issue is that libtirpc's code expects to see 
> EADDRINUSE errors from bind() whereas on Cygwin they aren't often seen until you connect().
>
> I'll look into using Cygwin's bindresvport() in the next day or two.

My testing shows that OP's original issue goes away when libtirpc is compiled to use Cygwin's bindresvport() directly rather than using its own version of that function.

Raimund, could you try this newest possible solution?  Before the first #include in bindresvport.c, add the line
     #ifndef __CYGWIN__
and at the end of the file, add the line
     #endif
Then rebuild your libtirpc and your test programs linking against it, then run your tests.  If this proves to solve your original problem then I'll submit a patch of libtirpc to the Cygwin package maintainer.

Thank you,

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

\x03B‹KCB”\x1c›Ø›\x19[H\x1c™\^[ܝ\x1cΈ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÜ\x1c›Ø›\x19[\Ëš\x1d^[[\x03B‘TNˆ\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ˜\KÃB‘^[ØÝ[Y[\x18]\x1a[ÛŽˆ\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ^[ØÜËš\x1d^[[\x03B•[œÝXœØÜšX™H\x1a[™›Îˆ\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÛ[\vÈÝ[œÝXœØÜšX™K\Ú[\^[\x19CBƒB

             reply	other threads:[~2018-02-05  8:19 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-05  8:19 PAULUS, Raimund, TI-ABN [this message]
2018-02-05 10:29 ` Mark Geisert
2018-02-05 11:26   ` Corinna Vinschen
2018-02-05 13:34     ` Corinna Vinschen
2018-02-05 14:06       ` Corinna Vinschen
2018-02-05 20:15         ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2018-03-08 11:44 PAULUS, Raimund, TI-ABN
2018-03-08 15:24 ` Corinna Vinschen
2018-03-08 23:00 ` Mark Geisert
2018-03-02 10:39 PAULUS, Raimund, TI-ABN
2018-02-27  9:54 PAULUS, Raimund, TI-ABN
2018-02-27 10:37 ` Corinna Vinschen
2018-02-28  6:00   ` Mark Geisert
2018-02-06 11:29 PAULUS, Raimund, TI-ABN
2018-02-06 14:20 ` Corinna Vinschen
2018-02-07  6:54   ` Mark Geisert
2018-02-05 14:58 PAULUS, Raimund, TI-ABN
2018-02-02 12:58 PAULUS, Raimund, TI-ABN
2018-01-30 10:07 PAULUS, Raimund, TI-ABN
2018-01-31  8:15 ` Mark Geisert
2018-01-31  9:11   ` Corinna Vinschen
2018-01-31  9:35     ` Mark Geisert
2018-02-02  8:11       ` Mark Geisert
2018-01-30  7:01 PAULUS, Raimund, TI-ABN
2018-01-30  9:05 ` Mark Geisert
2017-12-19 16:13 PAULUS, Raimund, TI-ABN
2017-12-28  0:03 ` Mark Geisert
2017-09-29  9:52 PAULUS, Raimund, TI-ABN
2017-09-29 17:36 ` Mark Geisert
2017-09-27 12:51 PAULUS, Raimund, TI-ABN
2017-09-25  6:44 PAULUS, Raimund, TI-ABN
2017-09-27  9:50 ` Mark Geisert
2017-09-22  7:22 PAULUS, Raimund, TI-ABN
2017-09-24  9:49 ` Mark Geisert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59D90AF8D70E9740907BACDE2BCB520836E325EF@RESW102.resdom01.local \
    --to=raimund.paulus@dillinger.biz \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).