Re: [BUGS] Notice Deadlock detected and Backend cache invalidation initialization failed - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: [BUGS] Notice Deadlock detected and Backend cache invalidation initialization failed
Date
Msg-id 199906281835.OAA21381@candle.pha.pa.us
Whole thread Raw
In response to Notice Deadlock detected and Backend cache invalidation initialization failed  (Trevor Astrope <astrope@e-corp.net>)
List pgsql-bugs
> Hello,
>
> We're using postgresql 6.4.2 on red hat linux 6.0, kernel 2.2.10 with dbi
> 1.09 and DBD-Pg 0.91 for web database connectivity. We are occasionally
> experiencing deadlocks that are logged to the apache logs as follows:
>
> NOTICE:  Deadlock detected -- See the lock(l) manual page for a possible
> cause.
> NOTICE:  Deadlock detected -- See the lock(l) manual page for a possible
> cause.
> DBD::Pg::st execute failed: ERROR:  WaitOnLock: error on wakeup - Aborting
> this transaction
> Database handle destroyed without explicit disconnect.
> Database handle destroyed without explicit disconnect.
>
> However, on Friday, we experienced a much more sivere problem where
> shortly after the Deadlock errors, the following occured:
>
> NOTICE:  SIAssignBackendId: discarding tag 2147474428
> DBI->connect failed: FATAL 1:  Backend cache invalidation initialization
> failed
>  at /home/sitesell/cgi-bin/Database_Interaction//database_func.pl line 727
>
> After this, none of the scripts would execute and generated 500 server
> errors. When I tried to restart postgresql, I got the following error:
>
> Starting postgresql service: IpcMemoryCreate: shmget failed (Identifier
> removed) key=5432010, size=24588, permission=700
> IpcMemoryIdGet: shmget failed (Identifier removed) key=5432010,
> size=24588, permission=0
> IpcMemoryAttach: shmat failed (Invalid argument) id=-2
> FATAL 1:  AttachSLockMemory: could not attach segment
> postmaster []

My guess is that your shared memory is still allocated to the crashed
backends.  I recommend using pgsql/bin/ipcclean to clear out your shared
memory and restart.

As far as the deadlocks, if the lock manual pages doesn't help show the
cause, I recommend upgrading to 6.5, where we have new locking code.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-bugs by date:

Previous
From: Trevor Astrope
Date:
Subject: Notice Deadlock detected and Backend cache invalidation initialization failed
Next
From: Unprivileged user
Date:
Subject: General Bug Report: Missing include files to compile SPI programmes