[postgis-tickets] [PostGIS] #4691: Segfault when creating an index on geography(Point, 4326) column that contains empty points
PostGIS
trac at osgeo.org
Wed Jul 29 09:27:05 PDT 2020
#4691: Segfault when creating an index on geography(Point, 4326) column that
contains empty points
----------------------+---------------------------
Reporter: aktiur | Owner: Algunenano
Type: defect | Status: new
Priority: blocker | Milestone: PostGIS 2.5.5
Component: postgis | Version: 2.5.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by Algunenano):
Looking at Postgresql source code it appears that GIST uses random() in
some cases to decide in which bucket to insert a tupe (when several of
them are equally good) so finding a use minimal test case is going to be
extremely hard.
I'm going to retest the patch for a while to confirm I don't see any crash
/ invalid reads and push it that way.
BTW, under valgrind it looks like this:
{{{
2020-07-29 18:21:34.532 CEST [205377] [raul @ postgis_crash] LOG:
statement: CREATE INDEX crash_test_index ON crash_test USING gist (point);
Invalid read of size 8
at 0x6946AB: pfree (mcxt.c:1035)
by 0x8525833: gserialized_gist_picksplit (gserialized_gist_nd.c:0)
by 0x66B188: FunctionCall2Coll (fmgr.c:1162)
by 0x211D27: gistUserPicksplit (gistsplit.c:433)
by 0x2113F9: gistSplitByKey (gistsplit.c:697)
by 0x208BE8: gistSplit (gist.c:1451)
by 0x2081E0: gistplacetopage (gist.c:299)
by 0x207DFA: gistinserttuples (gist.c:1269)
by 0x207DFA: gistinserttuple (gist.c:1222)
by 0x207DFA: gistdoinsert (gist.c:876)
by 0x212E84: gistBuildCallback (gistbuild.c:489)
by 0x22DCBA: heapam_index_build_range_scan (heapam_handler.c:1664)
by 0x212BB4: table_index_build_scan (tableam.h:1522)
by 0x212BB4: gistbuild (gistbuild.c:196)
by 0x29BF4D: index_build (index.c:2912)
Address 0x4028002200000008 is not stack'd, malloc'd or (recently) free'd
Process terminating with default action of signal 11 (SIGSEGV): dumping
core
General Protection Fault
at 0x6946AB: pfree (mcxt.c:1035)
by 0x8525833: gserialized_gist_picksplit (gserialized_gist_nd.c:0)
by 0x66B188: FunctionCall2Coll (fmgr.c:1162)
by 0x211D27: gistUserPicksplit (gistsplit.c:433)
by 0x2113F9: gistSplitByKey (gistsplit.c:697)
by 0x208BE8: gistSplit (gist.c:1451)
by 0x2081E0: gistplacetopage (gist.c:299)
by 0x207DFA: gistinserttuples (gist.c:1269)
by 0x207DFA: gistinserttuple (gist.c:1222)
by 0x207DFA: gistdoinsert (gist.c:876)
by 0x212E84: gistBuildCallback (gistbuild.c:489)
by 0x22DCBA: heapam_index_build_range_scan (heapam_handler.c:1664)
by 0x212BB4: table_index_build_scan (tableam.h:1522)
by 0x212BB4: gistbuild (gistbuild.c:196)
by 0x29BF4D: index_build (index.c:2912)
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4691#comment:6>
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