Application EventLog: could not write to log file: Bad file descriptor

Lists: pgsql-general
From: "Ati Rosselet" <ati(dot)rosselet(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Application EventLog: could not write to log file: Bad file descriptor
Date: 2008-06-06 01:39:57
Message-ID: ce6402fc0806051839o13552a6fl183de60a1ad6005@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Using postgresql 8.3 on windows 2003 server. I keep seeing this message in
my system log. Checking the times, it seems to coincide with a log
rollover each time, almost as though the db were trying to log something at
precisely the same time as it is closing access to the old file, and before
opening the new file.. and so fails to write.. does this make sense? has
anyone else seen this? Solutions? Ideas? I reduced logging, and disabled
the debugging plugin (still don't know how that got enabled.. I must have
missed something on the install). Hope that helps....

Any ideas what is causing this error to be logged?
Cheers
Ati


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Ati Rosselet <ati(dot)rosselet(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Application EventLog: could not write to log file: Bad file descriptor
Date: 2008-06-06 21:24:51
Message-ID: 20080606212451.GG16502@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Ati Rosselet escribió:
> Using postgresql 8.3 on windows 2003 server. I keep seeing this message in
> my system log. Checking the times, it seems to coincide with a log
> rollover each time, almost as though the db were trying to log something at
> precisely the same time as it is closing access to the old file, and before
> opening the new file.. and so fails to write.. does this make sense? has
> anyone else seen this? Solutions? Ideas? I reduced logging, and disabled
> the debugging plugin (still don't know how that got enabled.. I must have
> missed something on the install). Hope that helps....

Do you have CSV logging enabled?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


From: "Ati Rosselet" <ati(dot)rosselet(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Application EventLog: could not write to log file: Bad file descriptor
Date: 2008-06-08 22:40:09
Message-ID: ce6402fc0806081540m4dd93401qae6c853f428320d5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

sorry, forgot to cc: to the group..To: Alvaro Herrera <
alvherre(at)commandprompt(dot)com>

not as far as I can tell... I have log_destination='stderr'. unless csv
logging is enabled in another location?

Since I disabled the following line:
shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll'
and changed logging from 'all' to 'mod'
I have not seen the error, although that may just be because the amount
logged is reduced drastically
(from verbose due to logging all selects - to pretty much zero for normal
website usage - very few modifying queries:))

Thanks.
Ati

On Fri, Jun 6, 2008 at 11:24 PM, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
wrote:

> Ati Rosselet escribió:
> > Using postgresql 8.3 on windows 2003 server. I keep seeing this message
> in
> > my system log. Checking the times, it seems to coincide with a log
> > rollover each time, almost as though the db were trying to log something
> at
> > precisely the same time as it is closing access to the old file, and
> before
> > opening the new file.. and so fails to write.. does this make sense?
> has
> > anyone else seen this? Solutions? Ideas? I reduced logging, and
> disabled
> > the debugging plugin (still don't know how that got enabled.. I must have
> > missed something on the install). Hope that helps....
>
> Do you have CSV logging enabled?
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Ati Rosselet <ati(dot)rosselet(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Application EventLog: could not write to log file: Bad file descriptor
Date: 2008-06-09 15:11:47
Message-ID: 20080609151147.GC5026@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Ati Rosselet escribió:
> sorry, forgot to cc: to the group..To: Alvaro Herrera <
> alvherre(at)commandprompt(dot)com>
>
>
> not as far as I can tell... I have log_destination='stderr'. unless csv
> logging is enabled in another location?

No, that should mean it's disabled.

> Since I disabled the following line:
> shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll'
> and changed logging from 'all' to 'mod'
> I have not seen the error, although that may just be because the amount
> logged is reduced drastically
> (from verbose due to logging all selects - to pretty much zero for normal
> website usage - very few modifying queries:))

Yes, the problem is probably not gone but just made rarer. ISTM it
would be good to debug it. The Windows logger code does use two threads
for the logging (as opposed to everywhere else which uses a single
process) so it's quite possible that the locking is bogus somewhere.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


From: "Ati Rosselet" <ati(dot)rosselet(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Application EventLog: could not write to log file: Bad file descriptor
Date: 2008-06-11 09:03:08
Message-ID: ce6402fc0806110203h33b622dei3a0737b5c5a08e5d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Well.. I guess I'll just have to hope it pops up rarely enough to not be a
problem since I really don't have the capacity to try to debug postgres code
for the foreseeable future :) Should I log a bugreport, or a suspected bug
report (if such an animal exists...)? :)

Cheers
Ati

On Mon, Jun 9, 2008 at 5:11 PM, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
wrote:

> Ati Rosselet escribió:
> > sorry, forgot to cc: to the group..To: Alvaro Herrera <
> > alvherre(at)commandprompt(dot)com>
> >
> >
> > not as far as I can tell... I have log_destination='stderr'. unless csv
> > logging is enabled in another location?
>
> No, that should mean it's disabled.
>
> > Since I disabled the following line:
> > shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll'
> > and changed logging from 'all' to 'mod'
> > I have not seen the error, although that may just be because the amount
> > logged is reduced drastically
> > (from verbose due to logging all selects - to pretty much zero for normal
> > website usage - very few modifying queries:))
>
> Yes, the problem is probably not gone but just made rarer. ISTM it
> would be good to debug it. The Windows logger code does use two threads
> for the logging (as opposed to everywhere else which uses a single
> process) so it's quite possible that the locking is bogus somewhere.
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>


From: "Ati Rosselet" <ati(dot)rosselet(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Application EventLog: could not write to log file: Bad file descriptor
Date: 2008-06-18 11:53:02
Message-ID: ce6402fc0806180453w526bd373r988e558051a99e3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

yup.. still there.. just reduced frequency... just got the first one since
reducing the logging... darn.. :(
I checked the fixes for the new release, but no mention of it. Does this
mean no-one else has run into this? Or am I the only idiot running postgres
on windows? :))
Cheers
Ati

On Mon, Jun 9, 2008 at 5:11 PM, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
wrote:

> Ati Rosselet escribió:
> > sorry, forgot to cc: to the group..To: Alvaro Herrera <
> > alvherre(at)commandprompt(dot)com>
> >
> >
> > not as far as I can tell... I have log_destination='stderr'. unless csv
> > logging is enabled in another location?
>
> No, that should mean it's disabled.
>
> > Since I disabled the following line:
> > shared_preload_libraries = '$libdir/plugins/plugin_debugger.dll'
> > and changed logging from 'all' to 'mod'
> > I have not seen the error, although that may just be because the amount
> > logged is reduced drastically
> > (from verbose due to logging all selects - to pretty much zero for normal
> > website usage - very few modifying queries:))
>
> Yes, the problem is probably not gone but just made rarer. ISTM it
> would be good to debug it. The Windows logger code does use two threads
> for the logging (as opposed to everywhere else which uses a single
> process) so it's quite possible that the locking is bogus somewhere.
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>