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

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

From
Date:
I did a search for this error
 
*dup(0) failed after 3195 successes: Bad file descriptor*
 
and came up empty as far as resolutions.
 
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
 
I understand that this should say...
 
Current State:  Running.
 
Any guidance would be appreciated.
 
TIA...


Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.

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

From
Tom Lane
Date:
<operationsengineer1@yahoo.com> 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

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@sss.pgh.pa.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

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

From
George Weaver
Date:
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 -----
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@sss.pgh.pa.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

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

From
Tom Lane
Date:
<operationsengineer1@yahoo.com> writes:
> It looks to me like postmaster is stopped, but I can still connect to template1.  This is a contradiction, is it not?

The postmaster is running (else psql wouldn't work) but it looks to me
like the task manager doesn't know about it.

Windows isn't my turf ... you might try on pgsql-hackers-win32 ...

            regards, tom lane