[postgis-tickets] [PostGIS] #4916: st_asgeobuf() with WINDOW PARTITION crashes server

PostGIS trac at osgeo.org
Sat Jul 31 21:31:47 PDT 2021


#4916: st_asgeobuf() with WINDOW PARTITION crashes server
----------------------+---------------------------
  Reporter:  Robins   |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  blocker  |  Milestone:  PostGIS 3.1.4
 Component:  postgis  |    Version:  3.0.x
Resolution:           |   Keywords:  st_asgeobuf
----------------------+---------------------------

Comment (by robe):

 Confirmed crashes on PostGIS 3.1.3 against PostgreSQL 14beta2.

 Backtrace looks like:


 {{{
 Backtrace stopped: previous frame inner to this frame (corrupt stack?)
 (gdb) cont
 Continuing.
 [Thread 6848.0x433c exited with code 0]

 Thread 1 received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 6848.0xf44]
 pg_detoast_datum (datum=0x0) at fmgr.c:1724
 1724            if (VARATT_IS_EXTENDED(datum))
 (gdb) bt
 #0  pg_detoast_datum (datum=0x0) at fmgr.c:1724
 #1  0x000000006f004ead in pgis_asgeobuf_transfn (fcinfo=0x520e990)
     at lwgeom_out_geobuf.c:75
 #2  0x000000000064a2f1 in advance_windowaggregate (
     winstate=winstate at entry=0x533b0a8, perfuncstate=0x84fb2f0,
     peraggstate=0x84fb140) at nodeWindowAgg.c:345
 #3  0x000000000064e15b in eval_windowaggregates (winstate=0x533b0a8)
     at nodeWindowAgg.c:964
 #4  ExecWindowAgg (pstate=0x533b0a8) at nodeWindowAgg.c:2207
 #5  0x000000000060c5ba in ExecProcNode (node=0x533b0a8)
     at ../../../src/include/executor/executor.h:257
 #6  ExecutePlan (execute_once=<optimized out>, dest=0x84a3630,
     direction=<optimized out>, numberTuples=0, sendTuples=<optimized out>,
     operation=CMD_SELECT, use_parallel_mode=<optimized out>,
     planstate=0x533b0a8, estate=0x533ae70) at execMain.c:1551
 #7  standard_ExecutorRun (queryDesc=0x84b5aa0, direction=<optimized out>,
     count=0, execute_once=<optimized out>) at execMain.c:361
 #8  0x00000000007bfc7b in PortalRunSelect (portal=portal at entry=0x52dc590,
     forward=forward at entry=true, count=0, count at entry=2147483647,
     dest=dest at entry=0x84a3630) at pquery.c:919
 #9  0x00000000007c195c in PortalRun (portal=portal at entry=0x52dc590,
     count=count at entry=2147483647, isTopLevel=isTopLevel at entry=true,
     run_once=run_once at entry=true, dest=dest at entry=0x84a3630,
     altdest=altdest at entry=0x84a3630, qc=qc at entry=0x520f360) at
 pquery.c:763
 #10 0x00000000007ba13b in exec_simple_query (
     query_string=0x53141e0 " SELECT public.st_asgeobuf(NULL::pg_class,
 version()                                                                )
 over (partition by RANDOM());") at postgres.c:1214
 #11 0x00000000007bd998 in PostgresMain (argc=argc at entry=1,
     argv=argv at entry=0x520f980, dbname=<optimized out>,
     username=0x1d8c10 "postgres") at postgres.c:4486
 #12 0x000000000071faa1 in BackendRun (port=0x520f7b0, port=0x520f7b0)
     at postmaster.c:4507
 #13 SubPostmasterMain (argc=argc at entry=3, argv=argv at entry=0x1d6b00)
     at postmaster.c:5020
 #14 0x0000000000963c73 in main (argc=3, argv=0x1d6b00) at main.c:186

 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4916#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