Re: BUG #14973: hung queries - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: BUG #14973: hung queries
Date
Msg-id CAEepm=0tc6X=5pR2koSk3i7qd7jdEnZ6VBD1BckVOr2ynUXGPA@mail.gmail.com
Whole thread Raw
In response to BUG #14973: hung queries  (skaurus@gmail.com)
Responses Re: BUG #14973: hung queries  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-bugs
On Fri, Dec 15, 2017 at 1:31 AM,  <skaurus@gmail.com> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      14973
> Logged by:          Dmitry Shalashov
> Email address:      skaurus@gmail.com
> PostgreSQL version: 10.1
> Operating system:   Debian 9
> Description:
>
> We stumbled upon queries running for a day or more. They are simple ones, so
> that should not be happening. And most of the time it don't - very small
> share of these queries ends up like this.
>
> Moreover, these queries couldn't be stopped.
>
> pg_stat_activity says that they all have wait_event_type = IPC, wait_event =
> BtreePage, state = active
>
> strace tells that they all inside epoll_wait syscall
>
> grep over ps says that they all are "postgres: bgworker: parallel worker for
> PID ..."
>
> Looks like some bug in parallel seq scan maybe?
>
> We are going to disable parallel seq scan and restart our server in like 4
> hours from now. I can get more debug if asked before that.

Hello Dmitry,

Thank you for the report.  It sounds like a known bug in 10.0 and 10.1
that was recently fixed:

https://www.postgresql.org/message-id/E1ePESn-0005PV-S9%40gemulon.postgresql.org

The problem is in Parallel Index Scan for btree.  The fix will be in
10.2.  One workaround in the meantime would be to disable parallelism
for that query (SET max_parallel_workers_per_gather = 0).

-- 
Thomas Munro
http://www.enterprisedb.com


pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: BUG #14940: Duplicated records inspite of primary key and unique constraint
Next
From: Thomas Munro
Date:
Subject: Re: BUG #14973: hung queries