Opened 8 years ago
Last modified 9 months ago
#3651 new defect
ST_Orientation crashes the backend
Reported by: | postgispaul | Owned by: | robe |
---|---|---|---|
Priority: | high | Milestone: | PostGIS SFCGAL |
Component: | sfcgal | Version: | 2.3.x |
Keywords: | windows | Cc: |
Description
Don't know if it's the number of points (100000+), or that there is something unusual in the geometry itself (it is valid though), but I have a polygon which when calculating the ST_Orientation of it, crashes the backend.
Tested on two systems: "POSTGIS="2.1.7 r13414" GEOS="3.5.0-CAPI-1.9.0 r4090" SFCGAL="1.2.0" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.11.1, released 2014/09/24 GDAL_DATA not found" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER" "PostgreSQL 9.4.1, compiled by Visual C++ build 1800, 64-bit"
and
"POSTGIS="2.3.0 r15146" GEOS="3.5.0-CAPI-1.9.0 r4090" SFCGAL="1.3.0" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.1.1, released 2016/07/07 GDAL_DATA not found" LIBXML="2.7.8" LIBJSON="0.12" RASTER" "PostgreSQL 9.6.0, compiled by Visual C++ build 1800, 64-bit"
On both systems the postgres service crashes with a stack overflow. LOG: server process (PID 2440) was terminated by exception 0xC00000FD
My guess would be that some intermediate result is put on the stack instead of the heap (or passed by value instead of by reference).
Attachments (1)
Change History (22)
by , 8 years ago
comment:1 by , 8 years ago
Milestone: | PostGIS 2.3.1 → PostGIS SFCGAL |
---|
I suspect this is something wrong with SFCGAL library itself so switching the milestone.
I confirmed crashes on my 9.6 windows 64-bit with 1.3.0. I'll test with git master SFCGAL and then report upstream if its still an issue.
comment:3 by , 8 years ago
Thanks!
Any reason to not include this function in GEOS? Seems a bit overkill to install SFCGAL for this function only…
comment:5 by , 8 years ago
I can put this into liblwgeom. A workaround that doesn't require SFCGAL is
ST_OrderingEquals(geom, ST_ForceRHR(geom))
comment:6 by , 8 years ago
Makes perfect sense for it to be in liblwgeom. I shall note it is ambiguous though, as orientation is a characteristic of a ring, not a full polygon. What does it mean for a polygon to be "clockwise" oriented ?
comment:7 by , 8 years ago
I can't reproduce the problem on my Linux box. Is it only windows specific ?
@strk : a clockwise polygon is a polygon with its exterior ring clockwise oriented and all its interior rings counter clockwise.
I also agree, it would make sense to have it in lwgeom rather than sfcgal
comment:11 by , 8 years ago
comment:12 by , 8 years ago
Okay here is my stack trace from PostGIS / SFCGAL 1.3.0 CGAL 4.6.1
POSTGIS="2.4.0dev r15252" GEOS="3.6.0-CAPI-1.10.0 r4265" SFCGAL="1.3.0" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.1.1, released 2016/07/07" LIBXML="2.7.8" LIBJSON="0.12" RASTER
#65228 0x000000006d36b325 in libSFCGAL!_ZN6SFCGAL7VersionEv () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65229 0x000000006d29ba2f in libSFCGAL!_ZN6SFCGAL9algorithm26isCounterClockWiseOrientedERKNS_10LineStringE () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65230 0x000000006d2b5eb8 in sfcgal_geometry_orientation () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65231 0x00000000633d9fd9 in sfcgal_orientation () from C:\ming64gcc48\projects\postgresql\rel\pg9.6w64gcc48edb\lib\postgis-2.4.dll #65232 0x0000000140134458 in postgres!ExecProject () #65233 0x0000000140134510 in postgres!ExecProject () #65234 0x0000000140130f6b in postgres!ExecEvalExprSwitchContext () #65235 0x00000001401d883c in postgres!inline_set_returning_function () #65236 0x00000001401d7ff2 in postgres!inline_set_returning_function () #65237 0x00000001401d7880 in postgres!inline_set_returning_function () #65238 0x00000001401d639a in postgres!inline_set_returning_function () #65239 0x0000000140186c6a in postgres!expression_tree_mutator () #65240 0x0000000140186abb in postgres!expression_tree_mutator () #65241 0x00000001401d49a4 in postgres!eval_const_expressions () #65242 0x00000001401c224b in subquery_planner () #65243 0x00000001401c1d69 in standard_planner () #65244 0x000000014029b021 in postgres!pg_plan_query () #65245 0x000000014029df9f in postgres!get_stats_option_name () #65246 0x000000014029c2b4 in postgres!PostgresMain () #65247 0x000000014023368a in postgres!ShmemBackendArrayAllocation () #65248 0x0000000140230aa2 in postgres!SubPostmasterMain () #65249 0x000000014016eb30 in postgres!main ()
comment:13 by , 8 years ago
That's my test against VC++ build. My PostgreSQL mingw debug build gives:
#65171 0x000000006d36b325 in libSFCGAL!_ZN6SFCGAL7VersionEv () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65172 0x000000006d36b325 in libSFCGAL!_ZN6SFCGAL7VersionEv () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65173 0x000000006d36b325 in libSFCGAL!_ZN6SFCGAL7VersionEv () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65174 0x000000006d36b325 in libSFCGAL!_ZN6SFCGAL7VersionEv () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65175 0x000000006d36b325 in libSFCGAL!_ZN6SFCGAL7VersionEv () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65176 0x000000006d29ba2f in libSFCGAL!_ZN6SFCGAL9algorithm26isCounterClockWiseOrientedERKNS_10LineStringE () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65177 0x000000006d2b5eb8 in sfcgal_geometry_orientation () from C:\ming64gcc48\projects\cgal\rel-sfcgal-1.3.0w64gcc48\bin\libSFCGAL.dll #65178 0x00000000633d9fd9 in sfcgal_orientation () from C:\ming64gcc48\projects\postgresql\rel\pg9.6w64gcc48\lib\postgis-2.4.dll #65179 0x000000000058c94b in ExecMakeFunctionResultNoSets (fcache=0xe108ae0, econtext=0xe109390, isNull=0x29ae8bc "", isDone=<optimized out>) at execQual.c:2041 #65180 0x0000000000591290 in ExecEvalExprSwitchContext ( expression=expression@entry=0xe108ae0, econtext=<optimized out>, isNull=isNull@entry=0x29ae8bc "", isDone=isDone@entry=0x0) at execQual.c:4445 #65181 0x0000000000622359 in evaluate_expr (expr=<optimized out>, result_type=result_type@entry=23, result_typmod=result_typmod@entry=-1, result_collation=result_collation@entry=0) at clauses.c:4670 #65182 0x0000000000625353 in evaluate_function (func_tuple=0xe0ca8c8, context=0x29aed50, funcvariadic=0 '\000', args=0xe102c20, input_collid=0, result_collid=0, result_typmod=-1, result_type=23, funcid=36944) at clauses.c:4223 #65183 simplify_function (funcid=36944, result_type=23, result_typmod=-1, result_collid=result_collid@entry=0, input_collid=input_collid@entry=0, args_p=args_p@entry=0x29aea98, funcvariadic=funcvariadic@entry=0 '\000', process_args=process_args@entry=1 '\001', allow_non_const=allow_non_const@entry=1 '\001', context=context@entry=0x29aed50) at clauses.c:3862 #65184 0x0000000000624586 in eval_const_expressions_mutator (node=0x2d1200, context=0x29aed50) at clauses.c:2535 #65185 0x00000000005c9d29 in expression_tree_mutator ( node=node@entry=0x2d0918, mutator=mutator@entry=0x623c60 <eval_const_expressions_mutator>, context=context@entry=0x29aed50) at nodeFuncs.c:2974 #65186 0x0000000000624042 in eval_const_expressions_mutator (node=0x2d0918, context=0x29aed50) at clauses.c:3512 #65187 0x00000000005c9bb9 in expression_tree_mutator ( node=node@entry=0xe1029f0, mutator=mutator@entry=0x623c60 <eval_const_expressions_mutator>, context=context@entry=0x29aed50) at nodeFuncs.c:2869 #65188 0x0000000000624042 in eval_const_expressions_mutator (node=0xe1029f0, context=context@entry=0x29aed50) at clauses.c:3512 #65189 0x0000000000626242 in eval_const_expressions ( root=root@entry=0xe108600, node=<optimized out>) at clauses.c:2377 #65190 0x000000000060f0f6 in preprocess_expression ( root=root@entry=0xe108600, expr=<optimized out>, kind=kind@entry=1) at planner.c:849 #65191 0x00000000006131ad in subquery_planner (glob=glob@entry=0x2d0828, parse=parse@entry=0x2d02a0, parent_root=parent_root@entry=0x0, hasRecursion=hasRecursion@entry=0 '\000', tuple_fraction=tuple_fraction@entry=0) at planner.c:589 #65192 0x0000000000614469 in standard_planner (parse=0x2d02a0, cursorOptions=256, boundParams=0x0) at planner.c:292 #65193 0x00000000006af29c in pg_plan_query (querytree=0x2d02a0, cursorOptions=cursorOptions@entry=256, boundParams=boundParams@entry=0x0) at postgres.c:798 #65194 0x00000000006af39b in pg_plan_queries (querytrees=<optimized out>, cursorOptions=cursorOptions@entry=256, boundParams=boundParams@entry=0x0) at postgres.c:857 #65195 0x00000000006b1617 in exec_simple_query ( query_string=0x100000000000000 <error: Cannot access memory at address 0x100000000000000>) at postgres.c:1022 #65196 PostgresMain (argc=<optimized out>, argv=argv@entry=0x27be60, dbname=0x18001700160015 <error: Cannot access memory at address 0x18001700160015>, username=<optimized out>) at postgres.c:4070 #65197 0x000000000064809d in BackendRun (port=0x29af400) at postmaster.c:4270 #65198 SubPostmasterMain (argc=argc@entry=3, argv=argv@entry=0x257f80) at postmaster.c:4760 #65199 0x0000000000804ac8 in main (argc=3, argv=0x257f80) at main.c:205 (gdb)
comment:14 by , 6 years ago
works on POSTGIS="2.5.2 r17328" [EXTENSION] PGSQL="110" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" SFCGAL="1.3.5" PROJ="Rel. 5.1.0, June 1st, 2018" GDAL="GDAL 2.3.2, released 2018/09/21" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.3.1"
root@LAPTOP-A1BF6K4V:/mnt/c/Users/me/Downloads/crash# psql -f crash.sql st_orientation ---------------- 1 (1 row)
need more stacktrace with debug symbols from sfcgal.
comment:15 by , 6 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:16 by , 4 years ago
Keywords: | windows added |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
Still an issue on windows as of
PostgreSQL 13.1, compiled by Visual C++ build 1914, 64-bit POSTGIS="3.1.0dev 3.1.0alpha2-157-gdfeaaac70" [EXTENSION] PGSQL="130" GEOS="3.9.0beta2-CAPI-0.15.1" SFCGAL="1.3.8" PROJ="6.3.2" GDAL="GDAL 3.2.0, released 2020/10/26" LIBXML="2.9.9" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0 (Internal)" TOPOLOGY RASTER
But looks to be a windows only bug. So once I build a SFCGAL debug version I'll provide the case with more detail at https://github.com/Oslandia/SFCGAL/issues/137 and reopen.
comment:17 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:20 by , 3 years ago
Iguess i need to rebuild SFCGAL with debug enabled. Puzzled why SFCGAL version is repeating lots of times in the debug output though seems a bit excessive
#86824 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86825 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86826 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86827 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86828 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86829 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86830 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86831 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86832 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86833 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86834 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86835 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86836 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86837 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86838 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86839 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86840 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86841 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86842 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86843 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86844 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86845 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86846 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86847 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86848 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86849 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86850 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86851 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86852 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86853 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86854 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86855 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86856 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86857 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86858 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86859 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86860 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86861 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86862 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86863 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86864 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86865 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86866 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86867 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86868 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86869 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86870 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86871 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86872 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86873 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86874 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86875 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86876 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86877 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86878 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86879 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86880 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86881 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86882 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86883 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86884 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86885 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86886 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86887 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86888 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86889 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86890 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86891 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86892 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86893 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86894 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86895 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86896 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86897 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86898 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86899 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86900 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86901 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86902 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86903 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86904 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86905 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86906 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86907 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86908 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86909 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86910 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86911 0x00000000085b2ae6 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86912 0x0000000008525587 in libSFCGAL!_ZN6SFCGAL12Full_VersionEv () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86913 0x0000000008444849 in libSFCGAL!_ZN6SFCGAL9algorithm26isCounterClockWiseOrientedERKNS_10LineStringE () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86914 0x000000000846e528 in sfcgal_geometry_orientation () from C:\ming64gcc81\projects\cgal\rel-sfcgal-1.4.1w64gcc81\bin\libSFCGAL.dll #86915 0x0000000068541815 in sfcgal_orientation (fcinfo=0x8020138) at lwgeom_sfcgal.c:271 #86916 0x0000000000606ed4 in ExecInterpExpr (state=0x8020048, econtext=0x8020298, isnull=<optimized out>) at execExprInterp.c:1260 #86917 0x00000000006e2051 in ExecEvalExprSwitchContext (isNull=0x520eb8c, econtext=<optimized out>, state=0x8020048) at ../../../../src/include/executor/executor.h:339 #86918 evaluate_expr (expr=<optimized out>, result_type=result_type@entry=23, result_typmod=result_typmod@entry=-1, result_collation=result_collation@entry=0) at clauses.c:4774 #86919 0x00000000006e3a18 in evaluate_function (context=0x520f030, func_tuple=0x7fef438, funcvariadic=false, args=0x80b5750, input_collid=0, result_collid=0, result_typmod=-1, result_type=23, funcid=37640) at clauses.c:4276 #86920 simplify_function (funcid=37640, result_type=23, result_typmod=-1, result_collid=result_collid@entry=0, input_collid=input_collid@entry=0, args_p=args_p@entry=0x520ed70, funcvariadic=funcvariadic@entry=false, process_args=process_args@entry=true, allow_non_const=allow_non_const@entry=true, context=context@entry=0x520f030) at clauses.c:3859 #86921 0x00000000006e2602 in eval_const_expressions_mutator (node=0x532ea08, context=0x520f030) at clauses.c:2378 #86922 0x000000000067f0d4 in expression_tree_mutator ( node=node@entry=0x80b5490, mutator=mutator@entry=0x6e20f0 <eval_const_expressions_mutator>, context=context@entry=0x520f030) at nodeFuncs.c:3229 #86923 0x00000000006e2142 in eval_const_expressions_mutator (node=0x80b5490, context=0x520f030) at clauses.c:3478 #86924 0x000000000067f104 in expression_tree_mutator ( node=node@entry=0x80b54e8, mutator=mutator@entry=0x6e20f0 <eval_const_expressions_mutator>, context=context@entry=0x520f030) at nodeFuncs.c:3108 #86925 0x00000000006e2142 in eval_const_expressions_mutator (node=0x80b54e8, context=context@entry=0x520f030) at clauses.c:3478 #86926 0x00000000006e3884 in eval_const_expressions ( root=root@entry=0x802f5f0, node=<optimized out>) at clauses.c:2106 #86927 0x00000000006c61d8 in preprocess_expression ( root=root@entry=0x802f5f0, expr=<optimized out>, kind=kind@entry=1) at planner.c:1098 #86928 0x00000000006ce28d in subquery_planner (glob=glob@entry=0x532ee78, parse=<optimized out>, parse@entry=0x532e0b0, parent_root=parent_root@entry=0x0, hasRecursion=hasRecursion@entry=false, tuple_fraction=tuple_fraction@entry=0) at planner.c:780 #86929 0x00000000006ced53 in standard_planner (parse=0x532e0b0, query_string=<optimized out>, cursorOptions=2048, boundParams=<optimized out>) at planner.c:400 #86930 0x00000000007ba51a in pg_plan_query (querytree=0x532e0b0, query_string=0x8dab080 "select st_orientation('POLYGON((8181953.03 4776501.02,8182504.09 4776589.7,8182811.79 4776582.25,8183167.46 4776927.67,8183718.69 4776986.84,8184287.54 4777117.57,8184388.8 4777233.55,8184561.55 47777"..., cursorOptions=2048, boundParams=0x0) at postgres.c:847 #86931 0x00000000007ba621 in pg_plan_queries (querytrees=0x80b5598, query_string=query_string@entry=0x8dab080 "select st_orientation('POLYGON((8181953.03 4776501.02,8182504.09 4776589.7,8182811.79 4776582.25,8183167.46 4776927.67,8183718.69 4776986.84,8184287.54 4777117.57,8184388.8 4777233.55,8184561.55 47777"..., cursorOptions=cursorOptions@entry=2048, boundParams=boundParams@entry=0x0) at postgres.c:939 #86932 0x00000000007ba9c0 in exec_simple_query ( query_string=0x8dab080 "select st_orientation('POLYGON((8181953.03 4776501.02,8182504.09 4776589.7,8182811.79 4776582.25,8183167.46 4776927.67,8183718.69 4776986.84,8184287.54 4777117.57,8184388.8 4777233.55,8184561.55 47777"...) at postgres.c:1133 #86933 0x00000000007be40c in PostgresMain (argc=argc@entry=1, argv=argv@entry=0x520f980, dbname=<optimized out>, username=0x5288dc0 "postgres") at postgres.c:4486 #86934 0x00000000007202a1 in BackendRun (port=0x520f7b0, port=0x520f7b0) at postmaster.c:4506 #86935 SubPostmasterMain (argc=argc@entry=3, argv=argv@entry=0x5286cb0) at postmaster.c:5019 #86936 0x0000000000964b53 in main (argc=3, argv=0x5286cb0) at main.c:186
comment:21 by , 9 months ago
Sadly still issue on windows with
SFCGAL="SFCGAL 1.5.1, CGAL 5.6.1, BOOST 1.84.0" version ------------------------------------------------------------ PostgreSQL 16.2, compiled by Visual C++ build 1937, 64-bit
or same with mingw backend
PostgreSQL 16.2 on x86_64-w64-mingw32, compiled by gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0, 64-bit
but works fine on demo.postgis.net running
PostgreSQL 16.1 (Debian 16.1-1.pgdg130+~20231208.0559.g8ca5662) on x86_64-pc-linux-gnu, compiled by gcc (Debian 13.2.0-7) 13.2.0, 64-bit
SFCGAL 1.5.0, CGAL 5.6, BOOST 1.74.0
I need to try on my newer mingw setup — which I've still got some libs to build before I can switch to.
query which crashes the backend