Re: segfault during SELECT using && ANY (ARRAY[NULL]::BOX2D).

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Михаил Денисов <miha(dot)x56(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: segfault during SELECT using && ANY (ARRAY[NULL]::BOX2D).
Date: 2019-06-21 08:43:57
Message-ID: CAFj8pRAmz--ZY26onbG8Y7sXZ9q7SC_cnOMAk3pns7+Sc=cUWA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi

pá 21. 6. 2019 v 9:45 odesílatel Михаил Денисов <miha(dot)x56(at)gmail(dot)com> napsal:

> Hello.
>
> i faced with pg crashing in case of use ANY && statement with array with
> single null element for field of type BOX2D.
>
> for tests i use postgres+postgis 'as-is' without any tuning after
> installation by command:
> apt-get install postgresql-9.5 postgresql-9.5-postgis-2.2
> (also this error reproduced on production server with pg v11)
>
> error is stable reproduced by following commands:
>
> CREATE DATABASE test_pgcrash;
> CREATE EXTENSION postgis;
> CREATE TABLE pgcrash (box BOX2D);
> INSERT INTO pgcrash (box) values ('BOX(0 0, 1 1)');
> SELECT * FROM pgcrash WHERE box && ANY(ARRAY[NULL]::BOX2D[]);
>
> and in postgresql log i see:
>
> 2019-06-21 12:45:30 +07 [2268-2] LOG: server process (PID 2311) was
> terminated by signal 11: Segmentation fault
> 2019-06-21 12:45:30 +07 [2268-3] DETAIL: Failed process was running:
> CREATE EXTENSION postgis;
> CREATE TABLE pgcrash (box BOX2D);
> INSERT INTO pgcrash (box) values ('BOX(0 0, 1 1)');
> SELECT * FROM pgcrash WHERE box && ANY(ARRAY[NULL]::BOX2D[]);
> 2019-06-21 12:45:30 +07 [2268-4] LOG: terminating any other active server
> processes
> 2019-06-21 12:45:30 +07 [2275-2] WARNING: terminating connection because
> of crash of another server process
>

this is PostGIS bug. Please, report it there

https://postgis.net/docs/manual-1.5/ch09.html

Regards

Pavel Stehule

>
> thanks,
> best regards, mikhail.
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrey Borodin 2019-06-21 10:22:15 Re: Logging corruption error codes
Previous Message Pavan Deolasee 2019-06-21 06:37:54 Re: BUG #15724: Can't create foreign table as partition