Re: hung backends stuck in spinlock heavy endless loop
Andres Freund <andres@2ndquadrant.com>
From: Andres Freund <andres@2ndquadrant.com>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>,
Peter Geoghegan <pg@heroku.com>, Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2015-01-15T19:27:34Z
Lists: pgsql-hackers
On 2015-01-15 20:15:42 +0100, Andres Freund wrote:
> > WARNING: did not find subXID 14955 in MyProc
> > CONTEXT: PL/pgSQL function cdsreconcileruntable(bigint) line 35
> > during exception cleanup
> > WARNING: you don't own a lock of type RowExclusiveLock
> > CONTEXT: PL/pgSQL function cdsreconcileruntable(bigint) line 35
> > during exception cleanup
> > LOG: could not send data to client: Broken pipe
> > CONTEXT: PL/pgSQL function cdsreconcileruntable(bigint) line 35
> > during exception cleanup
> > STATEMENT: SELECT CDSReconcileRunTable(2151)
> > WARNING: ReleaseLockIfHeld: failed??
> > CONTEXT: PL/pgSQL function cdsreconcileruntable(bigint) line 35
> > during exception cleanup
> > ERROR: failed to re-find shared proclock object
> > CONTEXT: PL/pgSQL function cdsreconcileruntable(bigint) line 35
> > during exception cleanup
> > STATEMENT: SELECT CDSReconcileRunTable(2151)
> > WARNING: AbortSubTransaction while in ABORT state
> > WARNING: did not find subXID 14955 in MyProc
> > WARNING: you don't own a lock of type AccessShareLock
> > WARNING: ReleaseLockIfHeld: failed??
> > ERROR: failed to re-find shared proclock object
> > WARNING: AbortSubTransaction while in ABORT state
> > WARNING: did not find subXID 14955 in MyProc
> > WARNING: you don't own a lock of type AccessShareLock
> > WARNING: ReleaseLockIfHeld: failed??
> > WARNING: you don't own a lock of type ShareLock
> > TRAP: FailedAssertion("!(FastPathStrongRelationLocks->count[fasthashcode]
> > > 0)", File: "lock.c", Line: 1240)
> > LOG: server process (PID 10117) was terminated by signal 6: Aborted
> > LOG: terminating any other active server processes
>
> Ick.
>
> Were there any 'LOG: Handling deadlock detected on CdsRunTableId' log
> entries before? It's hard to know from here, but the 'during exception
> cleanup' indicates a problem in abort handling. Were there any deadlock
> detected errors closeby?
Alternatively were there any 'LOG: CdsRunTableId %s Failed' messages? If
so, what was the cause?
> You're catching deadlock errors in a subtransaction. Hm.
A couple questions:
* Do you also use lock_timeout/statement_timeout? If so, what are their
settings + deadlock_timeout?
* were any processes killed at that time?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Improve hash_create's API for selecting simple-binary-key hash functions.
- 4a14f13a0abf 9.5.0 cited
-
Fix WAL-logging of B-tree "unlink halfdead page" operation.
- c73669c0e016 9.5.0 cited
-
Fix backup-block numbering in redo of b-tree split.
- c91a9b5a285e 9.4.0 cited
-
Cleanup of new b-tree page deletion code.
- 4fafc4ecd9e4 9.4.0 cited
-
Fix bug in the new B-tree incomplete-split code.
- 4a5d55ec2b71 9.4.0 cited
- 954523cdfe22 9.4.0 cited
-
Fix bug in new B-tree page deletion code.
- 77fe2b6d795f 9.4.0 cited
-
Fix rm_desc routine of b-tree page delete records.
- 7d98054f0dd1 9.4.0 cited
-
Make the handling of interrupted B-tree page splits more robust.
- 40dae7ec537c 9.4.0 cited
-
Fix race condition in B-tree page deletion.
- efada2b8e920 9.4.0 cited