pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15749: ERROR:  dsa_area could not attach to segment | FATAL: cannot unpin a segment that is not pinned
2+ messages / 2 participants
[nested] [flat]

* BUG #15749: ERROR:  dsa_area could not attach to segment | FATAL: cannot unpin a segment that is not pinned
@ 2019-04-12 13:38 PG Bug reporting form <noreply@postgresql.org>
  2019-04-12 13:44 ` Re: BUG #15749: ERROR:  dsa_area could not attach to segment | FATAL: cannot unpin a segment that is not pinned Sergei Kornilov <sk@zsrv.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2019-04-12 13:38 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: torrey@interactiveshift.com

The following bug has been logged on the website:

Bug reference:      15749
Logged by:          Torrey Johnson
Email address:      torrey@interactiveshift.com
PostgreSQL version: 11.2
Operating system:   Linux Ubuntu 16.04
Description:        

Hi there, after upgrading our postgres version from 10.5 to 11.2, we noticed
that our parallel query was causing DynamicSharedMemoryControlLock on our
queries, and locking everything up, causing our connections to expand and
ending up killing our database. I found this thread, and it's pretty much
the exact same thing:
https://www.postgresql.org/message-id/flat/458c691a-1b2d-7a70-1c04-58361b894011%40gmail.com#bab0f00f...

I've disabled 'max_parallel_workers_per_gather = 0', and it hasn't happened
since. These were the settings when this started to happening
max_parallel_workers_per_gather = 4
max_worker_processes = 8
max_parallel_workers = 8

Here's the errors from my postgres logs after seeing
DynamicSharedMemoryControlLock fill up in 'pg_stat_activity':
2019-03-28 22:24:32.728 EDT [24283] ignite@ignite_production ERROR: 
dsa_area could not attach to segment
2019-03-28 22:24:32.728 EDT [24283] ignite@ignite_production STATEMENT: 
SELECT  "team_activity_views".* FROM "team_activity_views" WHERE
"team_activity_views"."team_id" = $1 LIMIT $2
2019-03-28 22:24:32.728 EDT [63006] FATAL:  terminating connection due to
administrator command
2019-03-28 22:24:32.728 EDT [63006] STATEMENT:  SELECT 
"team_activity_views".* FROM "team_activity_views" WHERE
"team_activity_views"."team_id" = $1 LIMIT $2
2019-03-28 22:24:32.728 EDT [63005] FATAL:  terminating connection due to
administrator command
2019-03-28 22:24:32.728 EDT [63005] STATEMENT:  SELECT 
"team_activity_views".* FROM "team_activity_views" WHERE
"team_activity_views"."team_id" = $1 LIMIT $2
2019-03-28 22:24:32.729 EDT [63005] FATAL:  cannot unpin a segment that is
not pinned
2019-03-28 22:24:32.730 EDT [1110] LOG:  background worker "parallel worker"
(PID 63006) exited with exit code 1

Any help or update on this would be great. I would love to turn this option
back on. Thanks



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

* Re: BUG #15749: ERROR:  dsa_area could not attach to segment | FATAL: cannot unpin a segment that is not pinned
  2019-04-12 13:38 BUG #15749: ERROR:  dsa_area could not attach to segment | FATAL: cannot unpin a segment that is not pinned PG Bug reporting form <noreply@postgresql.org>
@ 2019-04-12 13:44 ` Sergei Kornilov <sk@zsrv.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Sergei Kornilov @ 2019-04-12 13:44 UTC (permalink / raw)
  To: torrey@interactiveshift.com <torrey@interactiveshift.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

Hello

This bug should be already fixed in stable branch and will be shipped in next minor release. Until the fix is released, the simplest workaround is to disable parallel query with SET max_parallel_workers_per_gather = 0 if you're affected by the bug.
It's a rare timing bug, but some workloads seem to be more prone to it, so unfortunately it went undetected for a long time.

If you're interested, related discussion and patch was here: https://www.postgresql.org/message-id/flat/20190207014719.GJ29720%40telsasoft.com

regards, Sergei





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


end of thread, other threads:[~2019-04-12 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12 13:38 BUG #15749: ERROR:  dsa_area could not attach to segment | FATAL: cannot unpin a segment that is not pinned PG Bug reporting form <noreply@postgresql.org>
2019-04-12 13:44 ` Sergei Kornilov <sk@zsrv.org>

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