Thread: PostgreSQL crashes on Windows 2003

PostgreSQL crashes on Windows 2003

From
"Joost Kraaijeveld"
Date:
Hi,

The PostgreSQL of a customer database (running on Windows 2003) crashed
and wrote the messages below in the logfile. According to the customer
the drives are working OK, partitions are not full and nothing has
changed in the permissions. The customer could restart the PostgreSQL
service manually, without resorting to a backup.

Could this be the result of not enough check_point segments?

2007-03-08 22:36:26 ERROR:  could not read block 15894 of relation 1663/3227318/3227439: Permission denied
2007-03-08 22:36:26 STATEMENT:  UPDATE deliver_cares SET org_personnel_id=$1, spent_time=$2, status=$3,
when_registered=$4,actively_registered=$5 WHERE deliver_care_id=$6 
2007-03-08 22:37:31 ERROR:  could not write block 8 of relation 1663/3227318/4689678: Permission denied
2007-03-08 22:37:31 CONTEXT:  writing block 8 of relation 1663/3227318/4689678
2007-03-08 22:38:57 FATAL:  could not read from statistics collector pipe: No error
2007-03-08 22:38:57 FATAL:  could not write to statistics collector pipe: No connection could be made because the
targetmachine actively refused it. 
2007-03-08 22:40:00 PANIC:  could not write to log file 9, segment 219 at offset 15073280, length 24576: Permission
denied
2007-03-08 22:40:00 STATEMENT:  COMMIT

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
2007-03-08 22:40:00 LOG:  server process (PID 20508) was terminated by signal 3
2007-03-08 22:40:00 LOG:  terminating any other active server processes
2007-03-08 22:40:00 WARNING:  terminating connection because of crash of another server process
2007-03-08 22:40:00 DETAIL:  The postmaster has commanded this server process to roll back the current transaction and
exit,because another server process exited abnormally and possibly corrupted shared memory. 
2007-03-08 22:40:00 HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2007-03-08 22:40:00 WARNING:  terminating connection because of crash of another server process
2007-03-08 22:40:00 DETAIL:  The postmaster has commanded this server process to roll back the current transaction and
exit,because another server process exited abnormally and possibly corrupted shared memory. 
2007-03-08 22:40:00 HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2007-03-08 22:40:01 LOG:  all server processes terminated; reinitializing
2007-03-08 22:40:01 LOG:  database system was interrupted at 2007-03-08 22:36:24 W. Europe Standard Time
2007-03-08 22:40:01 LOG:  could not read from log file 9, segment 219 at offset 14876672: Permission denied
2007-03-08 22:40:01 LOG:  invalid primary checkpoint record
2007-03-08 22:40:01 LOG:  could not read from log file 9, segment 219 at offset 14721024: Permission denied
2007-03-08 22:40:01 LOG:  invalid secondary checkpoint record
2007-03-08 22:40:01 PANIC:  could not locate a valid checkpoint record

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

2007-03-08 22:40:01 LOG:  startup process (PID 20504) was terminated by signal 3
2007-03-08 22:40:01 LOG:  aborting startup due to startup process failure
2007-03-08 22:40:01 LOG:  logger shutting down

TIA


--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl



Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Magnus Hagander
Date:
On Mon, Mar 12, 2007 at 02:20:44PM +0100, Joost Kraaijeveld wrote:
> Hi,
>
> The PostgreSQL of a customer database (running on Windows 2003) crashed
> and wrote the messages below in the logfile. According to the customer
> the drives are working OK, partitions are not full and nothing has
> changed in the permissions. The customer could restart the PostgreSQL
> service manually, without resorting to a backup.

What version of PostgreSQL is this?

//Magnus

Re: PostgreSQL crashes on Windows 2003

From
Federico
Date:
On 3/12/07, Joost Kraaijeveld <J.Kraaijeveld@askesis.nl> wrote:
> Hi,
>
> The PostgreSQL of a customer database (running on Windows 2003) crashed
> and wrote the messages below in the logfile. According to the customer
> the drives are working OK, partitions are not full and nothing has
> changed in the permissions. The customer could restart the PostgreSQL
> service manually, without resorting to a backup.
>
> Could this be the result of not enough check_point segments?
SNIP!

Your log is full of "Permission denied" statements.
I suggest you to check the permissions on your data directory.

Regards
Federico

Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Joost Kraaijeveld
Date:
On Mon, 2007-03-12 at 14:39 +0100, Magnus Hagander wrote:

