Opened 8 months ago

Closed 8 months ago

#5701 closed defect (fixed)

topology crashing under PG17

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS PostgreSQL
Component: topology Version: master
Keywords: Cc:

Description

This is only failing on debbie so I assume it's PG17 cause that's the first one to run for master branch. GHA I assume doesn't have a new enough PG17 to catch this.

Looks like it started failing yesterday.

01:44:41  failed (psql exited with an error: /var/lib/jenkins/workspace/postgis/tmp/3_5_pg17w64/test_201_out)
01:44:41 -----------------------------------------------------------------------------
01:44:41 Topology-Geometry 'sqlmm_topology' (id:x) created.
01:44:41 -- ST_AddIsoNode ------------------------
01:44:41 psql:sqlmm.sql:16: ERROR:  SQL/MM Spatial exception - null argument
01:44:41 psql:sqlmm.sql:17: ERROR:  SQL/MM Spatial exception - null argument
01:44:41 psql:sqlmm.sql:18: ERROR:  SQL/MM Spatial exception - null argument
01:44:41 1
01:44:41 2
01:44:41 3
01:44:41 4
01:44:41 5
01:44:41 6
01:44:41 psql:sqlmm.sql:29: ERROR:  SQL/MM Spatial exception - coincident node
01:44:41 psql:sqlmm.sql:30: ERROR:  SQL/MM Spatial exception - coincident node
01:44:41 7
01:44:41 8
01:44:41 psql:sqlmm.sql:37: ERROR:  SQL/MM Spatial exception - not within face
01:44:41 psql:sqlmm.sql:40: ERROR:  SQL/MM Spatial exception - invalid point
01:44:41 psql:sqlmm.sql:43: ERROR:  SQL/MM Spatial exception - coincident node
01:44:41 psql:sqlmm.sql:44: ERROR:  SQL/MM Spatial exception - coincident node
01:44:41 psql:sqlmm.sql:45: ERROR:  SQL/MM Spatial exception - coincident node
01:44:41 -- ST_AddIsoEdge ------------------------
01:44:41 psql:sqlmm.sql:56: ERROR:  SQL/MM Spatial exception - null argument
01:44:41 psql:sqlmm.sql:57: ERROR:  SQL/MM Spatial exception - null argument
01:44:41 psql:sqlmm.sql:58: ERROR:  SQL/MM Spatial exception - null argument
01:44:41 psql:sqlmm.sql:59: ERROR:  SQL/MM Spatial exception - null argument
01:44:41 psql:sqlmm.sql:62: ERROR:  SQL/MM Spatial exception - invalid curve
01:44:41 psql:sqlmm.sql:65: ERROR:  SQL/MM Spatial exception - curve not simple
01:44:41 psql:sqlmm.sql:68: ERROR:  SQL/MM Spatial exception - non-existent node
01:44:41 psql:sqlmm.sql:71: ERROR:  SQL/MM Spatial exception - end node not geometry end point.
01:44:41 psql:sqlmm.sql:72: ERROR:  SQL/MM Spatial exception - start node not geometry start point.
01:44:41 psql:sqlmm.sql:75: ERROR:  SQL/MM Spatial exception - geometry crosses a node
01:44:41 1
01:44:41 2
01:44:41 psql:sqlmm.sql:82: ERROR:  SQL/MM Spatial exception - not isolated node
01:44:41 psql:sqlmm.sql:83: ERROR:  SQL/MM Spatial exception - not isolated node
01:44:41 psql:sqlmm.sql:86: ERROR:  SQL/MM Spatial exception - not isolated node
01:44:41 -- ST_AddIsoNode(2) ------------------------
01:44:41 psql:sqlmm.sql:97: ERROR:  SQL/MM Spatial exception - edge crosses node.
01:44:41 -- ST_RemoveIsoEdge ---------------------
01:44:41 psql:sqlmm.sql:111: server closed the connection unexpectedly
01:44:41 	This probably means the server terminated abnormally
01:44:41 	before or while processing the request.
01:44:41 psql:sqlmm.sql:111: error: connection to server was lost
01:44:41 -----------------------------------------------------------------------------
01:44:41 make: *** [regress/runtest.mk:24: check-regress] Error 2
01:44:41 Build step 'Execute shell' marked build as failure
01:44:41 [Gitea] do not publish assets due to build being non-Successfully
01:44:41 Triggering a new build of PostgreSQL stop
01:44:41 Finished: FAILURE

Change History (5)

comment:1 by robe, 8 months ago

As far as I can tell, the first failure for PG17 was after these commits

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=66c0185a3d14bbbf51d0fc9d267093ffec735231

    reindexdb: Add the index-level REINDEX with multiple jobs (details)
    Allow planner to use Merge Append to efficiently implement UNION (details)

comment:2 by robe, 8 months ago

I'm guessing it's the UNION change because the query crashing is:

CREATE TEMP TABLE edge1_endnodes AS
  WITH edge AS (
    SELECT start_node, end_node
    FROM sqlmm_topology.edge_data
    WHERE edge_id = 1
  )
  SELECT start_node id FROM edge UNION
  SELECT end_node FROM edge;

Seems harmless enough

comment:3 by robe, 8 months ago

I have confirmed this is not our fault.

I can crash PG 17 with this query:

CREATE TABLE edge_data AS 
SELECT i AS edge_id, i + 1 AS start_node, i + 2 As end_node
FROM generate_series(1,10) AS i;


CREATE TEMP TABLE edge1_endnodes AS
  WITH edge AS (
    SELECT start_node, end_node
    FROM edge_data
    WHERE edge_id = 1
  )
  SELECT start_node id FROM edge UNION
  SELECT end_node FROM edge;

comment:4 by robe, 8 months ago

Milestone: PostGIS 3.5.0PostGIS PostgreSQL

also crashes without the TEMP TABLE so I guess it's the WITH doing it. Reported upstream https://www.postgresql.org/message-id/014c01da805c%242e679da0%248b36d8e0%24%40pcorp.us

Last edited 8 months ago by robe (previous) (diff)

comment:5 by robe, 8 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.