[postgis-tickets] [PostGIS] #3275: ST_GeomFromGeoJsonof invalid GeoJSON with missing type crashes server process
PostGIS
trac at osgeo.org
Fri Sep 11 18:46:03 PDT 2015
#3275: ST_GeomFromGeoJsonof invalid GeoJSON with missing type crashes server
process
-------------------------+---------------------------
Reporter: pdmaseberg | Owner: pramsey
Type: defect | Status: closed
Priority: medium | Milestone: PostGIS 2.1.9
Component: postgis | Version: 2.1.x
Resolution: worksforme | Keywords:
-------------------------+---------------------------
Comment (by pdmaseberg):
I got the latest version of libjson-c.so and used LD_PRELOAD and it still
crashes. I did get a stack trace of the crash and attached it. I am not
sure how I have can have the exact same version as your Ubuntu server and
have it crash while you cannot. I guess I don't follow how your libjson is
setup different. Anyway I will keep looking at it, just wanted to post
that stacktrace incase it is helpfully.
{{{
Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106 ../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) where
#0 strlen () at ../sysdeps/x86_64/strlen.S:106
#1 0x00007f5a2d5bd4ff in lwgeom_from_geojson () from
/usr/lib/liblwgeom-2.1.7.so
#2 0x00007f5a2d8237dd in geom_from_geojson () from
/usr/lib/postgresql/9.4/lib/postgis-2.1.so
#3 0x00007f5a4013d933 in ExecMakeFunctionResultNoSets
(fcache=0x7f5a419ae590, econtext=0x7f5a419aee20, isNull=0x7ffc072902dc "",
isDone=<optimized out>)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/executor/execQual.c:2026
#4 0x00007f5a40141e41 in ExecEvalExprSwitchContext
(expression=expression at entry=0x7f5a419ae590, econtext=<optimized out>,
isNull=isNull at entry=0x7ffc072902dc "", isDone=isDone at entry=0x0)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/executor/execQual.c:4360
#5 0x00007f5a401bce0e in evaluate_expr (expr=<optimized out>,
result_type=result_type at entry=258914,
result_typmod=result_typmod at entry=-1,
result_collation=result_collation at entry=0)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/util/clauses.c:4575
#6 0x00007f5a401be852 in evaluate_function (func_tuple=0x7f5a406847a8,
context=0x7ffc07290640, funcvariadic=0 '\000', args=0x7f5a419f8400,
input_collid=100, result_collid=0, result_typmod=-1,
result_type=258914, funcid=259353) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/util/clauses.c:4136
#7 simplify_function (funcid=259353, result_type=258914,
result_typmod=-1, result_collid=result_collid at entry=0,
input_collid=input_collid at entry=100, args_p=args_p at entry=0x7ffc07290458,
funcvariadic=funcvariadic at entry=0 '\000',
process_args=process_args at entry=1 '\001',
allow_non_const=allow_non_const at entry=1 '\001',
context=context at entry=0x7ffc07290640)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/util/clauses.c:3775
#8 0x00007f5a401bf8cc in eval_const_expressions_mutator
(node=0x7f5a419f8020, context=0x7ffc07290640) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/util/clauses.c:2459
#9 0x00007f5a401726cc in expression_tree_mutator
(node=node at entry=0x7f5a419f8070, mutator=mutator at entry=0x7f5a401bf010
<eval_const_expressions_mutator>, context=context at entry=0x7ffc07290640)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/nodes/nodeFuncs.c:2629
#10 0x00007f5a401bf422 in eval_const_expressions_mutator
(node=0x7f5a419f8070, context=0x7ffc07290640) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/util/clauses.c:3428
#11 0x00007f5a4017233b in expression_tree_mutator
(node=node at entry=0x7f5a419f7c48, mutator=mutator at entry=0x7f5a401bf010
<eval_const_expressions_mutator>, context=context at entry=0x7ffc07290640)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/nodes/nodeFuncs.c:2560
#12 0x00007f5a401bf422 in eval_const_expressions_mutator
(node=0x7f5a419f7c48, context=context at entry=0x7ffc07290640) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/util/clauses.c:3428
#13 0x00007f5a401c0950 in eval_const_expressions
(root=root at entry=0x7f5a419f81a0, node=<optimized out>) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/util/clauses.c:2301
#14 0x00007f5a401adae7 in preprocess_expression
(root=root at entry=0x7f5a419f81a0, expr=<optimized out>, kind=kind at entry=1)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/plan/planner.c:675
#15 0x00007f5a401b12b4 in subquery_planner
(glob=glob at entry=0x7f5a419f7a98, parse=parse at entry=0x7f5a419f7808,
parent_root=parent_root at entry=0x0, hasRecursion=hasRecursion at entry=0
'\000', tuple_fraction=0,
subroot=subroot at entry=0x7ffc07290748) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/plan/planner.c:423
#16 0x00007f5a401b18f1 in standard_planner (parse=0x7f5a419f7808,
cursorOptions=0, boundParams=0x0) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/optimizer/plan/planner.c:210
#17 0x00007f5a4022e9b4 in pg_plan_query (querytree=<optimized out>,
cursorOptions=cursorOptions at entry=0, boundParams=boundParams at entry=0x0)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/tcop/postgres.c:777
#18 0x00007f5a4022eaa4 in pg_plan_queries (querytrees=<optimized out>,
cursorOptions=cursorOptions at entry=0, boundParams=boundParams at entry=0x0)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/tcop/postgres.c:836
#19 0x00007f5a40230d0f in exec_simple_query (query_string=0x7f5a419f68d0
"SELECT ST_GeomFromGeoJson('{\"type\":\"Point\",\"crs\"\n
:{\"type\":\"\"},\"coordinates\":[-97.3361,37.6914]}');")
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/tcop/postgres.c:1001
#20 PostgresMain (argc=<optimized out>, argv=argv at entry=0x7f5a419726c0,
dbname=0x7f5a41972560 "client_store_dev", username=<optimized out>)
at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/tcop/postgres.c:4074
#21 0x00007f5a4000202d in BackendRun (port=0x7f5a419b2460) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/postmaster/postmaster.c:4164
#22 BackendStartup (port=0x7f5a419b2460) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/postmaster/postmaster.c:3829
#23 ServerLoop () at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/postmaster/postmaster.c:1597
#24 0x00007f5a401dc001 in PostmasterMain (argc=5, argv=<optimized out>) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/postmaster/postmaster.c:1244
#25 0x00007f5a40002d5d in main (argc=5, argv=0x7f5a41971760) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/main/main.c:228
}}}
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3275#comment:2>
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