[postgis-tickets] [PostGIS] #4792: ST_Transform crashes server (windows)

PostGIS trac at osgeo.org
Mon Nov 16 17:19:14 PST 2020


#4792: ST_Transform crashes server (windows)
----------------------+---------------------------
  Reporter:  robe     |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  high     |  Milestone:  PostGIS 3.1.0
 Component:  postgis  |    Version:  master
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by robe):

 Okay here is the backtrace I get


 {{{
 Thread 1 received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 18552.0x52d4]
 0x000000006db780e0 in
 libproj-15!_ZNK5osgeo4proj2io16AuthorityFactory15databaseContextEv ()
    from C:\ming64gcc81\projects\proj\rel-6.3.2w64gcc81\bin\libproj-15.dll
 (gdb) bt
 #0  0x000000006db780e0 in
 libproj-15!_ZNK5osgeo4proj2io16AuthorityFactory15databaseContextEv ()
    from C:\ming64gcc81\projects\proj\rel-6.3.2w64gcc81\bin\libproj-15.dll
 #1  0x000000006db368fe in
 libproj-15!_ZN5osgeo4proj9operation26CoordinateOperationFactory7Private34createOperationsCompoundToCompoundERKN7dropbox6oxygen2nnISt10shared_ptrINS0_3crs3CRSEEEESD_RNS3_7ContextEPKNS8_11CompoundCRSESI_RSt6vectorINS6_IS7_INS1_19CoordinateOperationEEEESaISM_EE
 ()
    from C:\ming64gcc81\projects\proj\rel-6.3.2w64gcc81\bin\libproj-15.dll
 #2  0x000000006db2f4af in
 libproj-15!_ZN5osgeo4proj9operation26CoordinateOperationFactory7Private16createOperationsERKN7dropbox6oxygen2nnISt10shared_ptrINS0_3crs3CRSEEEESD_RNS3_7ContextE
 ()
    from C:\ming64gcc81\projects\proj\rel-6.3.2w64gcc81\bin\libproj-15.dll
 #3  0x000000006db37e39 in
 libproj-15!_ZNK5osgeo4proj9operation26CoordinateOperationFactory16createOperationsERKN7dropbox6oxygen2nnISt10shared_ptrINS0_3crs3CRSEEEESC_RKNS5_ISt10unique_ptrINS1_26CoordinateOperationContextESt14default_deleteISE_EEEE
 ()
    from C:\ming64gcc81\projects\proj\rel-6.3.2w64gcc81\bin\libproj-15.dll
 #4  0x000000006dba060a in proj_create_operations ()
    from C:\ming64gcc81\projects\proj\rel-6.3.2w64gcc81\bin\libproj-15.dll
 #5  0x000000006dc0b180 in proj_create_crs_to_crs_from_pj ()
    from C:\ming64gcc81\projects\proj\rel-6.3.2w64gcc81\bin\libproj-15.dll
 #6  0x000000006dc0b8bd in proj_create_crs_to_crs ()
    from C:\ming64gcc81\projects\proj\rel-6.3.2w64gcc81\bin\libproj-15.dll
 #7  0x000000006f009b6b in AddToPROJSRSCache (srid_to=5500, srid_from=7406,
     PROJCache=0x80d83a8, fcinfo=0x80d7cf8) at lwgeom_transform.c:397
 #8  GetPJUsingFCInfo (fcinfo=fcinfo at entry=0x80d7cf8, srid_from=7406,
     srid_to=srid_to at entry=5500, pj=pj at entry=0x4d7e6a8)
     at lwgeom_transform.c:505
 #9  0x000000006efe43f9 in transform (fcinfo=0x80d7cf8)
     at lwgeom_transform.c:76
 #10 0x00000000005ed01e in ExecInterpExpr (state=0x80d7c08,
     econtext=0x80d7e48, isnull=<optimized out>) at execExprInterp.c:699
 #11 0x00000000006bf1e1 in ExecEvalExprSwitchContext (isNull=0x4d7e7dc,
     econtext=<optimized out>, state=0x80d7c08)
     at ../../../../src/include/executor/executor.h:313
 #12 evaluate_expr (expr=<optimized out>,
     result_type=result_type at entry=798902,
     result_typmod=result_typmod at entry=-1,
     result_collation=result_collation at entry=0) at clauses.c:4792
 #13 0x00000000006c0a98 in evaluate_function (context=0x4d7eec0,
     func_tuple=0x804f3b0, funcvariadic=false, args=0x80eae20,
 input_collid=0,
     result_collid=0, result_typmod=-1, result_type=798902, funcid=799233)
     at clauses.c:4323
 #14 simplify_function (funcid=799233, result_type=798902,
 result_typmod=-1,
     result_collid=result_collid at entry=0,
 input_collid=input_collid at entry=0,
     args_p=args_p at entry=0x4d7e9c0, funcvariadic=funcvariadic at entry=false,
     process_args=process_args at entry=true,
     allow_non_const=allow_non_const at entry=true,
     context=context at entry=0x4d7eec0) at clauses.c:3953
 #15 0x00000000006bf5f2 in eval_const_expressions_mutator (node=0x80ea328,
     context=0x4d7eec0) at clauses.c:2507
 #16 0x000000000065f8e5 in expression_tree_mutator (node=0x80ea380,
     mutator=mutator at entry=0x6bf280 <eval_const_expressions_mutator>,
     context=context at entry=0x4d7eec0) at nodeFuncs.c:3059
 #17 0x00000000006c10f9 in simplify_function (funcid=799486,
 result_type=25,
     result_typmod=-1, result_collid=result_collid at entry=100,
     input_collid=input_collid at entry=0, args_p=args_p at entry=0x4d7ec00,
     funcvariadic=funcvariadic at entry=false,
     process_args=process_args at entry=true,
     allow_non_const=allow_non_const at entry=true,
     context=context at entry=0x4d7eec0) at clauses.c:3944
 #18 0x00000000006bf5f2 in eval_const_expressions_mutator (node=0x80ea538,
     context=0x4d7eec0) at clauses.c:2507
 #19 0x000000000065ef04 in expression_tree_mutator
 (node=node at entry=0x80ea590,
     mutator=mutator at entry=0x6bf280 <eval_const_expressions_mutator>,
     context=context at entry=0x4d7eec0) at nodeFuncs.c:3180
 #20 0x00000000006bf2d2 in eval_const_expressions_mutator (node=0x80ea590,
     context=0x4d7eec0) at clauses.c:3572
 #21 0x000000000065f8e5 in expression_tree_mutator
 (node=node at entry=0x80ea5e8,
     mutator=mutator at entry=0x6bf280 <eval_const_expressions_mutator>,
     context=context at entry=0x4d7eec0) at nodeFuncs.c:3059
 #22 0x00000000006bf2d2 in eval_const_expressions_mutator (node=0x80ea5e8,
     context=context at entry=0x4d7eec0) at clauses.c:3572
 #23 0x00000000006c0904 in eval_const_expressions
 (root=root at entry=0x80ea6f0,
     node=<optimized out>) at clauses.c:2299
 #24 0x00000000006a4208 in preprocess_expression
 (root=root at entry=0x80ea6f0,
     expr=<optimized out>, kind=kind at entry=1) at planner.c:1094
 #25 0x00000000006abe14 in subquery_planner (glob=glob at entry=0x7775570,
     parse=<optimized out>, parse at entry=0x7775688,
     parent_root=parent_root at entry=0x0,
 hasRecursion=hasRecursion at entry=false,
     tuple_fraction=tuple_fraction at entry=0) at planner.c:771
 #26 0x00000000006ad7ef in standard_planner (parse=0x7775688,
     query_string=<optimized out>, cursorOptions=256,
     boundParams=<optimized out>) at planner.c:405
 #27 0x00000000007825ea in pg_plan_query (querytree=0x7775688,
     query_string=0x7774200 "SELECT ST_Astext(\n         ST_Transform(\n",
 ' ' <repeats 11 times>, "ST_SetSRID(geometry('POINT(-100 40 100)'),7406),
 \n", ' ' <repeats 11 times>, "5500));\n", ' ' <repeats 21 times>,
 cursorOptions=256,
     boundParams=0x0) at postgres.c:875
 #28 0x00000000007826f1 in pg_plan_queries (querytrees=0x80ea698,
     query_string=query_string at entry=0x7774200 "SELECT ST_Astext(\n
 ST_Transform(\n", ' ' <repeats 11 times>, "ST_SetSRID(geometry('POINT(-100
 40 100)'),7406), \n", ' ' <repeats 11 times>, "5500));\n", ' ' <repeats 21
 times>,
     cursorOptions=cursorOptions at entry=256,
 boundParams=boundParams at entry=0x0)
     at postgres.c:966
 #29 0x0000000000782a80 in exec_simple_query (
     query_string=0x7774200 "SELECT ST_Astext(\n         ST_Transform(\n",
 ' ' <repeats 11 times>, "ST_SetSRID(geometry('POINT(-100 40 100)'),7406),
 \n", ' ' <repeats 11 times>, "5500));\n", ' ' <repeats 21 times>) at
 postgres.c:1158
 #30 0x00000000007844b9 in PostgresMain (argc=<optimized out>,
     argv=argv at entry=0x77003e8, dbname=<optimized out>,
     username=<optimized out>) at postgres.c:4315
 #31 0x00000000006f9cde in BackendRun (port=0x4d7f7c0, port=0x4d7f7c0)
     at postmaster.c:4536
 #32 SubPostmasterMain (argc=argc at entry=3, argv=argv at entry=0x5d86ba0)
     at postmaster.c:5059
 #33 0x00000000009123cf in main (argc=3, argv=0x5d86ba0) at main.c:187

 }}}


 Looks like it's crashing in proj.  I'll try a newer proj to see if I can
 fair better.

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