> What version of PostgreSQL is this?
>
Oh, forgotten: 8.1.x with no upgrade option (company policy)

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Magnus Hagander
Date:
On Mon, Mar 12, 2007 at 02:46:22PM +0100, Joost Kraaijeveld wrote:
> On Mon, 2007-03-12 at 14:39 +0100, Magnus Hagander wrote:
>
> > What version of PostgreSQL is this?
> >
> Oh, forgotten: 8.1.x with no upgrade option (company policy)

It looks to me that you may be a victim of the bug patched in
http://archives.postgresql.org/pgsql-committers/2007-01/msg00214.php.

Tom, whatever happened about a backpatch for that one? Something you
think is going to happen?

//Magnus

Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Tom Lane
Date:
Magnus Hagander <magnus@hagander.net> writes:
> It looks to me that you may be a victim of the bug patched in
> http://archives.postgresql.org/pgsql-committers/2007-01/msg00214.php.
> Tom, whatever happened about a backpatch for that one?

It's applied.
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c

            regards, tom lane

Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Joost Kraaijeveld
Date:
On Mon, 2007-03-12 at 10:13 -0400, Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
> > It looks to me that you may be a victim of the bug patched in
> > http://archives.postgresql.org/pgsql-committers/2007-01/msg00214.php.
> > Tom, whatever happened about a backpatch for that one?
>
> It's applied.
> http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c
Thanks, to which version of PostgreSQL is that patch applied? 8.1.7 and
higher ?
--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Magnus Hagander
Date:
On Mon, Mar 12, 2007 at 10:13:48AM -0400, Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
> > It looks to me that you may be a victim of the bug patched in
> > http://archives.postgresql.org/pgsql-committers/2007-01/msg00214.php.
> > Tom, whatever happened about a backpatch for that one?
>
> It's applied.
> http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c

Bah. I looked aruond but didn't find it. Clearly I'm blind. Thanks.

So - if you're not on 8.1.7 or 8.1.8, upgrade to 8.1.8 and let us know
if you still have the problem.

//Magnus

Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Joost Kraaijeveld
Date:
On Mon, 2007-03-12 at 15:37 +0100, Magnus Hagander wrote:
> On Mon, Mar 12, 2007 at 10:13:48AM -0400, Tom Lane wrote:
> > Magnus Hagander <magnus@hagander.net> writes:
> > > It looks to me that you may be a victim of the bug patched in
> > >
> http://archives.postgresql.org/pgsql-committers/2007-01/msg00214.php.
> > > Tom, whatever happened about a backpatch for that one?
> >
> > It's applied.
> >
> http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c
>
> Bah. I looked aruond but didn't find it. Clearly I'm blind. Thanks.
>
> So - if you're not on 8.1.7 or 8.1.8, upgrade to 8.1.8 and let us know
> if you still have the problem.
I wrote 8.1.x but we are actually on 8.1.8 and the problem is there (I
just checked because I am not the local system administrator).


--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Magnus Hagander
Date:
Joost Kraaijeveld wrote:
>>>> It looks to me that you may be a victim of the bug patched in
>>>>
>> http://archives.postgresql.org/pgsql-committers/2007-01/msg00214.php.
>>>> Tom, whatever happened about a backpatch for that one?
>>> It's applied.
>>>
>> http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c
>>
>> Bah. I looked aruond but didn't find it. Clearly I'm blind. Thanks.
>>
>> So - if you're not on 8.1.7 or 8.1.8, upgrade to 8.1.8 and let us know
>> if you still have the problem.
> I wrote 8.1.x but we are actually on 8.1.8 and the problem is there (I
> just checked because I am not the local system administrator).

Just in case, I'd double-check that. Check the version information on
postgres.exe (available through the right-click properties view in
Explorer). It could be that the upgrade failed.

If it's not then the next logical question is - any antivirus,
antispyware or quota software running on that machine?

//Magnus

Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Joost Kraaijeveld
Date:
Hi all,

Thanks for looking into it. The problem is solved: on both machines
there appeared to be a hung-up backup process that locked PostgreSQL.

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

Re: [GENERAL] PostgreSQL crashes on Windows 2003

From
Richard Huxton
Date:
Joost Kraaijeveld wrote:
> Hi all,
>
> Thanks for looking into it. The problem is solved: on both machines
> there appeared to be a hung-up backup process that locked PostgreSQL.

If that's a file-level backup, you'll want to exclude the PG directories
(or stop the database while the backup occurs).

--
   Richard Huxton
   Archonet Ltd