Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault #416

Closed
mrueegg opened this issue Sep 17, 2012 · 28 comments
Closed

Segmentation fault #416

mrueegg opened this issue Sep 17, 2012 · 28 comments

Comments

@mrueegg
Copy link

mrueegg commented Sep 17, 2012

I occasionally get segmentation faults with OSRM (commit-id 7965e29, Sep 17, 2012) when I execute requests like '/viaroute?loc=lat1,lon1&loc=lat2,lon2' recently. Here's the stacktrace of the coredump:

Program terminated with signal 11, Segmentation fault.
#0 0x000000000042cc26 in AlternativeRouting<SearchEngineData<QueryEdge::EdgeData, StaticGraphQueryEdge::EdgeData > >::operator()(PhantomNodes const&, RawRouteData&) ()

(gdb) bt
#0 0x000000000042cc26 in AlternativeRouting<SearchEngineData<QueryEdge::EdgeData, StaticGraphQueryEdge::EdgeData > >::operator()(PhantomNodes const&, RawRouteData&) ()
#1 0x0000000000430f5b in ViaRoutePlugin::HandleRequest(RouteParameters const&, http::Reply&) ()
#2 0x000000000041e5ef in http::RequestHandler::handle_request(http::Request const&, http::Reply&) ()
#3 0x0000000000426378 in http::Connection::handleRead(boost::system::error_code const&, unsigned long) ()
#4 0x0000000000432563 in void boost::asio::detail::strand_service::dispatch<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long> >(boost::asio::detail::strand_service::strand_impl&, boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::_bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long>) ()
#5 0x000000000043303f in void boost::asio::detail::strand_service::dispatch<boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > >(boost::asio::detail::strand_service::strand_impl&, boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::_bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> (
)()> > >) ()
#6 0x0000000000433475 in void boost::asio::detail::asio_handler_invoke<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >(boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long> const&, boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >*) ()
#7 0x00000000004335fe in boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::bi::bind_t<void, boost::mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > >::do_complete(boost::asio::detail::task_io_service, boost::asio::detail::task_io_service_operation, boost::system::error_code, unsigned long) ()
#8 0x00000000004136e0 in boost::asio::detail::task_io_service::run(boost::system::error_code&) ()
#9 0x00000000004138d5 in boost::asio::io_service::run() ()
#10 0x00007ffe8fbfaba9 in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
#11 0x00007ffe90026efc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007ffe8ed7d89d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#13 0x0000000000000000 in ?? ()

@DennisOSRM
Copy link
Collaborator

If this is reproducable, please recompile with build information (scons --build=debug). It should return much more verbose stack traces.

@mrueegg
Copy link
Author

mrueegg commented Sep 17, 2012

Yes, it is indeed reproducable. This currently causes an outage of our web application. Any help would be much appreciated! Here's the more verbose stack trace:

