<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">This is a bug in Boost that upstream has still not fixed.<div><br></div><div>You need to build boost_python with this patch: <a href="https://github.com/mapnik/mapnik-packaging/blob/master/osx/patches/boost_python_shared_ptr_gil.diff">https://github.com/mapnik/mapnik-packaging/blob/master/osx/patches/boost_python_shared_ptr_gil.diff</a></div><div><br></div><div>Dane</div><div><br><div><div>On Oct 29, 2014, at 5:41 AM, Alexander Clausen <<a href="mailto:alex@gc-web.de">alex@gc-web.de</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Package: python-mapnik<br>Version: 2.2.0+ds1-7+b2<br>Severity: normal<br><br>Dear Maintainer,<br><br>trying to use a Python datasource in mapnik leads to a segmentation fault. The<br>simplest way to reproduce is running one of the examples from the source tree<br>in plugins/input/python/examples/*.py. <br><br>The examples work fine on a wheezy installation with python-mapnik from wheezy-backports<br>(currently version 2.2.0+ds1-7~bpo70+1)<br><br>gdb backtrace:<br><br>Program received signal SIGSEGV, Segmentation fault.<br>subtype_dealloc.lto_priv () at ../Objects/typeobject.c:955<br>955     ++ tstate->trash_delete_nesting;<br>(gdb) bt<br>#0  subtype_dealloc.lto_priv () at ../Objects/typeobject.c:955<br>#1  0x00007ffff5969022 in boost::python::converter::shared_ptr_deleter::operator()(void const*) ()<br>   from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0<br>#2  0x00007ffff5dea1a6 in boost::shared_ptr<mapnik::feature_impl>::operator=(boost::shared_ptr<mapnik::feature_impl> const&) () from /usr/lib/libmapnik.so.2.2<br>#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&) ()<br>   from /usr/lib/libmapnik.so.2.2<br>#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<br>#5  0x00007ffff5e1078e in mapnik::feature_style_processor<mapnik::agg_renderer<mapnik::image_32> >::apply(double)<br>    () from /usr/lib/libmapnik.so.2.2<br>#6  0x00007ffff683f6ea in render(mapnik::Map const&, mapnik::image_32&, double, unsigned int, unsigned int) ()<br>   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so<br>#7  0x00007ffff683f95a in render_to_file1(mapnik::Map const&, std::string const&, std::string const&) ()<br>   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so<br>#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*) ()<br>   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so<br>#9  0x00007ffff595d0ed in boost::python::objects::function::call(_object*, _object*) const ()<br>   from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0<br>#10 0x00007ffff595d308 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0<br>#11 0x00007ffff59679b3 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const<br>    () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0<br>#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&) ()<br>   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so<br>#13 0x00007ffff5967988 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const<br>    () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0<br>#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&) ()<br>   from /usr/lib/python2.7/dist-packages/mapnik/_mapnik.so<br>#15 0x00007ffff5967988 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const<br>    () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0<br>#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<br>#17 0x00007ffff5967988 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const<br>    () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0<br>#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<br>#19 0x00007ffff596775d in boost::python::handle_exception_impl(boost::function0<void>) ()<br>   from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0<br>#20 0x00007ffff595bae9 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.55.0<br>#21 0x00000000004e193b in PyObject_Call (kw=<optimized out>, arg=<optimized out>, func=<optimized out>)<br>    at ../Objects/abstract.c:2529<br>#22 do_call (nk=<optimized out>, na=<optimized out>, pp_stack=<optimized out>, func=<optimized out>)<br>    at ../Python/ceval.c:4239<br>#23 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/ceval.c:4044<br>#24 PyEval_EvalFrameEx () at ../Python/ceval.c:2667<br>#25 0x00000000004def64 in PyEval_EvalCodeEx () at ../Python/ceval.c:3253<br>#26 0x0000000000518d7f in PyEval_EvalCode (<br>    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<br><blockquote type="cite">, 'box': <function at remote 0x7fffe...(truncated), <br></blockquote>    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<br> 0>, 'box': <function at remote 0x7fffe...(truncated), co=0x7ffff7e892b0) at ../Python/ceval.c:667<br>#27 run_mod.lto_priv () at ../Python/pythonrun.c:1371<br>#28 0x000000000050eeda in PyRun_FileExFlags () at ../Python/pythonrun.c:1357<br>#29 0x000000000050dbf7 in PyRun_SimpleFileExFlags () at ../Python/pythonrun.c:949<br>#30 0x00000000004b0b5b in Py_Main () at ../Modules/main.c:640<br>#31 0x00007ffff6f14b45 in __libc_start_main (main=0x4b0430 <main>, argc=2, argv=0x7fffffffe628, <br>    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe618)<br>    at libc-start.c:287<br>#32 0x00000000004b0352 in _start ()<br>(gdb) inf loc<br>type = 0xa7e500<br>base = <optimized out><br>basedealloc = <optimized out><br>tstate = 0x0<br>(gdb) list<br>950 <br>951     /* UnTrack and re-Track around the trashcan macro, alas */<br>952     /* See explanation at end of function for full disclosure */<br>953     PyObject_GC_UnTrack(self);<br>954     ++_PyTrash_delete_nesting;<br>955     ++ tstate->trash_delete_nesting;<br>956     Py_TRASHCAN_SAFE_BEGIN(self);<br>957     --_PyTrash_delete_nesting;<br>958     -- tstate->trash_delete_nesting;<br>959     /* DO NOT restore GC tracking at this point.  weakref callbacks<br>(gdb)<br><br>Thanks,<br>Alexander Clausen<br><br>-- System Information:<br>Debian Release: jessie/sid<br>  APT prefers unstable<br>  APT policy: (500, 'unstable'), (1, 'experimental')<br>Architecture: amd64 (x86_64)<br>Foreign Architectures: i386<br><br>Kernel: Linux 3.16-2-amd64 (SMP w/4 CPU cores)<br>Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)<br>Shell: /bin/sh linked to /bin/dash<br><br>Versions of packages python-mapnik depends on:<br>ii  libboost-python1.55.0  1.55.0+dfsg-3<br>ii  libboost-thread1.55.0  1.55.0+dfsg-3<br>ii  libc6                  2.19-12<br>ii  libgcc1                1:4.9.1-18<br>ii  libmapnik2.2           2.2.0+ds1-7+b2<br>ii  libstdc++6             4.9.1-18<br>ii  python                 2.7.8-1<br>ii  python-cairo           1.8.8-1+b2<br><br>python-mapnik recommends no packages.<br><br>python-mapnik suggests no packages.<br><br>-- no debconf information<br><br></blockquote></div><br></div></body></html>