Re: dup(0) failed after 3195 successes: Bad file descriptor

From: George Weaver <gweaver(at)shaw(dot)ca>
To: operationsengineer1(at)yahoo(dot)com, pgsql-novice(at)postgresql(dot)org
Subject: Re: dup(0) failed after 3195 successes: Bad file descriptor
Date: 2004-08-20 12:40:03
Message-ID: 004401c486b2$d2004430$6400a8c0@Dell4500
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

There is no contradiction.

Although you have started postmaster, you have NOT started it as a Windows service. Therefore querying its status via cygrunsrv will report that the service is stopped. If you query the status via pg_ctl status, it should report that the postmaster is running. This is why you can connect via psql.

Conversly, if you had started PostgeSQL as a Windows service, pg_ctl status would report that the postmaster is stopped.

George

----- Original Message -----
From: operationsengineer1(at)yahoo(dot)com
To: pgsql-novice(at)postgresql(dot)org
Sent: Friday, August 20, 2004 1:37 AM
Subject: Re: [NOVICE] dup(0) failed after 3195 successes: Bad file descriptor

Tom and all,

I have a basic installation on my development laptop (will never be a production computer). Here is what I do (the install is basically complete, I'm just trying to start things up post install):

1. cygserver starts automatically; When I first start WinXP, I see two instances of cygrunsrv.exe and two cases of cygserve.exe, all four owned by "SYSTEM". Owner is my user in this case. Could SYSTEM ownership be a problem? I went ahead and shut down the SYSTEM owned cygrunsrv.exe instances before progressing.

2. export CYGWIN=server

3. postmaster -i -D /var/postgresql/data $

After I complete #3, above, I get....

[3] 3136

then, after a short delay, I get

$Warning: dup(0) failed after 3195 successes: Bad file descriptor
LOG: database system was interrupted at 2004-08-19 19:02:50 PST
LOG: checkpoint record is at 0/9DE038
LOG: redo record is at 0/9DE038; undo record is at 0/0: shutdown FALSE
LOG: next transaction ID: 536; next OID: 17142
LOG: database system was not properly shutdown; automatic recovery in progress

LOG: record with zero length at 0/9DE078
LOG: redo is not required
LOG: database system is ready

When I type in

cygrunsrv -Q postmaster

I get the following...

Service postmaster exists
Type: Own Process
Current State: Stopped ***this shouldn't be stopped, correct?***
Controls Accepted:

When I check my Windows Task Manager processes again, I see 1 instance of cygserver.exe and three isntances of postgresql.exe (all 4 owned by Owner). I don't see any instances of cygrunsrv.exe.

If I type in

psql template1

I get

Welcome to the psql 7.4.3...

Type: c... abbreviated for brevity...
h...
?...
\g...
\q...

template1=#

It looks to me like postmaster is stopped, but I can still connect to template1. This is a contradiction, is it not?

Any help would be appreciated.

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
writes:
> I did a search for this error
> *dup(0) failed after 3195 successes: Bad file descriptor*
> and came up empty as far as resolutions.

This is not an error ... it's an expected result. If you are going to
set the log level at DEBUGn, you should expect to see a lot of
interesting-only-to-wizards chatter.

> Some references on postgresql.org archives seem to indicate it isn't
> an issue, however, when I try and check to see if postmaster is
> running via
> cygrunsrv -Q postmaster
> I get...
> Current State: Stopped

That may be a problem, but this isn't the cause.

regards, tom lane

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.co m

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2004-08-20 15:15:00 Re: dup(0) failed after 3195 successes: Bad file descriptor
Previous Message tausenddoof 2004-08-20 10:52:53 ecpg - libecpg.dll