Search Postgresql Archives

pre-existing shared memory block is still in use after crashes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Yesterday I ran into two backend crashes and then an autovacuum launcher process crash. The autovacuum log was:
LOG:  database system is ready to accept connections
LOG: autovacuum launcher process (PID 3788) was terminated by exception 0xC0000142 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
FATAL:  pre-existing shared memory block is still in use
HINT: Check if there are any old server processes still running, and terminate them.


The others both looked like this:
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
LOG:  incomplete startup packet
LOG:  server process (PID 1384) was terminated by exception 0xC0000142
HINT: See C include file "ntstatus.h" for a description of the hexadecimal value.
LOG:  terminating any other active server processes
WARNING:  terminating connection because of crash of another server process
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. HINT: In a moment you should be able to reconnect to the database and repeat your command.
WARNING:  terminating connection because of crash of another server process
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. HINT: In a moment you should be able to reconnect to the database and repeat your command.
WARNING:  terminating connection because of crash of another server process
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. HINT: In a moment you should be able to reconnect to the database and repeat your command.
LOG:  all server processes terminated; reinitializing
FATAL:  pre-existing shared memory block is still in use
HINT: Check if there are any old server processes still running, and terminate them.


The version is 8.4.2-1. This is a fairly clean windows XP SP3 machine without any antivirus software.

The machine was running two separate postmasters using the same installation and they had both been chugging along for a while. A third unrelated non-postgres job started that turned out to be a memory hog. The two "server processes" crashed within 5 minutes of one another, possibly at the very same time. The autovacuum crash happened shortly thereafter on a brand new postmaster during startup.

We believe the machine was under memory pressure and that's what caused this problem (i.e., windows couldn't load the dlls because it didn't have memory). It looks like postgres is already trying to do something not-completely-fatal, but fails to restart because of this "pre-existing shared memory block is still in use" error? Any idea what's going on there? I know sometimes windows takes a little extra time to acknowledge that a resource has been released, so it wouldn't surprise me if sleeping a little and trying again worked. I know for a fact this approach is often necessary on the file system (if you call CreateFile/CloseHandle and DeleteFile in rapid succession on the same name, some failures can arise).

- Dave



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux