[PostGIS] #5951: server process was terminated by signal 11: Segmentation fault, postgis topology
PostGIS
trac at osgeo.org
Thu Jul 24 05:24:57 PDT 2025
#5951: server process was terminated by signal 11: Segmentation fault, postgis
topology
--------------------------------+---------------------------
Reporter: Lars Aksel Opsahl | Owner: strk
Type: defect | Status: assigned
Priority: blocker | Milestone: PostGIS 3.6.0
Component: topology | Version: master
Resolution: | Keywords:
--------------------------------+---------------------------
Description changed by Lars Aksel Opsahl:
Old description:
> When running overlay for all Norway I got a problem in one area that
> always cases the postgreSQL to core dump.
>
> I am running on
>
> {{{
> PostgreSQL 16.4 (Ubuntu 16.4-1.pgdg22.04+1) on x86_64-pc-linux-gnu,
> compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
> (1 row)
>
> POSTGIS="3.6.0beta1 3.6.0beta1-4-g1458a794d" [EXTENSION] PGSQL="160"
> GEOS="3.13.1-CAPI-1.19.2" PROJ="9.3.0 NETWORK_ENABLED=OFF
> URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/tmp/proj
> DATABASE_PATH=/usr/local/share/proj/proj.db" (compiled against PROJ
> 9.3.0) LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0
> (Internal)" TOPOLOGY
>
> }}}
>
> In the logs I see this
>
> {{{
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> server process (PID 46114) was terminated by signal 11: Segmentation
> fault
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >LOG:
> server process (PID 46114) was terminated by signal 11: Segmentation
> fault
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >LOG:
> terminating any other active server processes
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> sending SIGQUIT to process 46094
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> sending SIGQUIT to process 46112
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> sending SIGQUIT to process 46111
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> sending SIGQUIT to process 46110
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> sending SIGQUIT to process 46090
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> sending SIGQUIT to process 46089
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> sending SIGQUIT to process 46092
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> sending SIGQUIT to process 46093
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> reaping dead processes
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
> reaping dead processes
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.770 CEST >DEBUG:
> reaping dead processes
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.771 CEST >DEBUG:
> reaping dead processes
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.772 CEST >DEBUG:
> reaping dead processes
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.772 CEST >DEBUG:
> server process (PID 46110) exited with exit code 2
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.772 CEST >DEBUG:
> reaping dead processes
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.772 CEST >DEBUG:
> server process (PID 46111) exited with exit code 2
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.784 CEST >DEBUG:
> reaping dead processes
> < pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.784 CEST >DEBUG:
> server process (PID 46112) exited with exit code 2
>
> }}}
>
> This last logs from pid 46114
>
> {{{
>
> < pid 46114, 6881cfe6.b422 , [local], postgres, rog_02, 2025-07-24
> 08:17:47.732 CEST >DEBUG: building index "pg_toast_1067768161_index" on
> table "pg_toast_1067768161" serially
> < pid 46114, 6881cfe6.b422 , [local], postgres, rog_02, 2025-07-24
> 08:17:47.732 CEST >STATEMENT: CALL resolve_overlap_gap_single_cell(
> E'{"(,id,geo,sk_grl.n5_forvaltning_flate,kom,sl_sdeid,geo,4258,f,\\"id
> integer\\",id,\\"komid integer,objekttype character varying,fylkeid
> integer,fylkenavn character varying,kommunenavn character varying,knr
> character,utmsone integer,sl_sdeid integer,geo_nr
> smallint\\",\\"komid,objekttype,fylkeid,fylkenavn,kommunenavn,knr,utmsone,
> sl_sdeid,geo_nr\\")","(,,,org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda,ark,id,geo,4258,f,,,,)"}','{"(1,sk_grl.n5_forvaltning_flate,sl_sdeid,integer,kom,geo,,4258,f)","(2,org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda,id,integer,ark,geo,,4258,f)"}','(grunnkart_03.rydd_v3,grunnkart_03_topo_error,4258,f,0,t,1,2,t,t,3
> )',1e-07,'grunnkart_03_topo_error.rydd_v3',
> '(2,0,t,,0,0,0,0,0,0,0,0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40,1.1889460856827504e-06,)',
> 'grunnkart_03_topo_error.rydd_v3_job_list','grunnkart_03_topo_error.rydd_v3_grid','0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40',1,1);
> --jobid=1
> < pid 46114, 6881cfe6.b422 , [local], postgres, rog_02, 2025-07-24
> 08:17:47.732 CEST >DEBUG: index "pg_toast_1067768161_index" can safely
> use deduplication
> < pid 46114, 6881cfe6.b422 , [local], postgres, rog_02, 2025-07-24
> 08:17:47.732 CEST >STATEMENT: CALL resolve_overlap_gap_single_cell(
> E'{"(,id,geo,sk_grl.n5_forvaltning_flate,kom,sl_sdeid,geo,4258,f,\\"id
> integer\\",id,\\"komid integer,objekttype character varying,fylkeid
> integer,fylkenavn character varying,kommunenavn character varying,knr
> character,utmsone integer,sl_sdeid integer,geo_nr
> smallint\\",\\"komid,objekttype,fylkeid,fylkenavn,kommunenavn,knr,utmsone,sl_sdeid,geo_nr\\")","(,,,org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda,ark,id,geo,4258,f,,,,)"}','{"(1,sk_grl.n5_forvaltning_flate,sl_sdeid,integer,kom,geo,,4258,f)","(2,org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda,id,integer,ark,geo,,4258,f)"}','(grunnkart_03.rydd_v3,grunnkart_03_topo_error,4258,f,0,t,1,2,t,t,3)',1e-07,'grunnkart_03_topo_error.rydd_v3',
> '(2,0,t,,0,0,0,0,0,0,0,0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40,1.1889460856827504e-06,)',
> 'grunnkart_03_topo_error.rydd_v3_job_list','grunnkart_03_topo_error.rydd_v3_grid','0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40',1,1);
> --jobid=1
>
> }}}
>
> I am using code from code from https://gitlab.com/nibioopensource
> /resolve-overlap-and-gap and run command which involve a big data dataset
> with a lot of gaps and tiny overlap
>
> PostgresSQL core everytime after about a minute when I run the command
> below.
>
> {{{
>
> CALL topo_rog_static.rog_overlay(
> ARRAY[
> 'sk_grl.n5_forvaltning_flate kom',
> 'org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda ark'
> ],
> 'grunnkart_03.rydd_v3',
> 4258, --srid GRADER
> 0, -- no snapto, SKAL IKKE ENDRES 1e-06
> 2, -- min m2 area to keep
> 0, -- split all lines at given vertex num
> true, -- _break_up_big_polygons
> 0.1, -- min negative buffer value null,
> remove sliver polygons
> ARRAY[('0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40','topo_error')::rog_input_boundary::rog_input_boundary],
> true, -- do_qualitycheck_on_final_reseult
> -- Method 3 select from tmp toplogy into
> master topology
> 3,
> 1, -- _max_parallel_jobs int, -- this is
> the max number of paralell jobs to run. There must be at least the same
> number of free cinnections
> 500, -- _max_rows_in_each_cell int, --
> this is the max number rows that intersects with box before it's split
> into 4 new boxes
> null,
> NULL
> );
>
> }}}
>
> I am working on test files to reproduce this error but happens after
> adding lines and then remove and after add some new lines .
>
> I hard to reproduce because depending on data input the results behaves
> different if I wrap for TopoGeo_addLinestring into a procedure or not.
New description:
When running overlay for all Norway I got a problem in one area that
always cases the postgreSQL to core dump.
I am running on
{{{
PostgreSQL 16.4 (Ubuntu 16.4-1.pgdg22.04+1) on x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
(1 row)
POSTGIS="3.6.0beta1 3.6.0beta1-4-g1458a794d" [EXTENSION] PGSQL="160"
GEOS="3.13.1-CAPI-1.19.2" PROJ="9.3.0 NETWORK_ENABLED=OFF
URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/tmp/proj
DATABASE_PATH=/usr/local/share/proj/proj.db" (compiled against PROJ 9.3.0)
LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0
(Internal)" TOPOLOGY
}}}
In the logs I see this
{{{
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
server process (PID 46114) was terminated by signal 11: Segmentation fault
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >LOG:
server process (PID 46114) was terminated by signal 11: Segmentation fault
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >LOG:
terminating any other active server processes
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
sending SIGQUIT to process 46094
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
sending SIGQUIT to process 46112
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
sending SIGQUIT to process 46111
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
sending SIGQUIT to process 46110
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
sending SIGQUIT to process 46090
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
sending SIGQUIT to process 46089
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
sending SIGQUIT to process 46092
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
sending SIGQUIT to process 46093
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
reaping dead processes
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.768 CEST >DEBUG:
reaping dead processes
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.770 CEST >DEBUG:
reaping dead processes
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.771 CEST >DEBUG:
reaping dead processes
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.772 CEST >DEBUG:
reaping dead processes
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.772 CEST >DEBUG:
server process (PID 46110) exited with exit code 2
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.772 CEST >DEBUG:
reaping dead processes
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.772 CEST >DEBUG:
server process (PID 46111) exited with exit code 2
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.784 CEST >DEBUG:
reaping dead processes
< pid 46085, 6881cfdb.b405 , , , , 2025-07-24 08:17:47.784 CEST >DEBUG:
server process (PID 46112) exited with exit code 2
}}}
This last logs from pid 46114
{{{
< pid 46114, 6881cfe6.b422 , [local], postgres, rog_02, 2025-07-24
08:17:47.732 CEST >DEBUG: building index "pg_toast_1067768161_index" on
table "pg_toast_1067768161" serially
< pid 46114, 6881cfe6.b422 , [local], postgres, rog_02, 2025-07-24
08:17:47.732 CEST >STATEMENT: CALL resolve_overlap_gap_single_cell(
E'{"(,id,geo,sk_grl.n5_forvaltning_flate,kom,sl_sdeid,geo,4258,f,\\"id
integer\\",id,\\"komid integer,objekttype character varying,fylkeid
integer,fylkenavn character varying,kommunenavn character varying,knr
character,utmsone integer,sl_sdeid integer,geo_nr
smallint\\",\\"komid,objekttype,fylkeid,fylkenavn,kommunenavn,knr,utmsone,
sl_sdeid,geo_nr\\")","(,,,org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda,ark,id,geo,4258,f,,,,)"}','{"(1,sk_grl.n5_forvaltning_flate,sl_sdeid,integer,kom,geo,,4258,f)","(2,org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda,id,integer,ark,geo,,4258,f)"}','(grunnkart_03.rydd_v3,grunnkart_03_topo_error,4258,f,0,t,1,2,t,t,3
)',1e-07,'grunnkart_03_topo_error.rydd_v3',
'(2,0,t,,0,0,0,0,0,0,0,0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40,1.1889460856827504e-06,)',
'grunnkart_03_topo_error.rydd_v3_job_list','grunnkart_03_topo_error.rydd_v3_grid','0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40',1,1);
--jobid=1
< pid 46114, 6881cfe6.b422 , [local], postgres, rog_02, 2025-07-24
08:17:47.732 CEST >DEBUG: index "pg_toast_1067768161_index" can safely
use deduplication
< pid 46114, 6881cfe6.b422 , [local], postgres, rog_02, 2025-07-24
08:17:47.732 CEST >STATEMENT: CALL resolve_overlap_gap_single_cell(
E'{"(,id,geo,sk_grl.n5_forvaltning_flate,kom,sl_sdeid,geo,4258,f,\\"id
integer\\",id,\\"komid integer,objekttype character varying,fylkeid
integer,fylkenavn character varying,kommunenavn character varying,knr
character,utmsone integer,sl_sdeid integer,geo_nr
smallint\\",\\"komid,objekttype,fylkeid,fylkenavn,kommunenavn,knr,utmsone,sl_sdeid,geo_nr\\")","(,,,org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda,ark,id,geo,4258,f,,,,)"}','{"(1,sk_grl.n5_forvaltning_flate,sl_sdeid,integer,kom,geo,,4258,f)","(2,org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda,id,integer,ark,geo,,4258,f)"}','(grunnkart_03.rydd_v3,grunnkart_03_topo_error,4258,f,0,t,1,2,t,t,3)',1e-07,'grunnkart_03_topo_error.rydd_v3',
'(2,0,t,,0,0,0,0,0,0,0,0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40,1.1889460856827504e-06,)',
'grunnkart_03_topo_error.rydd_v3_job_list','grunnkart_03_topo_error.rydd_v3_grid','0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40',1,1);
--jobid=1
}}}
I am using code from code from https://gitlab.com/nibioopensource/resolve-
overlap-and-gap and run command which involve a big data dataset with a
lot of gaps and tiny overlap
PostgresSQL core everytime after about a minute when I run the command
below.
{{{
CALL topo_rog_static.rog_overlay(
ARRAY[
'sk_grl.n5_forvaltning_flate kom',
'org_arealregnskap.ssbarealbruk_hav_treslag_kystsone_diss_rydda ark'
],
'grunnkart_03.rydd_v3',
4258, --srid GRADER
0, -- no snapto, SKAL IKKE ENDRES 1e-06
2, -- min m2 area to keep
0, -- split all lines at given vertex num
true, -- _break_up_big_polygons
0.1, -- min negative buffer value null,
remove sliver polygons
ARRAY[('0103000020A210000001000000050000000EF7987969EE204070478FBDF5824D400EF7987969EE2040F415B7C4A9844D408EE779C13FFC2040F415B7C4A9844D408EE779C13FFC204070478FBDF5824D400EF7987969EE204070478FBDF5824D40','topo_error')::rog_input_boundary::rog_input_boundary],
true, -- do_qualitycheck_on_final_reseult
-- Method 3 select from tmp toplogy into
master topology
3,
1, -- _max_parallel_jobs int, -- this is
the max number of paralell jobs to run. There must be at least the same
number of free cinnections
500, -- _max_rows_in_each_cell int, --
this is the max number rows that intersects with box before it's split
into 4 new boxes
null,
NULL
);
}}}
--
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5951#comment:5>
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