Обсуждение: ...

Поиск
Список
Период
Сортировка

...

От
Ms swati chande
Дата:
Hi,
 
I am getting the following error while processing a query.
 
"server process <PID 2236> was terminated by exception xc0000005"
 
Please help me resolve this.
 
Regards
Swati

Re:

От
Tom Lane
Дата:
Ms swati chande <swativc@yahoo.com> writes:
> I am getting the following error while processing a query.
> "server process <PID 2236> was terminated by exception xc0000005"

What query, exactly?  Which PG version is this?

            regards, tom lane

Re:

От
Ms swati chande
Дата:

>What query, exactly?  Which PG version is this?
>            regards, tom lane
Its a query involving 15 relations, processing not more than 500 records. The query is written in a .sql file and the file is executed as
 
\i initq.sql
 
Infact, know no .sql file is getting executed. All my .sqls have >=15 records.
 
The error message is:
psql: initq.sql:64: server closed the connection unexpectedly
            This probably means the server terminated abnormally
            before or while processing the request.
psql: initq.sql:64: connection to server was lost
 
and the logfile shows:
 

LOG:  server process (PID 3304) was terminated by exception 0xC0000005

HINT:  See C include file "ntstatus.h" for a description of the hexadecimal value.

LOG:  terminating any other active server processes

LOG:  all server processes terminated; reinitializing

LOG:  database system was interrupted; last known up at 2009-09-24 18:01:00 IST

LOG:  database system was not properly shut down; automatic recovery in progress

LOG:  record with zero length at 0/1A71AE0

LOG:  redo is not required

LOG:  database system is ready to accept connections

LOG:  autovacuum launcher started

 

The execution for this and other queries has been fine so far.

What is exception 0xC0000005?

I am working on Windows XP.

Have built version 8.4.0 from source using Visual Studio 2005.

 

Thanks and Regards

Swati


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

Re:

От
Craig Ringer
Дата:
On Thu, 2009-09-24 at 07:33 -0700, Ms swati chande wrote:


>         LOG:  server process (PID 3304) was terminated by exception
>         0xC0000005
>
>         The execution for this and other queries has been fine so
>         far.
>
>         What is exception 0xC0000005?

0xC0000005 is an "access violation". It means the program tried to
access memory it's not allowed to - usually memory it hasn't allocated
or a null pointer.

If you're willing to do some work you can find out exactly where it's
crashing by collecting some information about the crash. I wrote up some
instructions on this a while ago:

http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Windows

>         I am working on Windows XP.
>
>         Have built version 8.4.0 from source using Visual Studio
>         2005.

... in which case you should be able to easily use the Visual Studio
debugger to get a backtrace of the crash, as per the instructions:


http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Windows#Debugging_using_Microsoft_Visual_Studio_Express_Edition

(Ignore that the instructions refer to the 2009 express edition; it
makes no difference here).

Given that you've built Pg yourself, have you made sure you've installed
all the libraries you link to in the Pg program directory? Are you sure
Pg is running linked to the right DLLs for zlib, iconv, etc, not
different ones that happened to be on your PATH? You can check this
using Dependency Walker (depends.exe) from
http://dependencywalker.com/ , or by looking at the DLL linkage list
using Process Explorer from Sysinternals.

--
Craig Ringer