473,545 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2439
CSN <co************ *******@yahoo.c om> 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*******@postg resql.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.c om> 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

iD8DBQFA4eJLY5T wig3Ge+YRArl3AJ 0R2jAKn81Pc4Krt vrJ3i9E5ZsfqQCf Wf+c
UhNi+E6O2Z2jYa7 fE9qZMSk=
=M7aD
-----END PGP SIGNATURE-----

Nov 23 '05 #3
CSN
--- Tom Lane <tg*@sss.pgh.pa .us> wrote:
CSN <co************ *******@yahoo.c om> 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
4007
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 DotNetJunkies.com also. -------------------------------------------------------------------------- YEP, DOTNET JUNKIES REDESIGN....
6
6261
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 it to flock like: flock(???, LOCK_EX);
0
6781
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 trying to connect to a v8 ESE database on AIX 5 from a v8 client on Windows 98. What the heck is "A file descriptor does not refer to an open...
2
5030
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 folder structure and naming conventions and then send a Net send message to those users telling them to rectify. The information I want to get is when...
3
5255
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 is about Python or POSIX. In the following, the first time through, everything works. On the second connection, though, the same file descriptor...
3
4319
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 database size is about 10GB, I have tried to backup the database into a DDS tape (20GB) or hardisk (100GB free space) but still getting the same error....
3
6229
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 that multiple worksheet data in different table.How can i do it.Below is my xml file. <?xml version="1.0"?> <Workbook...
3
5371
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 that multiple worksheet data in different table.How can i do it.Below is my xml file. <?xml version="1.0"?> <Workbook...
0
2794
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 for connection requests. When the request comes in, it returns a socket file descriptor for that connection. This is used to launch the client session...
0
7475
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7409
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7664
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7766
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5341
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4958
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
715
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.