Thread: More "IpcMemoryCreate: shmget failed" errors
Hello again, A couple of weeks ago I reported a problem installing both 7.0 and 7.0.2 where attempting to start "postmaster" produced an "IpcMemoryCreate: shmget failed"-type error. Tom Lane suggested I use the "ipcclean" application to remove the "old shmem segments". Running "ipcclean" with 7.0.2 gave "ipcclean: nothing removed" as the result "but postmaster" still gave the same "IpcMemoryCreate: shmget failed" error. So ... I deleted this 7.0.2 installation and decided to go back to 6.5.3. This installed, but when trying to start "postmaster" I got: ----- - - ----- IpcMemoryCreate: shmget failed (Permission denied) key=5432010, size=120, permission=700 IpcMemoryAttach: shmat failed (Permission denied) id=130 FATAL 1: AttachSLockMemory: could not attach segment ----- - - ----- So, I ran ipcclean that comes with 6.5.3 which finished with no messages, but "postmaster" still gives the "IpcMemoryCreate: shmget failed". Hence, I cannot run PostgreSQL on this system any more :( Any suggestions? Is there a way that v7 could check for these old segments from v6 and remove them? Is this even the problem here? Any other ways to clear these suspected old segments at all? Thanks for your time, -- Sean Kelly <S.Kelly@ncl.ac.uk> "The best way to predict the future is to invent it" - Alan Kay
Okay, my first question is is *what* OS are you running on? I get this sort of error under Solaris if I use a defautl install of both the OS and PostgreSQL, and have to use the -B option to reduce the number of segments that PostgreSQL wants to configure ... v6.5.3, I believe it was, changed the IPC usage so that it allocates all it needs when you start, vs growing as required, so that it pre-allocates ... so if you were using a pre-"this code" version and moving up, this might be triggering your problem ... On Fri, 16 Jun 2000, Sean Kelly wrote: > Hello again, > > A couple of weeks ago I reported a problem installing both 7.0 and > 7.0.2 where attempting to start "postmaster" produced an "IpcMemoryCreate: > shmget failed"-type error. > > Tom Lane suggested I use the "ipcclean" application to remove > the "old shmem segments". > > Running "ipcclean" with 7.0.2 gave "ipcclean: nothing removed" as > the result "but postmaster" still gave the same "IpcMemoryCreate: shmget > failed" error. > > So ... I deleted this 7.0.2 installation and decided to go back to > 6.5.3. This installed, but when trying to start "postmaster" I got: > > ----- - - ----- > IpcMemoryCreate: shmget failed (Permission denied) key=5432010, size=120, permission=700 > IpcMemoryAttach: shmat failed (Permission denied) id=130 > FATAL 1: AttachSLockMemory: could not attach segment > ----- - - ----- > > So, I ran ipcclean that comes with 6.5.3 which finished with no > messages, but "postmaster" still gives the "IpcMemoryCreate: shmget > failed". > > Hence, I cannot run PostgreSQL on this system any more :( > > Any suggestions? Is there a way that v7 could check for these old > segments from v6 and remove them? Is this even the problem here? Any > other ways to clear these suspected old segments at all? > > Thanks for your time, > > -- > Sean Kelly <S.Kelly@ncl.ac.uk> > "The best way to predict the future is to invent it" - Alan Kay > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
Sean Kelly <S.Kelly@newcastle.ac.uk> writes: > Any suggestions? Is there a way that v7 could check for these old > segments from v6 and remove them? Is this even the problem here? Any > other ways to clear these suspected old segments at all? Have you done any actual investigation --- like looked at the output of ipcs -m -a to see whether there are old segments lying around? The ipcclean script is not very bright, and in particular I doubt it knows about all the formats that different platforms' versions of ipcs produce. So it may just be failing to recognize what has to be removed. The "Permission denied" error suggests that you may be trying to run Postgres under a different userid than you were before. If so, you'll have to delete the old segments as that other user, or as root. regards, tom lane
On Fri, 16 Jun 2000, The Hermit Hacker <scrappy@hub.org> wrote: > > Okay, my first question is is *what* OS are you running on? I get this > sort of error under Solaris if I use a defautl install of both the OS and > PostgreSQL, and have to use the -B option to reduce the number of segments > that PostgreSQL wants to configure ... Sorry for not including the OS to all those who replied to me ... I guess I thought people would refer back to my original post which was submitted using the standard template :/ Apologies... I am running Linux 2.0.38 on an Intel Pentium 133Mhz. > v6.5.3, I believe it was, changed the IPC usage so that it allocates all > it needs when you start, vs growing as required, so that it pre-allocates > ... so if you were using a pre-"this code" version and moving up, this > might be triggering your problem ... The machine used to run 6.5.3. I then attempted an upgrade to 7.0.0 and started to get these "IpcMemoryCreate: shmget failed" errors. I then tried 7.0.2 and the errors continued. I then tried to revert back to 6.5.3 and got more "IpcMemoryCreate: shmget failed" errors. On Fri, 16 Jun 2000, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Have you done any actual investigation --- like looked at the output > of ipcs -m -a to see whether there are old segments lying around? I've never really messed with ipcs (and any of its family) before ... I'm just trying to upgrade the installation and am meeting problems. I am investigating the use of ipcs (and its family) on a devel machine before I move onto 'playing' with shared memory on the production box. > The ipcclean script is not very bright, and in particular I doubt it > knows about all the formats that different platforms' versions of > ipcs produce. So it may just be failing to recognize what has to be > removed. > > The "Permission denied" error suggests that you may be trying to run > Postgres under a different userid than you were before. If so, you'll > have to delete the old segments as that other user, or as root. PostgreSQL 6.5.3 ran under user postgres beforehand, and 7.0.0/7.0.2 is also being ran under user postgres. On Fri, 16 Jun 2000, Ronald Kuczek <ronald@breitenbach-it.de> wrote: > Hi ! > And your OS ? > Sorry, I did't followed your story. If you tell me, I can help you. [Covered above] Thanks to all who replied, your help is greatly appreciated. -- Sean Kelly <S.Kelly@ncl.ac.uk> "The best way to predict the future is to invent it" - Alan Kay