#0 0x00007f92a6cac3a5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f92a6cafb0b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f92a6ca4d4d in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x000000000042a69c in AlternativeRouting<SearchEngineData<QueryEdge::EdgeData, StaticGraphQueryEdge::EdgeData > >::AlternativeRoutingStep (this=0x9aaf38, _forwardHeap=..., _backwardHeap=...,
middle=0x7f92a2b67518, _upperbound=0x7f92a2b67514, edgeBasedOffset=2407022, forwardDirection=false, searchSpaceIntersection=...)
at Plugins/../Descriptors/../DataStructures/../RoutingAlgorithms/AlternativePathRouting.h:318
#4 0x0000000000422087 in AlternativeRouting<SearchEngineData<QueryEdge::EdgeData, StaticGraphQueryEdge::EdgeData > >::operator() (this=0x9aaf38, phantomNodePair=..., rawRouteData=...)
at Plugins/../Descriptors/../DataStructures/../RoutingAlgorithms/AlternativePathRouting.h:91
#5 0x000000000041b605 in ViaRoutePlugin::HandleRequest (this=0x9aaea0, routeParameters=..., reply=...) at Plugins/ViaRoutePlugin.h:132
#6 0x0000000000414846 in http::RequestHandler::handle_request (this=0x9a9eb8, req=..., rep=...) at Server/RequestHandler.h:97
#7 0x0000000000416715 in http::Connection::handleRead (this=0x7f929c001560, e=..., bytes_transferred=179) at Server/Connection.h:72
#8 0x0000000000453996 in boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>::callboost::shared_ptr<http::Connection, boost::system::error_code const, unsigned long> (
this=0x7f92a2b683e0, u=..., b1=..., b2=@0x7f92a2b681f0) at /usr/include/boost/bind/mem_fn_template.hpp:271
#9 0x0000000000453913 in boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>::operator()boost::shared_ptr<http::Connection > (this=0x7f92a2b683e0, u=..., a1=...,
a2=179) at /usr/include/boost/bind/mem_fn_template.hpp:286
#10 0x0000000000453882 in boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()>::operator()<boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::_bi::list2<boost::system::error_code const&, unsigned long const&> > (this=0x7f92a2b683f0, f=..., a=...) at /usr/include/boost/bind/bind.hpp:392
#11 0x00000000004537fe in boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >::operator()<boost::system::error_code, unsigned long> (this=0x7f92a2b683e0, a1=..., a2=@0x7f92a2b68410) at /usr/include/boost/bind/bind_template.hpp:102
#12 0x00000000004537af in boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long>::operator() (this=0x7f92a2b683e0)
at /usr/include/boost/asio/detail/bind_handler.hpp:97
#13 0x0000000000453782 in boost::asio::asio_handler_invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long> > (function=...)
at /usr/include/boost/asio/handler_invoke_hook.hpp:64
#14 0x00000000004536c0 in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > (
function=..., context=...) at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#15 0x000000000045347f in boost::asio::detail::asio_handler_invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long> (function=..., this_handler=0x7f92a2b68570) at /usr/include/boost/asio/detail/bind_handler.hpp:132
#16 0x00000000004532cc in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long>, boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long> > (function=..., context=...) at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#17 0x0000000000452f6e in boost::asio::detail::strand_service::dispatch<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long> > (this=0x9aa110,
impl=@0x7f92a2b68778, handler=...) at /usr/include/boost/asio/detail/impl/strand_service.hpp:65
#18 0x0000000000452dc6 in boost::asio::io_service::strand::dispatch<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long> > (this=0x7f92a2b68770, handler=...)
at /usr/include/boost/asio/strand.hpp:159
#19 0x0000000000452b00 in boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >::operator()<boost::system::error_code, unsigned long> (this=0x7f92a2b68770,
arg1=..., arg2=@0x7f92a2b687b0) at /usr/include/boost/asio/detail/wrapped_handler.hpp:65
#20 0x000000000045278b in boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>::operator()
(this=0x7f92a2b68770) at /usr/include/boost/asio/detail/bind_handler.hpp:97
#21 0x0000000000451fd4 in boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >::operator() (this=0x7f92a2b68770) at /usr/include/boost/asio/detail/wrapped_handler.hpp:137
#22 0x0000000000451e11 in boost::asio::asio_handler_invoke<boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > > (function=...) at /usr/include/boost/asio/handler_invoke_hook.hpp:64
#23 0x0000000000451a83 in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > (function=..., context=...)
at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#24 0x00000000004512cc in boost::asio::detail::asio_handler_invoke<boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3<boost::---Type to continue, or q to quit---
bi::valueboost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> (
)()> > >, boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > (function=..., this_handler=0x7f92a2b68960) at /usr/include/boost/asio/detail/wrapped_handler.hpp:195
#25 0x0000000000450693 in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > > (function=..., context=...)
at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#26 0x000000000044f526 in boost::asio::detail::strand_service::dispatch<boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > > (this=0x9aa110, impl=@0x7f92a2b68ae8, handler=...)
at /usr/include/boost/asio/detail/impl/strand_service.hpp:97
#27 0x000000000044d5a4 in boost::asio::io_service::strand::dispatch<boost::asio::detail::rewrapped_handler<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > > (this=0x7f92a2b68ae0, handler=...) at /usr/include/boost/asio/strand.hpp:159
#28 0x000000000044a48f in boost::asio::detail::asio_handler_invoke<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > (function=..., this_handler=0x7f92a2b68ae0) at /usr/include/boost/asio/detail/wrapped_handler.hpp:170
#29 0x000000000044521b in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >, boost::system::error_code, unsigned long>, boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > > (function=..., context=...)
at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#30 0x000000000043f855 in boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::Connection, boost::system::error_code const&, unsigned long>, boost::bi::list3boost::bi::value<boost::shared_ptr<http::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > >::do_complete (owner=0x9a9f70, base=0xbaeda0) at /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp:106
#31 0x000000000040e96d in boost::asio::detail::task_io_service_operation::complete (this=0xbaeda0, owner=...) at /usr/include/boost/asio/detail/task_io_service_operation.hpp:35
#32 0x000000000041067f in boost::asio::detail::task_io_service::do_one (this=0x9a9f70, lock=..., this_idle_thread=0x7f92a2b68c90) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:278
#33 0x0000000000410256 in boost::asio::detail::task_io_service::run (this=0x9a9f70, ec=...) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:130
#34 0x0000000000410a69 in boost::asio::io_service::run (this=0x9a9e78) at /usr/include/boost/asio/impl/io_service.ipp:57
#35 0x0000000000458f24 in boost::_mfi::mf0<unsigned long, boost::asio::io_service>::operator() (this=0x9af678, p=0x9a9e78) at /usr/include/boost/bind/mem_fn_template.hpp:49
#36 0x00000000004583a7 in boost::_bi::list1boost::_bi::value<boost::asio::io_service* >::operator()<unsigned long, boost::_mfi::mf0<unsigned long, boost::asio::io_service>, boost::_bi::list0> (
this=0x9af688, f=..., a=...) at /usr/include/boost/bind/bind.hpp:243
#37 0x0000000000456af9 in boost::_bi::bind_t<unsigned long, boost::_mfi::mf0<unsigned long, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > >::operator() (
this=0x9af678) at /usr/include/boost/bind/bind_template.hpp:20
#38 0x00000000004545d0 in boost::detail::thread_data<boost::_bi::bind_t<unsigned long, boost::_mfi::mf0<unsigned long, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > > >::run (this=0x9af4f0) at /usr/include/boost/thread/detail/thread.hpp:61
#39 0x00007f92a7bd4ba9 in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
#40 0x00007f92a8000efc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#41 0x00007f92a6d5789d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#42 0x0000000000000000 in ?? (

@DennisOSRM
Copy link
Collaborator

Can you give me a link to the source osm data and the corresponding query?

@DennisOSRM
Copy link
Collaborator

Trying to reproduce this one issue as of now.

@DennisOSRM
Copy link
Collaborator

Cannot reproduce this one my installation. Also works on the demo site (http://map.project-osrm.org/1m0). Both locations get matched to the same point in the road network.

@DennisOSRM
Copy link
Collaborator

Further investigation of the stack trace shows that it is complaining about a way segment without any length. This should not happen at all. Are the data files generated with the same version than osrm-routed?

@mrueegg
Copy link
Author

mrueegg commented Sep 17, 2012

The problem does not immedately occur, only if I do requests several times in a row. I will make sure I use the same version for generating the osrm files as the osrm-routed executable.

@DennisOSRM
Copy link
Collaborator

Rather strange. I have been hammering the same request for a couple 1000 times now at the test installation and it did not crash.

@mrueegg
Copy link
Author

mrueegg commented Sep 18, 2012

You were right. I somehow had some osrm files that have been created by and old OSRM installation around. But now I have a different issue. For certain coordinates, I get an internal server error when I use viaroute. Example:

[server error] code: vector::_M_range_check, uri: /viaroute?loc=47.237777,8.824555&loc=47.232532,8.828761

What's the issue here? Do you need a stacktrace?

@DennisOSRM
Copy link
Collaborator

Works on my end, too. A stacktrace may be of help. Could you give me your list of queries?

@mrueegg
Copy link
Author

mrueegg commented Sep 18, 2012

Here are some more examples:

/viaroute?loc=47.236349,8.824212&loc=47.232853,8.826519
/viaroute?loc=47.236349,8.824212&loc=47.232853,8.826529
/viaroute?loc=47.237777,8.824555&loc=47.232532,8.828761

They all result in an internal server error:

[info Server/RequestHandler.h:61] 18-09-2012 13:40:15 - curl/7.27.0 /viaroute?loc=47.236349,8.824212&loc=47.232853,8.826519
[server error] code: vector::_M_range_check, uri: /viaroute?loc=47.236349,8.824212&loc=47.232853,8.826519
[info Server/RequestHandler.h:61] 18-09-2012 13:40:33 - curl/7.27.0 /viaroute?loc=47.236349,8.824212&loc=47.232853,8.826529
[server error] code: vector::_M_range_check, uri: /viaroute?loc=47.236349,8.824212&loc=47.232853,8.826529
[info Server/RequestHandler.h:61] 18-09-2012 13:40:52 - curl/7.27.0 /viaroute?loc=47.237777,8.824555&loc=47.232532,8.828761
[server error] code: vector::_M_range_check, uri: /viaroute?loc=47.237777,8.824555&loc=47.232532,8.828761

And here is one that at least yields a status message:

curl "viaroute?loc=47.236787,8.830005&loc=47.237530,8.821991"
{"version": 0.3,"status":207,"status_message": "Cannot find route between points","route_geometry": "","route_instructions": [],"route_summary":{"total_distance":0,"total_time":214748365,"start_point":"","end_point":""},"alternative_geometries": [],"alternative_instructions":[],"alternative_summaries":[],"route_names":["",""],"alternative_route_names":[["",""]],"via_points":[],"hint_data": {"checksum":1556744026, "locations": ["In0XAAAAAAAAAAAAYwAAAAAAAAAAAAAAmBRIAAB5DQA", "JngXAGE7AAAeAAAAagAAAFwXocqFRcw_HxRIABR2DQB"]},"transactionId": "OSRM Routing Engine JSON Descriptor (v0.3)

What do you think?

@DennisOSRM
Copy link
Collaborator

Sorry, still not able to reproduce this bug.

@emiltin
Copy link
Contributor

emiltin commented Sep 18, 2012

what OS are you on?

@mrueegg
Copy link
Author

mrueegg commented Sep 18, 2012

Ubuntu 11.10. It's really strange. I did not experience any issues when I was working with an older version of OSRM (the one with the old interface "/viaroute&start=47.236349,8.824212&dest=47.236349,8.824212")...

@DennisOSRM
Copy link
Collaborator

On 18.09.2012 14:15, Michael Rüegg wrote:

Ubuntu 11.10. It's really strange. I did not experience any issues when
I was working with an older version of OSRM (the one with the old
interface "/viaroute&start=47.236349,8.824212&dest=47.236349,8.824212")...

Just to verify, the binaries are compiled from the latest and greatest
version from master branch?

@mrueegg
Copy link
Author

mrueegg commented Sep 18, 2012

Yes, from last Thursday:

$ git log -1
commit 837e91f
Merge: 8050fec 3e0b4ee
Author: DennisOSRM [email protected]
Date: Thu Sep 13 14:12:55 2012 +0200

Merge branch 'master' of https://[email protected]/DennisOSRM/Project-OSRM.git

@emiltin
Copy link
Contributor

emiltin commented Sep 18, 2012

did you try downloading fresh osm data?

@mrueegg
Copy link
Author

mrueegg commented Sep 18, 2012

Yes. I've just pulled the latest changes from master, got the latest osm file, and did the OSRM stuff again. Any ideas? Any help is much appreciated!

$ git pull
$ scons -c
$ scons
$ wget download.geofabrik.de/osm/europe/switzerland.osm.pbf
$ ./osrm-extract switzerland.osm.pbf
[info extractor.cpp:58] extracting data from input file switzerland.osm.pbf
[LUA] Initializing LUA engine
[info extractor.cpp:164] Using 2 GB of RAM for buffers
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-MSG] 1 disks are allocated, total space: 25000 MiB
Parse Data Thread Finished
[extractor] parsing finished after 9.53674e-07 seconds
[extractor] Sorting used nodes ... ok, after 0.505036s
[extractor] Erasing duplicate nodes ... ok, after 0.1894s
[extractor] Sorting all nodes ... ok, after 4.92088s
[extractor] Sorting used ways ... ok, after 0.227981s
[extractor] Sorting restrctns. by from... ok, after 0.294865s
[extractor] Fixing restriction starts ... ok, after 0.395821s
[extractor] Sorting restrctns. by to ... ok, after 0.0669751s
[extractor] Fixing restriction ends ... ok, after 0.0293729s
[info Extractor/ExtractionContainers.cpp:130] usable restrictions: 1280
[extractor] Confirming/Writing used nodes ... ok, after 3.67025s
[extractor] setting number of nodes ... ok
[extractor] Sorting edges by start ... ok, after 3.14621s
[extractor] Setting start coords ... ok, after 5.87681s
[extractor] Sorting edges by target ... ok, after 3.11902s
[extractor] Setting target coords ... ok, after 7.3786s
[extractor] setting number of edges ... ok
[extractor] writing street name index ... ok, after 0.00780797s
[info Extractor/ExtractionContainers.cpp:308] Processed 1974386 nodes and 2050987 edges
[info extractor.cpp:190] [extractor] finished.

$ ./osrm-prepare switzerland.osrm switzerland.osrm.restrictions
[info createHierarchy.cpp:86] Loading SRTM from/to /opt/storage/srtm/Eurasia
[info createHierarchy.cpp:89] Using restrictions from file: switzerland.osrm.restrictions
[info Util/GraphLoader.h:190] Graph loaded ok and has 2050711 edges
[info createHierarchy.cpp:117] 1280 restrictions, 0 bollard nodes, 2048 traffic lights
[info createHierarchy.cpp:153] Generating edge-expanded graph representation
[info Contractor/EdgeBasedGraphFactory.cpp:173] Identifying small components
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info Contractor/EdgeBasedGraphFactory.cpp:227] identified: 5619 many components
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info Contractor/EdgeBasedGraphFactory.cpp:325] Node-based graph contains 8576687 edges
[info Contractor/EdgeBasedGraphFactory.cpp:327] Edge-based graph skipped 1578 turns, defined by 1280 restrictions.
[info Contractor/EdgeBasedGraphFactory.cpp:328] Generated 3926260 edge based nodes
[info createHierarchy.cpp:171] writing node map ...
[info createHierarchy.cpp:180] writing info on original edges
[info createHierarchy.cpp:200] building grid ...
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-MSG] 1 disks are allocated, total space: 25000 MiB
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info DataStructures/NNGrid.h:109] sorting grid data consisting of 4121280 edges...
[info DataStructures/NNGrid.h:112] finished sorting after 5.07677s
writing data .... 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
using hardware base sse computation
[info createHierarchy.cpp:207] CRC32 based checksum is 2567519856
[info createHierarchy.cpp:213] initializing contractor
merged 3134 edges out of 9300854
contractor finished initalization
Contractor is using 4 threads
initializing elimination PQ ...ok
preprocessing .... 10% . 20% . 30% . 40% . 50% . 60% . [flush 2714117 nodes] 70% . 80% . 90% . 100%
[info createHierarchy.cpp:217] Contraction took 46.5985 sec
[info Contractor/Contractor.h:441] Getting edges of minimized graph
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[info Contractor/Contractor.h:469] Renumbered edges of minimized graph, freeing space
[info Contractor/Contractor.h:472] Loading temporary edges
[info Contractor/Contractor.h:499] CH has 10388860 edges
[info createHierarchy.cpp:227] Building Node Array
[info createHierarchy.cpp:231] Serializing compacted graph
[info createHierarchy.cpp:283] Expansion : 455800 nodes/sec and 906404 edges/sec
[info createHierarchy.cpp:284] Contraction: 906404 nodes/sec and 152668 edges/sec
[info createHierarchy.cpp:289] finished preprocessing

$ kill $(ps -ef | grep [Rr]outed | grep -v grep | awk '{print $2}')

$ ./osrm-routed
[server] starting up engines, saved at Mon Sep 17 07:39:32 2012
[server] http 1.1 compression handled by zlib version 1.2.3.4
[info Server/DataStructures/QueryObjectsStorage.cpp:26] loading graph data
[info Server/DataStructures/QueryObjectsStorage.cpp:33] Data checksum is 2567519856
[info Server/DataStructures/QueryObjectsStorage.cpp:49] Loading auxiliary information
[info Server/DataStructures/QueryObjectsStorage.cpp:57] Loading names index
[info Server/DataStructures/QueryObjectsStorage.cpp:74] All query data structures loaded
[handler] registering plugin hello
[handler] registering plugin locate
[handler] registering plugin nearest
[handler] registering plugin timestamp
[handler] registering plugin viaroute

$ curl "http://localhost:5000/viaroute?loc=47.236349,8.824212&loc=47.232853,8.826529"

<title>Internal Server Error</title>

500 Internal Server Error

[server] running and waiting for requests

@DennisOSRM
Copy link
Collaborator

Could you make either the OSM input file you used available or the .osrm data files you have been using?

@mrueegg
Copy link
Author

mrueegg commented Sep 18, 2012

The OSM file I use is publicly available from http://download.geofabrik.de/osm/europe/switzerland.osm.pbf

@DennisOSRM
Copy link
Collaborator

Could you make your .osrm files available?

@emiltin
Copy link
Contributor

emiltin commented Sep 18, 2012

what's in your server.ini file?

@mrueegg
Copy link
Author

mrueegg commented Sep 18, 2012

My server.ini looks like this:

Threads = 8
IP = 0.0.0.0
Port = 5000

hsgrData=switzerland.osrm.hsgr
nodesData=switzerland.osrm.nodes
ramIndex=switzerland.osrm.ramIndex
fileIndex=switzerland.osrm.fileIndex
namesData=switzerland.osrm.names

@mrueegg
Copy link
Author

mrueegg commented Sep 18, 2012

If it helps I can also provide the osrm files. But they are around ~100 MB big...

@emiltin
Copy link
Contributor

emiltin commented Sep 18, 2012

is your server.ini file not missing the edges file?

edgesData=switzerland.osrm.edges

@karme
Copy link

karme commented Sep 18, 2012

Michael Rüegg [email protected] writes:

My server.ini looks like this:

Threads = 8
IP = 0.0.0.0
Port = 5000

hsgrData=switzerland.osrm.hsgr
nodesData=switzerland.osrm.nodes
ramIndex=switzerland.osrm.ramIndex
fileIndex=switzerland.osrm.fileIndex
namesData=switzerland.osrm.names

at least edgesData= is missing
see also #243
#243

@mrueegg
Copy link
Author

mrueegg commented Sep 18, 2012

You're right. With edgesData it works. Thank you very much! Might be something that could be circumvented by yielding an appropriate error message.

@emiltin
Copy link
Contributor

emiltin commented Sep 18, 2012

openen an issue reagaring error messages. see #420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants