Re: [BUGS] Notice Deadlock detected and Backend cache invalidation initialization failed

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Trevor Astrope <astrope(at)e-corp(dot)net>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: [BUGS] Notice Deadlock detected and Backend cache invalidation initialization failed
Date: 1999-06-28 18:35:23
Message-ID: 199906281835.OAA21381@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Unprivileged user 1999-06-29 07:31:59 General Bug Report: Missing include files to compile SPI programmes
Previous Message Trevor Astrope 1999-06-28 12:12:05 Notice Deadlock detected and Backend cache invalidation initialization failed