Обсуждение: segfault during SELECT using && ANY (ARRAY[NULL]::BOX2D).
Hello.
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
thanks,
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
thanks,
best regards, mikhail.
Hi
pá 21. 6. 2019 v 9:45 odesílatel Михаил Денисов <miha.x56@gmail.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
Regards
Pavel Stehule
thanks,best regards, mikhail.