Thread: BUG #1451: FATAL: could not reattach to shared memory

BUG #1451: FATAL: could not reattach to shared memory

From
"Kim Hansen"
Date:
The following bug has been logged online:

Bug reference:      1451
Logged by:          Kim Hansen
Email address:      k@oek.dk
PostgreSQL version: 8.0.0 (MSI)
Operating system:   MS Windows XP Pro
Description:        FATAL:  could not reattach to shared memory
Details:

postmaster.exe did something wrong when it started and because of that it
didn't accept any logins, it used more than 100MB RAM (of 512MB) and it use
100% cpu.

The logfiles were filled very fast, 10 MB where genereated every 22 minutes.
I have attached the first 150 lines of the first logfile created when the
server started to the end of this bug report.

The server stopped without problems when I used the 'Stop Service' program.
I tried to reproduce the problem by stopping and starting the server 5
times, but it didn't reappear.

I hope you can use this bug report.
Regards,
Kim Hansen


===== The first lines of the logfile:
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:21 LOG:  background writer process (PID 2544) exited with
exit code 0
2005-01-30 12:46:21 LOG:  terminating any other active server processes
2005-01-30 12:46:21 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:22 LOG:  background writer process (PID 2752) exited with
exit code 0
2005-01-30 12:46:22 LOG:  terminating any other active server processes
2005-01-30 12:46:22 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:22 LOG:  background writer process (PID 2860) exited with
exit code 0
2005-01-30 12:46:22 LOG:  terminating any other active server processes
2005-01-30 12:46:22 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:22 LOG:  background writer process (PID 2884) exited with
exit code 0
2005-01-30 12:46:22 LOG:  terminating any other active server processes
2005-01-30 12:46:22 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:22 LOG:  background writer process (PID 2908) exited with
exit code 0
2005-01-30 12:46:22 LOG:  terminating any other active server processes
2005-01-30 12:46:22 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:22 LOG:  background writer process (PID 2932) exited with
exit code 0
2005-01-30 12:46:22 LOG:  terminating any other active server processes
2005-01-30 12:46:22 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:22 LOG:  background writer process (PID 2988) exited with
exit code 0
2005-01-30 12:46:22 LOG:  terminating any other active server processes
2005-01-30 12:46:22 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:22 LOG:  background writer process (PID 3012) exited with
exit code 0
2005-01-30 12:46:22 LOG:  terminating any other active server processes
2005-01-30 12:46:22 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:22 LOG:  background writer process (PID 3084) exited with
exit code 0
2005-01-30 12:46:22 LOG:  terminating any other active server processes
2005-01-30 12:46:22 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:22 LOG:  background writer process (PID 3140) exited with
exit code 0
2005-01-30 12:46:22 LOG:  terminating any other active server processes
2005-01-30 12:46:22 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3164) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3188) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3212) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3236) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3260) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3284) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3308) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3332) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3356) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3380) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3404) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3428) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3452) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3476) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3500) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3524) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3548) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3572) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:23 LOG:  background writer process (PID 3612) exited with
exit code 0
2005-01-30 12:46:23 LOG:  terminating any other active server processes
2005-01-30 12:46:23 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:24 LOG:  background writer process (PID 3668) exited with
exit code 0
2005-01-30 12:46:24 LOG:  terminating any other active server processes
2005-01-30 12:46:24 LOG:  all server processes terminated; reinitializing
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
FATAL:  could not reattach to shared memory (key=5432001, addr=012F0000):
Invalid argument
2005-01-30 12:46:24 LOG:  background writer process (PID 3692) exited with
exit code 0
2005-01-30 12:46:24 LOG:  terminating any other active server processes
2005-01-30 12:46:24 LOG:  all server processes terminated; reinitializing