pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Lock pileup stuck processes
2+ messages / 2 participants
[nested] [flat]

* Lock pileup stuck processes
@ 2016-04-13 22:59 Josh berkus <josh@agliodbs.com>
  2016-04-13 23:06 ` Re: Lock pileup stuck processes Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Josh berkus @ 2016-04-13 22:59 UTC (permalink / raw)
  To: pgsql-bugs

Folks,

This is a "hard to reproduce" bug, so is being submitted to this list in
order to accumulate evidence for eventual debugging when there are
enough reports to figure something out.  Since I've seen this on two
different user applications now, I think it relates to some kind of
persistent issue either in Postgres or in the OS.

Summary: in some cases, "lock pileups" fail to resolve completely, and
one or more orphan backends are left in permanent lock-waiting state.

Versions observed: 9.2.14, 9.2.15, 9.3.5

Platforms: RHEL6, Fedora

Observations:

1. A long-running transaction grabs one or more row locks.

2. Various queries, especially SELECT FOR UPDATE queries, pile up behind
this lock request.

3. At peak, 30 or more backends are waiting for locks in a dependency
chain.  System load is high.

4. Original transaction ends.

5. Over 10 minutes most of the waiting backends complete their work and
release.

6. 1 to 3 backends never come out of active/waiting state, remaining
that way indefinitely.

My attempts to reproduce this issue under synthetic circumstances have
not been successful.  strace of the stuck backends shows no activity.

-- 
--
Josh Berkus
Red Hat OSAS
(any opinions are my own)


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Lock pileup stuck processes
  2016-04-13 22:59 Lock pileup stuck processes Josh berkus <josh@agliodbs.com>
@ 2016-04-13 23:06 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-04-13 23:06 UTC (permalink / raw)
  To: Josh berkus <josh@agliodbs.com>; +Cc: pgsql-bugs

Josh berkus <josh@agliodbs.com> writes:
> Summary: in some cases, "lock pileups" fail to resolve completely, and
> one or more orphan backends are left in permanent lock-waiting state.
> ...
> My attempts to reproduce this issue under synthetic circumstances have
> not been successful.  strace of the stuck backends shows no activity.

Please see if you can get a stack trace from a stuck backend.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-04-13 23:06 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 22:59 Lock pileup stuck processes Josh berkus <josh@agliodbs.com>
2016-04-13 23:06 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox