[PostGIS] #5951: server process was terminated by signal 11: Segmentation fault, postgis topology

PostGIS trac at osgeo.org
Thu Jul 24 05:07:28 PDT 2025


#5951: server process was terminated by signal 11: Segmentation fault, postgis
topology
--------------------------------+---------------------------
  Reporter:  Lars Aksel Opsahl  |      Owner:  strk
      Type:  defect             |     Status:  new
  Priority:  medium             |  Milestone:  PostGIS 3.6.0
 Component:  topology           |    Version:  master
Resolution:                     |   Keywords:
--------------------------------+---------------------------
Comment (by Lars Aksel Opsahl):

 The core dump seems caused by topology.ST_GetFaceEdges.

 Here is smaller sql trigger the core dump

 CREATE table grunnkart_03_topo_error_1_small_all_1_2 AS
         SELECT
         s.edge_id,
         s.face_id,
         s.face_area,
         s.table_input_order,
         s.edge_geoms
         FROM
         (
                                         SELECT
                                         unnest(edge_ids) edge_id, -- the
 list of edges around the face
                                         face_area,
                                         face_id,
                                         table_input_order,
                                         edge_geoms
                                         FROM
 unnest('{"({630},-1,8,-1,)","({630},-1,8,-1,)","({633},-1,38,-1,)","({636},-1,300,-1,)","({636},-1,300,-1,)","({639},-1,39,-1,)","({639},-1,301,-1,)","({639},-1,39,-1,)","({639},-1,301,-1,)","({642},-1,157,-1,)","({642},-1,157,-1,)","({645},-1,303,-1,)","({645},-1,303,-1,)","({648},-1,304,-1,)","({648},-1,304,-1,)","({651},-1,305,-1,)","({651},-1,305,-1,)","({654},-1,306,-1,)","({654},-1,306,-1,)","({657},-1,307,-1,)","({657},-1,307,-1,)","({660},-1,308,-1,)","({663},-1,309,-1,)","({663},-1,309,-1,)","({666},-1,261,-1,)","({666},-1,310,-1,)","({666},-1,261,-1,)","({666},-1,310,-1,)","({669},-1,310,-1,)","({669},-1,310,-1,)","({672},-1,159,-1,)","({672},-1,159,-1,)","({675},-1,313,-1,)","({675},-1,314,-1,)","({675},-1,313,-1,)","({675},-1,314,-1,)","({678},-1,314,-1,)","({678},-1,314,-1,)","({681},-1,313,-1,)","({681},-1,315,-1,)","({681},-1,313,-1,)","({681},-1,315,-1,)","({684},-1,316,-1,)","({684},-1,316,-1,)","({687},-1,317,-1,)","({687},-1,317,-1,)","({690},-1,193,-1,)","({690},-1,193,-1,)","({693},-1,319,-1,)","({693},-1,319,-1,)","({695},-1,39,-1,)","({698},-1,191,-1,)","({698},-1,191,-1,)","({701},-1,292,-1,)","({701},-1,292,-1,)","({704},-1,323,-1,)"}'::add_border_lines_faces_to_remove[])
         ) s;

         CREATE INDEX ON grunnkart_03_topo_error_1_small_all_1_2
 (table_input_order);
         CREATE INDEX ON grunnkart_03_topo_error_1_small_all_1_2 (edge_id);
         CREATE INDEX ON grunnkart_03_topo_error_1_small_all_1_2 (face_id);

         ANALYZE grunnkart_03_topo_error_1_small_all_1_2;


 WITH unique_face_id AS (
                                 SELECT
                                 table_input_order min_table_input_order,
                                 face_id,
                                 edge_id
                                 FROM
                                 grunnkart_03_topo_error_1_small_all_1_2
                                 GROUP BY table_input_order, face_id,
 edge_id
                                 ORDER BY table_input_order, face_id,
 edge_id
 ),
 edge_delete_short AS (
                                 SELECT
 abs((topology.ST_GetFaceEdges('grunnkart_03_topo_error_1',eshort.face_id)).edge)
 edge_id,
                                 face_id,
                                 min_table_input_order table_input_order
                                 FROM
                                 unique_face_id eshort
                                 WHERE eshort.min_table_input_order = -1
 )
 SELECT * from edge_delete_short;
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5951#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list