Opened 12 years ago
Closed 11 years ago
#2393 closed defect (wontfix)
segmentation fault during regress tests on Solaris 10 x64
Reported by: | edechaux | Owned by: | pramsey |
---|---|---|---|
Priority: | critical | Milestone: | PostGIS 2.0.5 |
Component: | postgis | Version: | 2.0.x |
Keywords: | solaris segfault regress | Cc: |
Description
On Solaris 10 1/13 (update 11) x64 (intel processor) with the following configuration :
PostgreSQL 9.2.4 on i386-pc-solaris2.10, compiled by gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath), 64-bit Postgis 2.0.3 - r11128 - 2013-07-24 07:19:45 GEOS: 3.3.8-CAPI-1.7.8 PROJ: Rel. 4.8.0, 6 March 2012
During the regression test suite, 4 checks fails because of a segmentation fault : tickets, sharedpaths, clean, concave_hull.
The error always occurs during while an exception is thrown :
Stack for check : tickets
core 'core.postgres.11102' of 11102: /opt/stig/idicsi-3.0/bin/amd64/postgres -D /tmp/postgis-2.0.329202 00000000001b6cad ???????? () fffffd7ffed11f09 _SUNW_Unwind_RaiseException () + 46 fffffd7ffb7dc79e __cxa_throw () + 5e fffffd7ffb924148 _ZN4geos4geom10LinearRing20validateConstructionEv () + 408 fffffd7ffb9247ea _ZN4geos4geom10LinearRingC1EPNS0_18CoordinateSequenceEPKNS0_15GeometryFactoryE () + 6a fffffd7ffb920115 _ZNK4geos4geom15GeometryFactory16createLinearRingEPNS0_18CoordinateSequenceE () + 35 fffffd7ffe6761d2 GEOSGeom_createLinearRing_r () + 22 fffffd7ffe7325c3 LWGEOM2GEOS () + 1b3 fffffd7ffe7324e2 LWGEOM2GEOS () + d2 fffffd7ffe6edd45 POSTGIS2GEOS () + 25 fffffd7ffe6ee392 isvalidreason () + 42 00000000005ff4b0 ExecMakeFunctionResult () + 510 0000000000603ae9 ExecProject () + 159 0000000000603e4c ExecScan () + 10c 00000000005fcfad ExecProcNode () + 20d 00000000005fb979 standard_ExecutorRun () + a9 00000000006ce674 PortalRunSelect () + 94 00000000006cf018 PortalRun () + 2a8 00000000006cc193 exec_simple_query () + 273 00000000006cd3a4 PostgresMain () + 994 000000000068c4ec ServerLoop () + 90c 000000000068e2dc PostmasterMain () + 63c 000000000062d578 main () + 508 00000000004dfcbc _start () + 6c
Stack for check : concave_hull
core 'core.postgres.11222' of 11222: /opt/stig/idicsi-3.0/bin/amd64/postgres -D /tmp/postgis-2.0.329202 00000000001a6cdd ???????? () fffffd7ffed11f09 _SUNW_Unwind_RaiseException () + 46 fffffd7ffb7dc79e __cxa_throw () + 5e fffffd7ffb970bcf _ZN4geos6noding19FastNodingValidator10checkValidEv () + 23f fffffd7ffb99d8e5 _ZN4geos9operation7overlay9OverlayOp14computeOverlayENS2_6OpCodeE () + 4d5 fffffd7ffb99da31 _ZN4geos9operation7overlay9OverlayOp17getResultGeometryENS2_6OpCodeE () + 11 fffffd7ffb99da74 _ZN4geos9operation7overlay9OverlayOp9overlayOpEPKNS_4geom8GeometryES6_NS2_6OpCodeE () + 34 fffffd7ffb91b867 _ZN4geos4geom8BinaryOpINS_9operation7overlay9overlayOpEEESt8auto_ptrINS0_8GeometryEEPKS6_S9_T_ () + 1c7 fffffd7ffb919f28 _ZNK4geos4geom8Geometry5UnionEPKS1_ () + 1f8 fffffd7ffe674411 GEOSUnion_r () + 31 fffffd7ffe732dc6 lwgeom_union () + c6 fffffd7ffe6ed56a geomunion () + 5a 00000000005ff6cf ExecMakeFunctionResultNoSets () + bf fffffd7ffe585d00 exec_eval_expr () + 140 fffffd7ffe58698a exec_assign_expr () + 2a fffffd7ffe5882dd exec_stmts () + 24d fffffd7ffe588399 exec_stmts () + 309 fffffd7ffe58b6a9 exec_stmt_fori () + 129 fffffd7ffe588401 exec_stmts () + 371 fffffd7ffe588399 exec_stmts () + 309 fffffd7ffe588399 exec_stmts () + 309 fffffd7ffe588399 exec_stmts () + 309 fffffd7ffe589ffc exec_stmt_block () + 3ec fffffd7ffe58ac9c plpgsql_exec_function () + 1ac fffffd7ffe5805af plpgsql_call_handler () + ff 00000000005ff4b0 ExecMakeFunctionResult () + 510 00000000005fed3e ExecEvalFuncArgs () + 4e 00000000005ff322 ExecMakeFunctionResult () + 382 00000000005fed3e ExecEvalFuncArgs () + 4e 00000000005ff322 ExecMakeFunctionResult () + 382 00000000005fed3e ExecEvalFuncArgs () + 4e 00000000005ff322 ExecMakeFunctionResult () + 382 0000000000603ae9 ExecProject () + 159 0000000000603e4c ExecScan () + 10c 00000000005fcfbd ExecProcNode () + 21d 00000000005fb979 standard_ExecutorRun () + a9 00000000006ce674 PortalRunSelect () + 94 00000000006cf018 PortalRun () + 2a8 00000000006cc193 exec_simple_query () + 273 00000000006cd3a4 PostgresMain () + 994 000000000068c4ec ServerLoop () + 90c 000000000068e2dc PostmasterMain () + 63c 000000000062d578 main () + 508 00000000004dfcbc _start () + 6c
Stack for check : sharedpaths
core 'core.postgres.11342' of 11342: /opt/stig/idicsi-3.0/bin/amd64/postgres -D /tmp/postgis-2.0.329202 0000000000194b85 ???????? () fffffd7ffed11f09 _SUNW_Unwind_RaiseException () + 46 fffffd7ffb7dc79e __cxa_throw () + 5e fffffd7ffb9b2eb9 _ZN4geos9operation11sharedpaths13SharedPathsOp16checkLinealInputERKNS_4geom8GeometryE () + 179 fffffd7ffb9b309a _ZN4geos9operation11sharedpaths13SharedPathsOpC1ERKNS_4geom8GeometryES6_ () + 2a fffffd7ffb9b33dc _ZN4geos9operation11sharedpaths13SharedPathsOp13sharedPathsOpERKNS_4geom8GeometryES6_RSt6vectorIPNS3_10LineStringESaIS9_EESC_ () + 2 c fffffd7ffe681562 GEOSSharedPaths_r () + 82 fffffd7ffe733516 lwgeom_sharedpaths () + 86 fffffd7ffe6f1dfa ST_SharedPaths () + 5a 00000000005ff4b0 ExecMakeFunctionResult () + 510 0000000000602642 ExecEvalExprSwitchContext () + 22 0000000000676689 evaluate_expr () + 79 0000000000676984 simplify_function () + 264 0000000000677a17 eval_const_expressions_mutator () + 777 000000000062f11e expression_tree_mutator () + 3ae 0000000000677406 eval_const_expressions_mutator () + 166 000000000062f7d0 expression_tree_mutator () + a60 0000000000677406 eval_const_expressions_mutator () + 166 0000000000678610 eval_const_expressions () + 40 0000000000667a69 preprocess_expression () + 39 000000000066a782 subquery_planner () + 2f2 000000000066b0fd standard_planner () + dd 000000000066b279 planner () + 19 00000000006cbc9c pg_plan_query () + 3c 00000000006cbd50 pg_plan_queries () + 50 00000000006cc0b5 exec_simple_query () + 195 00000000006cd3a4 PostgresMain () + 994 000000000068c4ec ServerLoop () + 90c 000000000068e2dc PostmasterMain () + 63c 000000000062d578 main () + 508 00000000004dfcbc _start () + 6c
Stack for check : clean
core 'core.postgres.11424' of 11424: /opt/stig/idicsi-3.0/bin/amd64/postgres -D /tmp/postgis-2.0.329202 00000000001b6cad ???????? () fffffd7ffed11f09 _SUNW_Unwind_RaiseException () + 46 fffffd7ffb7dc79e __cxa_throw () + 5e fffffd7ffb923ea1 _ZN4geos4geom10LinearRing20validateConstructionEv () + 161 fffffd7ffb9247ea _ZN4geos4geom10LinearRingC1EPNS0_18CoordinateSequenceEPKNS0_15GeometryFactoryE () + 6a fffffd7ffb920115 _ZNK4geos4geom15GeometryFactory16createLinearRingEPNS0_18CoordinateSequenceE () + 35 fffffd7ffe6761d2 GEOSGeom_createLinearRing_r () + 22 fffffd7ffe7325c3 LWGEOM2GEOS () + 1b3 fffffd7ffe733cd8 lwgeom_make_valid () + 48 fffffd7ffe6f2618 ST_MakeValid () + 68 00000000005ff6cf ExecMakeFunctionResultNoSets () + bf 00000000005ff67f ExecMakeFunctionResultNoSets () + 6f 00000000005ff67f ExecMakeFunctionResultNoSets () + 6f 0000000000600563 ExecEvalAnd () + 53 0000000000603ae9 ExecProject () + 159 0000000000603e4c ExecScan () + 10c 00000000005fd01d ExecProcNode () + 27d 00000000005fb979 standard_ExecutorRun () + a9 00000000006ce674 PortalRunSelect () + 94 00000000006cf018 PortalRun () + 2a8 00000000006cc193 exec_simple_query () + 273 00000000006cd3a4 PostgresMain () + 994 000000000068c4ec ServerLoop () + 90c 000000000068e2dc PostmasterMain () + 63c 000000000062d578 main () + 508
Attachments (1)
Change History (6)
by , 12 years ago
Attachment: | stig-amd64-check.log added |
---|
comment:1 by , 12 years ago
Here are the requests that generate the failures
Request for check : tickets
LOG: processus serveur (PID 11102) a été arrêté par le signal 11 DÉTAIL: Le processus qui a échoué exécutait : SELECT '#168', ST_NPoints(g), ST_AsText(g), ST_isValidReason(g) FROM ( VALUES ('01060000C00100000001030000C00100000003000000E3D9107E234F5041A3DB66BC97A30F4122ACEF440DAF9440FFFFFFFFFFFFEFFFE3D9107E234F5041A3DB66BC97A30F4122ACEF440DAF9440FFFFFFFFFFFFEFFFE3D9107E234F5041A3DB66BC97A30F4122ACEF440DAF9440FFFFFFFFFFFFEFFF'::geometry) ) AS v(g); LOG: arrêt des autres processus serveur actifs ATTENTION: arrêt de la connexion à cause de l'arrêt brutal d'un autre processus serveur
Request for check : concave_hulls
LOG: processus serveur (PID 11222) a été arrêté par le signal 11 DÉTAIL: Le processus qui a échoué exécutait : SELECT 'ST_ConcaveHull MultiPolygon 0.95', ST_Area(ST_Intersection(geom,ST_ConcaveHull( geom, 0.95) )) = ST_Area(geom) As encloses_geom, (ST_Area(ST_ConvexHull(geom)) - ST_Area(ST_ConcaveHull(geom, 0.95))) < (0.95 * ST_Area(ST_ConvexHull(geom) ) ) As reached_target FROM ST_Union(ST_GeomFromText('POLYGON((175 150, 20 40, 50 60, 125 100, 175 150))'), ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20) ) As geom; LOG: arrêt des autres processus serveur actifs
Request for check : sharedpaths
LOG: processus serveur (PID 11342) a été arrêté par le signal 11 DÉTAIL: Le processus qui a échoué exécutait : select 't6', st_sharedpaths( '0101000020E6100000F771D98DE33826C00000000000004440'::geometry, '0103000020E61000000100000021000000F771D98DE33820C00000000000004E409610DB16675620C00EC34AD715B54D407AF7FF56CFAD20C008E817B00C6D4D40A8B32666C03B21C017D34B39A92A4D40C096A1DAC5FA21C03309329378F04C4050BE087388E322C06D501336B7C04C401412394E16ED23C061A149F23A9D4C402C7E04EB3A0D25C0A86740E260874C40F471D98DE33826C00000000000804C40BC65AE308C6427C0A86740E260874C40D5D179CDB08428C060A149F23A9D4C409A25AAA83E8E29C06C501336B7C04C402A4D114101772AC03209329378F04C4043308CB506362BC016D34B39A92A4D4072ECB2C4F7C32BC007E817B00C6D4D4057D3D704601B2CC00DC34AD715B54D40F771D98DE3382CC0FFFFFFFFFFFF4D4059D3D704601B2CC0F13CB528EA4A4E4076ECB2C4F7C32BC0F717E84FF3924E4049308CB506362BC0E82CB4C656D54E40324D114101772AC0CCF6CD6C870F4F40A325AAA83E8E29C093AFECC9483F4F40DFD179CDB08428C09F5EB60DC5624F40C665AE308C6427C05898BF1D9F784F40FD71D98DE33826C00000000000804F40347E04EB3A0D25C05898BF1D9F784F401B12394E16ED23C0A05EB60DC5624F4056BE087388E322C094AFECC9483 LOG: arrêt des autres processus serveur actifs
Request for check : clean
LOG: processus serveur (PID 11424) a été arrêté par le signal 11 DÉTAIL: Le processus qui a échoué exécutait : SELECT origin,caseno, st_equals(st_collectionextract(st_makevalid(orig),1), st_collectionextract(valid,1)) AND st_equals(st_collectionextract(st_makevalid(orig),2), st_collectionextract(valid,2)) AND st_equals(st_collectionextract(st_makevalid(orig),3), st_collectionextract(valid,3)), st_isvalid(st_makevalid(orig)), (st_isvaliddetail(orig)).valid FROM clean_cases; LOG: arrêt des autres processus serveur actifs
comment:2 by , 12 years ago
Keywords: | solaris segfault regress added |
---|
comment:3 by , 11 years ago
Milestone: | → PostGIS 2.0.5 |
---|
comment:4 by , 11 years ago
With some help from oslandia we were able to identify the root cause and build a working postgis 2.1 on solaris 11 x64.
It is a stack unwinding issue. On solaris, two incompatible mecanism exists, one in libgcc_s, the other one in libc. More info here
When building on solaris with gcc, precaution must be taken to ensure libgcc_s is dynamically loaded before libc. This was simply achieved by specifing -lgcc_s at the begining of the LDFLAG parameter :
configure: using LDFLAGS=-m64 -lgcc_s -I/usr/include/kerberosv5 -I/usr/jdk/latest/include -I/usr/jdk/latest/include/solaris -I/usr/include/ncurses -I/usr/include/pcre -Wl,-rpath,'$$ORIGIN'/../lib:'$$ORIGIN'/../../lib:${LIBDIR}
The result is, for instance :
edechaux@s11postgis:/opt/stig/idicsi_2.0/lib/postgresql$ ldd postgis-2.1.so libgcc_s.so.1 => /usr/lib/64/libgcc_s.so.1 libgeos_c.so.1 => /opt/stig/idicsi_2.0/lib/postgresql/../../lib/libgeos_c.so.1 libproj.so.0 => /opt/stig/idicsi_2.0/lib/postgresql/../../lib/libproj.so.0 libjson.so.0 => /usr/lib/64/libjson.so.0 libxml2.so.2 => /lib/64/libxml2.so.2 libc.so.1 => /lib/64/libc.so.1 libgeos-3.4.2.so => /opt/stig/idicsi_2.0/lib/libgeos-3.4.2.so libstdc++.so.6 => /usr/lib/64/libstdc++.so.6 libm.so.2 => /lib/64/libm.so.2 libpthread.so.1 => /lib/64/libpthread.so.1 libz.so.1 => /lib/64/libz.so.1 libsocket.so.1 => /lib/64/libsocket.so.1 libnsl.so.1 => /lib/64/libnsl.so.1 libmp.so.2 => /lib/64/libmp.so.2 libmd.so.1 => /lib/64/libmd.so.1 libcryptoutil.so.1 => /lib/64/libcryptoutil.so.1
It is also important the software stack (postgres, proj, geos and gdal) is also built with the same parameter.
I am in the process in documenting everything as it there is other lesser complex thing to fix.
PS: We have switched from Solaris 10 to Solaris 11, so I cannot say it also works for it.
comment:5 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Looks like a build issue, please document in the Wiki for others!
Full log file for make check