From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: erik@nib4.nl
Subject: BUG #17926: Segfault in SELECT
Date: Mon, 08 May 2023 20:12:41 +0000
Message-ID: <17926-2967cc7019697fbe@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17926
Logged by: Erik Oomen
Email address: erik@nib4.nl
PostgreSQL version: 15.2
Operating system: Debian11 bullseye arm64
Description:
We are facing an issue where a SELECT can cause a segfault, unfortunately
the backtrace is not useful:
Reading symbols from /lib/aarch64-linux-gnu/libffi.so.7...
Reading symbols from
/root/.cache/debuginfod_client/b07109d62d007af8c6bffe3d76561e03711a1a6c/debuginfo...
0x0000ffff88d1311c in __GI_epoll_pwait (epfd=4, events=0xaaab109dd330,
maxevents=1, timeout=timeout@entry=-1, set=set@entry=0x0) at
../sysdeps/unix/sysv/linux/epoll_pwait.c:42
Download failed: Invalid argument. Continuing without source file
./misc/../sysdeps/unix/sysv/linux/epoll_pwait.c.
42 ../sysdeps/unix/sysv/linux/epoll_pwait.c: No such file or directory.
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00010000017fedec in ?? ()
(gdb) bt
#0 0x00010000017fedec in ?? ()
#1 0x0000ffff017febd0 in ?? ()
#2 0x0000aaab10af7fa8 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
The query uses a 3 partitions of a table where all fields have an brin
index.
This query will segfault:
SELECT count(*)
FROM dw
WHERE (dw.ts >= '2022-09-01' AND dw.ts <= '2022-10-30')
AND dw.source='type3' AND dw.customer='123.456';
The query should return 0 because the customer does not exist.
Removing the dw.customer or dw.source constraint will make the segfault not
occur.
Also using 'set enable_bitmapscan to off' will not trigger the segfault.
Details:
PostgreSQL 15.2 (Debian 15.2-1.pgdg110+1) on aarch64-unknown-linux-gnu,
compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, erik@nib4.nl
Subject: Re: BUG #17926: Segfault in SELECT
In-Reply-To: <17926-2967cc7019697fbe@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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