Skip site navigation (1) Skip section navigation (2)

Re: BUG #2881: FATAL: could not reattach to shared memory (Win32)

From: "Jarl Petter Kvalsvik" <jpk(at)nera(dot)no>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2881: FATAL: could not reattach to shared memory (Win32)
Date: 2007-09-18 05:56:14
Message-ID: fcnp9v$1lnf$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Sorry, I dont know how to post a reply to archived messages.

I have also experienced this error-situation that cause PostgreSQL to shut 
down.

Installation details:

PostgreSQL version 8.2.4-1
OS: Windows 2003 server Service Pack 2
CPU: Quad 1.86 GHz Intel Xeon
Memory: 2048 MB
Disk: 1 partioned into C - 12 GB/NT-FS and D - 56 GB/NT-FS -
No anti-virus software

The PostgreSQL installation was quite fresh (3-4 days old) when the incident 
happened.

Windows Event log show the following Error-message at the time of the 
incident:

FATAL: could not reattach to shared memory (key=5432001, addr=1C010000): No 
such file or directory

The PostgreSQL log shows:

2007-09-15 22:14:11 ERROR:  could not write block 26 of relation 
16403/16404/16520: Permission denied
2007-09-15 22:14:11 CONTEXT:  writing block 26 of relation 16403/16404/16520
2007-09-15 22:14:35 PANIC:  could not write to log file 0, segment 126 at 
offset 15327232, length 8192: Permission denied
2007-09-15 22:14:35 STATEMENT:  PREPARE TRANSACTION 
'257_Tk1TNi8yMTkyNjU4NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==_MQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=='
This application has requested the Runtime to terminate it in an unusual 
way.
Please contact the application's support team for more information.
2007-09-15 22:14:35 LOG:  server process (PID 2348) exited with exit code 3
2007-09-15 22:14:35 LOG:  terminating any other active server processes
2007-09-15 22:14:35 WARNING:  terminating connection because of crash of 
another server process
2007-09-15 22:14:35 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-09-15 22:14:35 HINT:  In a moment you should be able to reconnect to 
the database and repeat your command.


In the Error-log statement just prior to the Panic-message there is a 
reference to a relation which PostgreSQL claims it does not have permission 
to write to. I have checked the permissions and discovered something that 
might be of interest and possibly related to this problem.

I have installed PostgreSQL in standard location C:\program 
files\postgresql\8.2. Then I created a new tablespace on the D-partition on 
which I have created a database and the only schema that is in use. I have 
noticed that PostgreSQL has created a NT-FS JUNCTION in C:\Program 
Files\PostgreSQL\8.2\data\pg_tblspc that points to the location I chose for 
the new tablespace.

When I use Windows Explorer to open properties on this Junction and then 
select the Security tab, I get the following Warning-message:

The permissions on 16403 are incorrectly ordered, which may cause some 
entries to be ineffective. Press OK to continue and sort the permissions 
correctly, or Cancel to reset the permissions.


--Jarl





pgsql-bugs by date

Next:From: Martin PittDate: 2007-09-18 06:00:58
Subject: Re: psql CLI: warn about ongoing transaction on exit
Previous:From: Tom LaneDate: 2007-09-18 03:51:50
Subject: Re: psql CLI: warn about ongoing transaction on exit

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group