473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

CSN

At startup this appears in the log:

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

What does it mean?

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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
4 2430
CSN <co*******************@yahoo.com> writes:
WARNING: dup(0) failed after 3195 successes: Bad file
descriptor


Hmm. What system is this on? What errno code corresponds to
"Bad file descriptor"?

This is coming from

thisfd = dup(0);
if (thisfd < 0)
{
/* Expect EMFILE or ENFILE, else it's fishy */
if (errno != EMFILE && errno != ENFILE)
elog(WARNING, "dup(0) failed after %d successes: %m", used);
break;
}

I would suppose there is another EXXX code we have to allow to pass
without comment, but I don't know from your report what it is.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #2
On Tue, Jun 29, 2004 at 10:10:18AM -0400, Tom Lane wrote:
CSN <co*******************@yahoo.com> writes:
WARNING: dup(0) failed after 3195 successes: Bad file
descriptor
Hmm. What system is this on? What errno code corresponds to
"Bad file descriptor"?


That would be EBADF I think. However, my linux manpage indicates it's
not a possible return from dup, only from dup2. Very odd.

--
Martijn van Oosterhout <kl*****@svana.org> http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFA4eJLY5Twig3Ge+YRArl3AJ0R2jAKn81Pc4KrtvrJ3i 9E5ZsfqQCfWf+c
UhNi+E6O2Z2jYa7fE9qZMSk=
=M7aD
-----END PGP SIGNATURE-----

Nov 23 '05 #3
CSN
--- Tom Lane <tg*@sss.pgh.pa.us> wrote:
CSN <co*******************@yahoo.com> writes:
WARNING: dup(0) failed after 3195 successes: Bad

file
descriptor


Hmm. What system is this on? What errno code
corresponds to
"Bad file descriptor"?

This is coming from

thisfd = dup(0);
if (thisfd < 0)
{
/* Expect EMFILE or ENFILE, else it's
fishy */
if (errno != EMFILE && errno != ENFILE)
elog(WARNING, "dup(0) failed after
%d successes: %m", used);
break;
}

I would suppose there is another EXXX code we have
to allow to pass
without comment, but I don't know from your report
what it is.


It's on windows xp home edition. I just upgraded
cygwin and postgresql to 7.4.3 - the warning didn't
appear in the log previously.

CSN

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #4
Martijn van Oosterhout <kl*****@svana.org> writes:
On Tue, Jun 29, 2004 at 10:10:18AM -0400, Tom Lane wrote:
Hmm. What system is this on? What errno code corresponds to
"Bad file descriptor"?
That would be EBADF I think. However, my linux manpage indicates it's
not a possible return from dup, only from dup2. Very odd.


HPUX man page says that it's a valid dup() error when the *supplied*
descriptor is bogus. Which is surely not true for zero (stdin) and
is even less plausible given that the previous 3195 iterations of this
tight loop had no problem with the same supplied descriptor.

But CSN says in a followup that this is on Cygwin. In short, what we
got here is another Cygwin bug [yawn]. I'm inclined to do something
like

if (thisfd < 0)
{
/*
* Expect EMFILE or ENFILE, else it's fishy; and Cygwin has
* a fishiness level all of its own...
*/
if (errno != EMFILE && errno != ENFILE
#ifdef __CYGWIN__
&& errno != EBADF
#endif
)
elog(WARNING, "dup(0) failed after %d successes: %m", used);
break;
}

unless someone can point to another platform that does the same thing.
(Hey -win32 hackers: does the native port exhibit this behavior?)

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
by: nospam | last post by:
THIS IS the DOTNETJUNKIES MESSAGE ------------------------- We're Sorry As many of you know we have recently launched SqlJunkies.com. We have overhauled our runtime and will be using it on...
6
by: pembed2003 | last post by:
Hi all, Given something like: std::ofstream out_file("path"); how do I extract the file descriptor from out_file? Is it possible? What I want is to extract the file descriptor and then pass...
0
by: sql-db2-dba | last post by:
CLI connection failed. SQL0902C. A system error (reason code="6029321") occurred. Subsequent SQL statements cannot be processed. SQLSTATE=58005. Has anyone encountered the above error? We are...
2
by: John Regan | last post by:
Hello All I am trying to find the owner of a file or folder on our network (Windows 2000 Server) using VB.Net and/or API. so I can search for Folders that don't follow our company's specified...
3
by: Yang | last post by:
Hi, I'm experiencing a problem when trying to close the file descriptor for a socket, creating another socket, and then closing the file descriptor for that second socket. I can't tell if my issue...
3
by: xeqister | last post by:
Hi, I have a DB2 database (version 7) running on Windows 2000 server and recently facing problem to backup my database. I got an error "Disk was full" after half way running the backup. My...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
0
by: meLlamanJefe | last post by:
I have the following code snippet that is used in a simple multi-threaded server program I am testing. The ServerSocket class binds to a port and creates a listening socket. Then it sits and waits...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.