Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 3 May 2005 15:13:39 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: postgresql and sockets Message-ID: <20050503131339.GA27360@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20050503091333 DOT GF25050 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i On May 3 13:24, Krzysztof Duleba wrote: > Corinna Vinschen wrote: > > > > However, `psql -h localhost -p 5432' succeeds. So in fact the socket > is > > > still there, but the link stored in /tmp/.s.PGSQL.5432 is broken. > > > > That's rather unlikely. Could you show us an strace of the above > failing > > psql call? Perhaps there's some interesting information in there. > > > > > > Corinna > > There are 3 cases, so I attach 3 straces. > > str1 is the case when `psql' failed. Let's stick with this one since that's the important case. Unfortunately the strace output doesn't tell us where exactly it fails. It seems that the call to get_inet_addr from fhandler_socket::connect is the culprit, otherwise there would be a set_winsock_errno call somewhere around this spot. I have the strange feeling that the file isn't recognized as socket anymore for some reason. When you called `cat /tmp/.s.PGSQL.5432', did you use Cygwin's cat? If the file would have been recognized as socket, you shouldn't have been able to read the content of the file. The correct result would have been: $ cat /tmp/.s.PGSQL.5432 cat: /tmp/.s.PGSQL.5432: No such device or address So I'm wondering if something happened before the call to psql, so that the file has been... well, "downgraded" to a normal file instead of a socket file. Socket files have the system attribute set, for instance. If you remove this, the file is not recognized as socket file anymore. Are you set up to debug the DLL using GDB? If you download the latest snapshot from http://cygwin.com/snapshots and set a breakpoint to get_inet_addr, you could step through this function until it's left. The first interesting information would be, from which line the function is left. If you're not setup to debug the DLL, I'd try to come up with some additional debug output for the next Cygwin snapshot. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/