Re: Cygwin PostgreSQL Regression Test Problems (Revisited)

From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-ports(at)postgresql(dot)org
Subject: Re: Cygwin PostgreSQL Regression Test Problems (Revisited)
Date: 2001-03-30 14:25:47
Message-ID: 20010330092547.K209@dothill.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Tom,

On Thu, Mar 29, 2001 at 04:55:17PM -0500, Jason Tishler wrote:
> Cygwin is essentially Windows in this regard since Cygwin uses Windows
> sockets to implement Posix sockets. My WAG is that if EINPROGRESS is
> returned during a connect attempt then the regression test hangs;
> otherwise, the regression test runs to completion.
>
> So, I applied the attached patch so that non-blocking I/O is not enabled
> until after the connection has been established (just like with Win32
> and SSL). I have the regression test running in a forever loop. So far
> it has succeeded 10 times without a hang. On this machine, I have never
> been able to get more than three in a row to succeed before.
>
> I am going to run the regression tests all night. I will report back
> tomorrow to let the list know whether or not I got any hangs.

The regression test forever loop ran all night without a hang -- 150+
successes in a row. So, I feel that it is safe to say that Cygwin (or
Windows Sockets) has problems with nonblocking connects.

> Would the PostgreSQL team be willing to accept this patch?

Any feedback on my patch (reattached for convenience)? I would hate to
see 7.1 go out the door with this issue.

BTW, why is libpq's connection policy currently nonblocking for all
platforms except (straight) Win32? Do people try to connect to multiple
postmasters concurrently? If not, then what is the benefit over a
blocking connect?

> At least,
> until I determine whether or not I can get Cygwin "fixed?" I will post
> to the Cygwin list tomorrow (when/if they are back up).

I will post to the Cygwin list regarding this problem. Just to make sure
that I have my story straight: psql is hanging while trying a nonblocking
connect to postmaster (not one of the backends). Correct?

If anyone has any nonblocking socket client code with a corresponding
server lying around please let me know. I would like to post this to
the Cygwin list to facilitate their debugging.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp. Fax: +1 (732) 264-8798
82 Bethany Road, Suite 7 Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com

Attachment Content-Type Size
fe-connect.c.patch text/plain 895 bytes

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Peter Eisentraut 2001-03-30 15:13:10 Re: Help for Installation
Previous Message Mathijs Brands 2001-03-30 10:17:01 Re: Re: [PORTS] pgmonitor and Solaris