[HACKERS] Parallel Bitmap Heap Scans segfaults due to (tbm->dsa==NULL) onPostgreSQL 10 - Mailing list pgsql-hackers

From Tomas Vondra
Subject [HACKERS] Parallel Bitmap Heap Scans segfaults due to (tbm->dsa==NULL) onPostgreSQL 10
Date
Msg-id 50e89684-8ad9-dead-8767-c9545bafd3b6@2ndquadrant.com
Whole thread Raw
Responses Re: [HACKERS] Parallel Bitmap Heap Scans segfaults due to(tbm->dsa==NULL) on PostgreSQL 10
List pgsql-hackers
Hi,

It seems that Q19 from TPC-H is consistently failing with segfaults due
to calling tbm_prepare_shared_iterate() with (tbm->dsa==NULL).

I'm not very familiar with how the dsa is initialized and passed around,
but I only see the failures when the bitmap is constructed by a mix of
BitmapAnd and BitmapOr operations.

Another interesting observation is that setting force_parallel_mode=on
may not be enough - there really need to be multiple parallel workers,
which is why the simple query does cpu_tuple_cost=1.

Attached is a bunch of files:

1) details for "full" query:

* query.sql
* plan.txt
* backtrace.txt

2) details for the "minimal" query triggering the issue:

* query-minimal.sql
* plan-minimal.txt
* backtrace-minimal.txt



regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Attachment

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] Fix a typo in execReplication.c
Next
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] Parallel Bitmap Heap Scans segfaults due to(tbm->dsa==NULL) on PostgreSQL 10