Cygwin-Postgres-IpcMemoryCreate

Lists: pgsql-cygwin
From: Saravanan Bellan <SBellan(at)jareva(dot)com>
To: "'pgsql-cygwin(at)postgresql(dot)org'" <pgsql-cygwin(at)postgresql(dot)org>
Subject: Cygwin-Postgres-IpcMemoryCreate
Date: 2002-04-16 21:34:08
Message-ID: A37D6E7E941A1E498B4B98F3E4AFA92035CAE6@MAIL.design2deploy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

This was initially posted in comp.databases.postgresql.ports.cygwin.

Updates:

If using the rename() instead of link() the following error is not
experienced anymore.

> 1) FATAL 2: link from /cygdrive/C/pg/data/pg_xlog/0000000000000004 to
> /cygdrive/C/pg/data/pg_xlog/0000000000000007 (initialization of log
> file 0, segment 7) failed: Permission denied

But the following error,I think, is independent of the above one.

> DEBUG: all server processes terminated; reinitializing shared memory
> and semaphores
> IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not
> enough memory

Please the read the following initial post anyway.

Thanks,

> > Sorry about including a large section of the log file in the end.
> >
> > I'm Running Postgres 7.2.1 on W2K box, Cygwin DLL 1.3.10 with 384M
> > Memory.
> >
> > I'm pretty sure I have around 200M free memory when this error occurs.
> >
> > If I look at the sequence of actions in the log,
> >
> > 1) FATAL 2: link from /cygdrive/C/pg/data/pg_xlog/0000000000000004 to
> > /cygdrive/C/pg/data/pg_xlog/0000000000000007 (initialization of log
> > file 0, segment 7) failed: Permission denied
> > 2) One child process exits
> > 3) SIGQUIT is sent to the other processes.
> > 4) All the other children die
> > 5) Reinitialize processes (all server processes terminated;
> > reinitializing shared memory and semaphores)
> > 6) Then the error reads, IpcMemoryCreate: shmget(key=5432001,
> > size=1441792, 03600) failed: Not enough memory
> >
> >
> > Please help.
> >
> >
> > The actual log file section is below.
> >
> >
> >
> > FATAL 2: link from /cygdrive/C/pg/data/pg_xlog/0000000000000004 to
> > /cygdrive/C/pg/data/pg_xlog/0000000000000007 (initialization of log
> > file 0, segment 7) failed: Permission denied
> > ...
> > ...
> > ...
> > ...
> > ....
> > ...
> > DEBUG: reaping dead processes
> > DEBUG: child process (pid 488) exited with exit code 2
> > DEBUG: server process (pid 488) exited with exit code 2
> > DEBUG: terminating any other active server processes
> > DEBUG: CleanupProc: sending SIGQUIT to process 320
> > DEBUG: CleanupProc: sending SIGQUIT to process 2920
> > DEBUG: CleanupProc: sending SIGQUIT to process 1996
> > DEBUG: CleanupProc: sending SIGQUIT to process 2940
> > NOTICE: Message from PostgreSQL backend:
> > The Postmaster has informed me that some other backend
> > died abnormally and possibly corrupted shared memory.
> > I have rolled back the current transaction and am
> > going to terminate your database system connection and exit.
> > Please reconnect to the database system and repeat your query.
> > DEBUG: StartTransactionCommand
> > DEBUG: CommitTransactionCommand
> > DEBUG: StartTransactionCommand
> > DEBUG: CommitTransactionCommand
> > DEBUG: StartTransactionCommand
> > DEBUG: CommitTransactionCommand
> > DEBUG: StartTransactionCommand
> > DEBUG: CommitTransactionCommand
> > NOTICE: Message from PostgreSQL backend:
> > The Postmaster has informed me that some other backend
> > died abnormally and possibly corrupted shared memory.
> > I have rolled back the current transaction and am
> > going to terminate your database system connection and exit.
> > Please reconnect to the database system and repeat your query.
> > NOTICE: Message from PostgreSQL backend:
> > The Postmaster has informed me that some other backend
> > died abnormally and possibly corrupted shared memory.
> > I have rolled back the current transaction and am
> > going to terminate your database system connection and exit.
> > Please reconnect to the database system and repeat your query.
> > NOTICE: Message from PostgreSQL backend:
> > The Postmaster has informed me that some other backend
> > died abnormally and possibly corrupted shared memory.
> > I have rolled back the current transaction and am
> > going to terminate your database system connection and exit.
> > Please reconnect to the database system and repeat your query.
> > DEBUG: reaping dead processes
> > DEBUG: child process (pid 320) exited with exit code 1
> > DEBUG: reaping dead processes
> > DEBUG: child process (pid 2920) exited with exit code 1
> > DEBUG: child process (pid 1996) exited with exit code 1
> > DEBUG: reaping dead processes
> > DEBUG: reaping dead processes
> > DEBUG: child process (pid 2940) exited with exit code 1
> > DEBUG: all server processes terminated; reinitializing shared memory
> > and semaphores
> > IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not
> > enough memory
> >
> > This error usually means that PostgreSQL's request for a shared
> > memory segment exceeded available memory or swap space.
> > To reduce the request size (currently 1441792 bytes), reduce
> > PostgreSQL's shared_buffers parameter (currently 64) and/or
> > its max_connections parameter (currently 32).
> >
> > The PostgreSQL Administrator's Guide contains more information about
> > shared memory configuration.


From: Jason Tishler <jason(at)tishler(dot)net>
To: Saravanan Bellan <SBellan(at)jareva(dot)com>
Cc: "'pgsql-cygwin(at)postgresql(dot)org'" <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: Cygwin-Postgres-IpcMemoryCreate
Date: 2002-04-17 20:48:16
Message-ID: 20020417204816.GA1800@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

On Tue, Apr 16, 2002 at 02:34:08PM -0700, Saravanan Bellan wrote:
> This was initially posted in comp.databases.postgresql.ports.cygwin.
>
> Updates:
>
> If using the rename() instead of link() the following error is not
> experienced anymore.
>
> > 1) FATAL 2: link from /cygdrive/C/pg/data/pg_xlog/0000000000000004 to
> > /cygdrive/C/pg/data/pg_xlog/0000000000000007 (initialization of log
> > file 0, segment 7) failed: Permission denied

Please post your patch for the above, so we know precisely what change
you needed to make to solve your problem. If the patch looks good,
then the next step would be to post it to pgsql-patches for consideration.

Note, however, that I have never seen an error message like the above.
What is your system info?

Cygwin version
cygipc version
Windows version
CYGWIN environment variable setting
filesystem type (i.e., NTFS, FAT, etc.)

> But the following error,I think, is independent of the above one.
>
> > DEBUG: all server processes terminated; reinitializing shared memory
> > and semaphores
> > IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not
> > enough memory

I have seen the above error message when the permissions of the following
files were incorrect:

/tmp/cygipc*
/tmp/MultiFile*

Try removing them to see if this is your problem.

> Please the read the following initial post anyway.
>
> [snip]

BTW, I just built and tested PostgreSQL 7.2.1 under Cygwin 1.3.10. make
installcheck passed all tests.

Jason