Bug#767277: python-mapnik: python datasources crash

Alexander Clausen alex at gc-web.de
Wed Oct 29 09:41:06 UTC 2014


Package: python-mapnik
Version: 2.2.0+ds1-7+b2
Severity: normal

Dear Maintainer,

trying to use a Python datasource in mapnik leads to a segmentation fault. The
simplest way to reproduce is running one of the examples from the source tree
in plugins/input/python/examples/*.py. 

The examples work fine on a wheezy installation with python-mapnik from wheezy-backports
(currently version 2.2.0+ds1-7~bpo70+1)

gdb backtrace:

Program received signal SIGSEGV, Segmentation fault.
subtype_dealloc.lto_priv () at ../Objects/typeobject.c:955
955     ++ tstate->trash_delete_nesting;
(gdb) bt
#0  subtype_dealloc.lto_priv () at ../Objects/typeobject.c:955
#1  0x00007ffff5969022 in boost::python::converter::shared_ptr_deleter::operator()(void const*) ()
   from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
#2  0x00007ffff5dea1a6 in boost::shared_ptr<mapnik::feature_impl>::operator=(boost::shared_ptr<mapnik::feature_impl> const&) () from /usr/lib/libmapnik.so.2.2
#3  0x00007ffff5e05736 in mapnik::feature_style_processor<mapnik::agg_renderer<mapnik::image_32> >::render_style(mapnik::layer const&, mapnik::agg_renderer<mapnik::image_32>&, mapnik::feature_type_style const*, mapnik::rule_cache const&, std::string const&, boost::shared_ptr<mapnik::Featureset>, mapnik::proj_transform const&) ()
   from /usr/lib/libmapnik.so.2.2
#4  0x00007ffff5e0f71c in mapnik::feature_style_processor<mapnik::agg_renderer<mapnik::image_32> >::apply_to_layer(mapnik::layer const&, mapnik::agg_renderer<mapnik::image_32>&, mapnik::projection const&, double, double, unsigned int, unsigned int, mapnik::box2d<double> const&, int, std::set<std::string, std::less<std::string>, std::allocator<std::string> >&) () from /usr/lib/libmapnik.so.2.2
#5  0x00007ffff5e1078e in mapnik::feature_style_processor<mapnik::agg_renderer<mapnik::image_32> >::apply(double)
    () from /usr/lib/libmapnik.so.2.2
#6  0x00007ffff683f6ea in render(mapnik::Map const&, mapnik::image_32&, double, unsigned int, unsigned int) ()
   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so
#7  0x00007ffff683f95a in render_to_file1(mapnik::Map const&, std::string const&, std::string const&) ()
   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so
#8  0x00007ffff684f390 in boost::python::detail::caller_arity<3u>::impl<void (*)(mapnik::Map const&, std::string const&, std::string const&), boost::python::default_call_policies, boost::mpl::vector4<void, mapnik::Map const&, std::string const&, std::string const&> >::operator()(_object*, _object*) ()
   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so
#9  0x00007ffff595d0ed in boost::python::objects::function::call(_object*, _object*) const ()
   from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
#10 0x00007ffff595d308 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
#11 0x00007ffff59679b3 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
    () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
#12 0x00007ffff6846613 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::runtime_error, void (*)(std::runtime_error const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::runtime_error const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so
#13 0x00007ffff5967988 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
    () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
#14 0x00007ffff68465c3 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<mapnik::value_error, void (*)(mapnik::value_error const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(mapnik::value_error const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so
#15 0x00007ffff5967988 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
    () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
#16 0x00007ffff6846573 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::out_of_range, void (*)(std::out_of_range const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::out_of_range const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) () from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so
#17 0x00007ffff5967988 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const
    () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
#18 0x00007ffff6846523 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<std::exception, void (*)(std::exception const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(std::exception const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) () from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so
#19 0x00007ffff596775d in boost::python::handle_exception_impl(boost::function0<void>) ()
   from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
#20 0x00007ffff595bae9 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0
#21 0x00000000004e193b in PyObject_Call (kw=<optimized out>, arg=<optimized out>, func=<optimized out>)
    at ../Objects/abstract.c:2529
#22 do_call (nk=<optimized out>, na=<optimized out>, pp_stack=<optimized out>, func=<optimized out>)
    at ../Python/ceval.c:4239
#23 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/ceval.c:4044
#24 PyEval_EvalFrameEx () at ../Python/ceval.c:2667
#25 0x00000000004def64 in PyEval_EvalCodeEx () at ../Python/ceval.c:3253
#26 0x0000000000518d7f in PyEval_EvalCode (
    locals={'JOIN_STYLE': <type at remote 0xba0ff0>, 'layer': <Layer at remote 0x7fffe1170d60>, 'Polygon': <type at remote 0xc0da60>, 'asMultiPolygon': <function at remote 0x7fffe11729b0>, 'shape': <function at remote 0x7fffe1172ed8>, 'asPoint': <function at remote 0x7fffe115aaa0>, 'MultiLineString': <type at remote 0xc0fea0>, 'mapnik': <module at remote 0x7ffff7ea2980>, 'MultiPolygon': <type at remote 0xc11850>, 'asShape': <function at remote 0x7fffe1172f50>, 'asLinearRing': <function at remote 0x7fffe115aa28>, 'asLineString': <function at remote 0x7fffe11616e0>, '__package__': None, 'asMultiLineString': <function at remote 0x7fffe1172578>, '__doc__': None, 'CAP_STYLE': <type at remote 0xbbb460>, '__builtins__': <module at remote 0x7ffff7fabb08>, '__file__': 'simple_points.py', 'asMultiPoint': <function at remote 0x7fffe116de60>, 'mapping': <function at remote 0x7fffe1177050>, '__name__': '__main__', 'ds': <Datasource at remote 0x7fffe1177410>, 'LinearRing': <type at remote 0xc0c3a0
 >, 'box': <function at remote 0x7fffe...(truncated), 
    globals={'JOIN_STYLE': <type at remote 0xba0ff0>, 'layer': <Layer at remote 0x7fffe1170d60>, 'Polygon': <type at remote 0xc0da60>, 'asMultiPolygon': <function at remote 0x7fffe11729b0>, 'shape': <function at remote 0x7fffe1172ed8>, 'asPoint': <function at remote 0x7fffe115aaa0>, 'MultiLineString': <type at remote 0xc0fea0>, 'mapnik': <module at remote 0x7ffff7ea2980>, 'MultiPolygon': <type at remote 0xc11850>, 'asShape': <function at remote 0x7fffe1172f50>, 'asLinearRing': <function at remote 0x7fffe115aa28>, 'asLineString': <function at remote 0x7fffe11616e0>, '__package__': None, 'asMultiLineString': <function at remote 0x7fffe1172578>, '__doc__': None, 'CAP_STYLE': <type at remote 0xbbb460>, '__builtins__': <module at remote 0x7ffff7fabb08>, '__file__': 'simple_points.py', 'asMultiPoint': <function at remote 0x7fffe116de60>, 'mapping': <function at remote 0x7fffe1177050>, '__name__': '__main__', 'ds': <Datasource at remote 0x7fffe1177410>, 'LinearRing': <type at remote 0xc0c3a
 0>, 'box': <function at remote 0x7fffe...(truncated), co=0x7ffff7e892b0) at ../Python/ceval.c:667
#27 run_mod.lto_priv () at ../Python/pythonrun.c:1371
#28 0x000000000050eeda in PyRun_FileExFlags () at ../Python/pythonrun.c:1357
#29 0x000000000050dbf7 in PyRun_SimpleFileExFlags () at ../Python/pythonrun.c:949
#30 0x00000000004b0b5b in Py_Main () at ../Modules/main.c:640
#31 0x00007ffff6f14b45 in __libc_start_main (main=0x4b0430 <main>, argc=2, argv=0x7fffffffe628, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe618)
    at libc-start.c:287
#32 0x00000000004b0352 in _start ()
(gdb) inf loc
type = 0xa7e500
base = <optimized out>
basedealloc = <optimized out>
tstate = 0x0
(gdb) list
950 
951     /* UnTrack and re-Track around the trashcan macro, alas */
952     /* See explanation at end of function for full disclosure */
953     PyObject_GC_UnTrack(self);
954     ++_PyTrash_delete_nesting;
955     ++ tstate->trash_delete_nesting;
956     Py_TRASHCAN_SAFE_BEGIN(self);
957     --_PyTrash_delete_nesting;
958     -- tstate->trash_delete_nesting;
959     /* DO NOT restore GC tracking at this point.  weakref callbacks
(gdb)

Thanks,
Alexander Clausen

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-mapnik depends on:
ii  libboost-python1.55.0  1.55.0+dfsg-3
ii  libboost-thread1.55.0  1.55.0+dfsg-3
ii  libc6                  2.19-12
ii  libgcc1                1:4.9.1-18
ii  libmapnik2.2           2.2.0+ds1-7+b2
ii  libstdc++6             4.9.1-18
ii  python                 2.7.8-1
ii  python-cairo           1.8.8-1+b2

python-mapnik recommends no packages.

python-mapnik suggests no packages.

-- no debconf information



More information about the Pkg-grass-devel mailing list