473,700 Members | 2,353 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 2447
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
4053
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
6277
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
6798
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 file."??? In the db2diag.log, it recognized the client's IP address.
2
5042
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 you select the file/folder and then: Properties -> Security Tab -> Advanced Button -> Owner Tab ->...
3
5267
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 as the first connection may be re-used, but for some reason, trying to do os.read/close on that...
3
4326
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. So, there is no possibility that the backup media is full. Anyway, here's part of db2diag.log file...
3
6245
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 xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" ...
3
5398
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 xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office"...
0
2807
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 thread. The Session class uses dup() to duplicate the file descriptor generated by ServerSocket into...
0
8731
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8648
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8929
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7816
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6564
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5904
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3095
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2031
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.