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

FindPhantomNodeForCoordinate Segmentation fault #660

Closed
drieks opened this issue Jul 2, 2013 · 13 comments
Closed

FindPhantomNodeForCoordinate Segmentation fault #660

drieks opened this issue Jul 2, 2013 · 13 comments

Comments

@drieks
Copy link

drieks commented Jul 2, 2013

Hello,

I always get an segmentation fault when trying to use osrm-routed with latest planet database. When I use the map of germany everything works fine.

I build osrm from master ("Merging develop branch into master for v0.3.4 release" was the last commit). The Build System was an Amazon EC2 (m2.4xlarge) default Ubuntu 12.04 System with all Updates and Packages needed for compilation installed. I just called "cmake ." and "make"

Then I downloaded this File:
wget http://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/pbf/planet-latest.osm.pbf

.stxxl:
disk=/mnt/stxxl,500000,syscall

And called:
./osrm-extract /home/osrm/data/planet-latest.osm.pbf
./osrm-prepare /home/osrm/data/planet-latest.osrm /home/osrm/data/planet-latest.osrm.restrictions

I also created a timestamp:
date +%s > /home/osrm/data/planet-latest.osrm.timestamp

server.ini:
Threads = 8
IP = 0.0.0.0
Port = 5000

hsgrData=/home/osrm/data/planet-latest.osrm.hsgr
nodesData=/home/osrm/data/planet-latest.osrm.nodes
edgesData=/home/osrm/data/planet-latest.osrm.edges
ramIndex=/home/osrm/data/planet-latest.osrm.ramIndex
fileIndex=/home/osrm/data/planet-latest.osrm.fileIndex
namesData=/home/osrm/data/planet-latest.osrm.names
timestamp=/home/osrm/data/planet-latest.osrm.timestamp

Then, when i start osrm-routed:
gdb ./osrm-routed
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://bugs.launchpad.net/gdb-linaro/...
Reading symbols from /home/osrm/osrm/osrm-routed...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/osrm/osrm/osrm-routed
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

[server] starting up engines, saved at Mon Jul 1 10:45:08 2013
[server] http 1.1 compression handled by zlib version 1.2.3.4
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:34] loading graph data
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:47] Data checksum is 2559258416
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:53] Loading Timestamp
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:65] Loading auxiliary information
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:75] Loading names index
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:93] 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
[New Thread 0x7fff27548700 (LWP 2482)]
[server] running and waiting for requests
[New Thread 0x7ffb4bfff700 (LWP 2483)]
[New Thread 0x7ffb4b7fe700 (LWP 2484)]
[New Thread 0x7ffb4affd700 (LWP 2485)]
[New Thread 0x7ffb4a7fc700 (LWP 2486)]
[New Thread 0x7ffb49ffb700 (LWP 2487)]
[New Thread 0x7ffb497fa700 (LWP 2488)]
[New Thread 0x7ffb48ff9700 (LWP 2489)]
[New Thread 0x7ffb33fff700 (LWP 2490)]

Until here, everything seems to be working fine.

This viaroute api call works fine:
curl "http://router.project-osrm.org/viaroute?loc=51.477450,7.429540&loc=51.481902,7.430014"

But when I execute:
curl "http://localhost:5000/viaroute?loc=51.477450,7.429540&loc=51.481902,7.430014"

osrm-routed receives an Segmentation fault:

[i /home/osrm/osrm/Server/RequestHandler.h:65] 02-07-2013 20:58:51 127.0.0.1 - curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 /viaroute?loc=51.477450,7.429540&loc=51.481902,7.430014

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffb33fff700 (LWP 2490)]
0x0000000000447ab1 in StaticRTreeEdgeBasedGraphFactory::EdgeBasedNode::FindPhantomNodeForCoordinate(_Coordinate const&, PhantomNode&, unsigned int) ()
(gdb) bt
#0 0x0000000000447ab1 in StaticRTreeEdgeBasedGraphFactory::EdgeBasedNode::FindPhantomNodeForCoordinate(_Coordinate const&, PhantomNode&, unsigned int) ()
#1 0x00000000004623b8 in ViaRoutePlugin::HandleRequest(RouteParameters const&, http::Reply&) ()
#2 0x000000000044cd71 in http::RequestHandler::handle_request(http::Request const&, http::Reply&) ()
#3 0x0000000000459178 in http::Connection::handleRead(boost::system::error_code const&, unsigned long) ()
#4 0x0000000000464ab3 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 0x00000000004655cb 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 0x0000000000465a35 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 0x0000000000465bbe 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 0x0000000000440190 in boost::asio::detail::task_io_service::run(boost::system::error_code&) ()
#9 0x0000000000440415 in boost::asio::io_service::run() ()
#10 0x00007ffff77abce9 in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
#11 0x00007ffff7589e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007ffff667fccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#13 0x0000000000000000 in ?? ()

There should also be enough free space:
free -m
total used free shared buffers cached
Mem: 68551 23607 44944 0 147 22259
-/+ buffers/cache: 1200 67351
Swap: 65535 0 65535

I repeated this steps on another server (internal company server with ubuntu 12.04) with the same results.

When I only use the map data of germany everything seems to be working. Could anyone give a hint what is going wrong?

Thank you very much!


Best Regards
Dennis Rieks

@drieks
Copy link
Author

drieks commented Jul 2, 2013

Can be a duplicate of #653

@DennisOSRM
Copy link
Collaborator

I'll look into it.

@thomaswilkins
Copy link

This does indeed seem very similar to issue #653 that I raised - we're both using EC2 instances, Ubuntu 12.04, the same OSRM version from the master branch and large maps from Geofabrik. The only real difference between our setups is that I compiled with 'scons --no-march' rather than using 'make'.

I would note that the same requests appear to consistently make the server crash i.e. one can restart the server, repeat the request and see the same segmentation fault.

@DennisOSRM
Copy link
Collaborator

@thomaswilkins Scons has been replaced by cmake with the last release. Please switch to latest master

@DennisOSRM
Copy link
Collaborator

Any news on the latest develop branch? Perhaps you only have to redo data files

@thomaswilkins
Copy link

To be honest I haven't tested it. If I do I'll be sure to post my results here. It does appear that @drieks is using the latest master.

@drieks
Copy link
Author

drieks commented Jul 17, 2013

Hi, i will check this now.

Which osrm version is used by router.project-osrm.org? Is this an Ubuntu 11.04 64 bit system?

@DennisOSRM
Copy link
Collaborator

The router is using the latest develop branch, i.e. it is dog-fooding.

@drieks
Copy link
Author

drieks commented Jul 18, 2013

Hi,

I switchted to the latest develop branch (no incomming changes at this writing), removed all CMake tmp and build files and tryed to compiled osrm.
But there is an problem with cmake:

osrm@ip-10-36-218-237 ~/osrm $ cmake .
-- System supports 64 bits.
-- Configuring OSRM in release mode
-- Looking for LuaJIT...
-- Could NOT find LuaJIT (missing:  LUAJIT_INCLUDE_DIR) 
-- Looking for Luabind...
-- Found Luabind: /usr/lib/libluabind.so
-- Looking for STXXL...
-- Found STXXL: /usr/lib/libstxxl.so
-- Looking for OSMPBF...
-- Found OSMPBF: /usr/lib/libosmpbf.a
-- Configuring done
CMake Error at CMakeLists.txt:22 (add_executable):
  Cannot find source file:

    $<TARGET_OBJECTS:uuid>

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


CMake Error in CMakeLists.txt:
  Cannot find source file:

    OBJECT

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


-- Build files have been written to: /home/osrm/osrm

I used master for this: There are still crashes in osrm-routed. There is enough free memory after osrm-routed was started in gdb:

osrm@ip-10-36-218-237 ~ $ free -m
             total       used       free     shared    buffers     cached
Mem:         68551      67202       1349          0        135      35179
-/+ buffers/cache:      31886      36665
Swap:        87039          6      87033

Is there anything I can do to help with this bug? I can repeat all this steps on another ubuntu version. Which version is used for the demo Server?

At the end of this post: there are many errors when osrm-routed is started as debug build. Can this be the problem? (I killed the process after more then 500.000 error messages)
Or it is only possible to use debug build osrm-routed whith debug osrm-extract / osrm-prepare?

Thank you very much
Dennis

osrm@ip-10-36-218-237 ~/data $ cat planet-latest.osm.pbf.md5
8304d381ea327456dbe6afe3e8074a4f  planet-130703.osm.pbf

osrm@ip-10-36-218-237 ~/data $ md5sum planet-latest.osm.pbf
8304d381ea327456dbe6afe3e8074a4f  planet-latest.osm.pbf
osrm@ip-10-36-218-237 ~/osrm $ git pull
Already up-to-date.

osrm@ip-10-36-218-237 ~/osrm $ git diff
diff --git a/contractor.ini b/contractor.ini
index 4da33c7..c084a31 100644
--- a/contractor.ini
+++ b/contractor.ini
@@ -1 +1 @@
-Threads = 4
+Threads = 16
diff --git a/extractor.ini b/extractor.ini
index 8dd11de..b9d037d 100644
--- a/extractor.ini
+++ b/extractor.ini
@@ -1,2 +1,2 @@
 Memory = 2
-Threads = 10
+Threads = 16 
diff --git a/server.ini b/server.ini
index 3fe844a..36653d8 100644
--- a/server.ini
+++ b/server.ini
@@ -2,10 +2,10 @@ Threads = 8
 IP = 0.0.0.0
 Port = 5000

-hsgrData=/opt/osm/berlin.osrm.hsgr
-nodesData=/opt/osm/berlin.osrm.nodes
-edgesData=/opt/osm/berlin.osrm.edges
-ramIndex=/opt/osm/berlin.osrm.ramIndex
-fileIndex=/opt/osm/berlin.osrm.fileIndex
-namesData=/opt/osm/berlin.osrm.names
-timestamp=/opt/osm/berlin.osrm.timestamp
+hsgrData=/home/osrm/data/planet-latest.osrm.hsgr
+nodesData=/home/osrm/data/planet-latest.osrm.nodes
+edgesData=/home/osrm/data/planet-latest.osrm.edges
+ramIndex=/home/osrm/data/planet-latest.osrm.ramIndex
+fileIndex=/home/osrm/data/planet-latest.osrm.fileIndex
+namesData=/home/osrm/data/planet-latest.osrm.names
+timestamp=/home/osrm/data/planet-latest.osrm.timestamp
osrm@ip-10-36-218-237 ~/osrm $ cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring OSRM in release mode
-- Boost version: 1.46.1
-- Found the following Boost libraries:
--   filesystem
--   regex
--   system
--   thread
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so 
-- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so - found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.3.4")
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found Lua51: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so 
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so 
-- Looking for Luabind...
-- Found Luabind: /usr/lib/libluabind.so 
-- Found Luabind: /usr/lib/libluabind.so
-- Found PROTOBUF: /usr/lib/libprotobuf.so 
-- Looking for STXXL...
-- Found STXXL: /usr/lib/libstxxl.so 
-- Found STXXL: /usr/lib/libstxxl.so
-- Looking for OSMPBF...
-- Found OSMPBF: /usr/lib/libosmpbf.a 
-- Found OSMPBF: /usr/lib/libosmpbf.a
-- Configuring done
-- Generating done
-- Build files have been written to: /home/osrm/osrm
osrm@ip-10-36-218-237 ~/osrm $ make
Scanning dependencies of target osrm-extract
[  6%] Building CXX object CMakeFiles/osrm-extract.dir/extractor.cpp.o
[ 13%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/ExtractorCallbacks.cpp.o
[ 20%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/ScriptingEnvironment.cpp.o
[ 26%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/PBFParser.cpp.o
[ 33%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/XMLParser.cpp.o
/home/osrm/osrm/Extractor/XMLParser.cpp: In member function ‘_RawRestrictionContainer XMLParser::_ReadXMLRestriction()’:
/home/osrm/osrm/Extractor/XMLParser.cpp:112:47: warning: overflow in implicit constant conversion [-Woverflow]
[ 40%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/BaseParser.cpp.o
[ 46%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/ExtractionContainers.cpp.o
Linking CXX executable osrm-extract
[ 46%] Built target osrm-extract
Scanning dependencies of target osrm-prepare
[ 53%] Building CXX object CMakeFiles/osrm-prepare.dir/createHierarchy.cpp.o
[ 60%] Building CXX object CMakeFiles/osrm-prepare.dir/Contractor/TemporaryStorage.cpp.o
[ 66%] Building CXX object CMakeFiles/osrm-prepare.dir/Contractor/EdgeBasedGraphFactory.cpp.o
Linking CXX executable osrm-prepare
[ 66%] Built target osrm-prepare
Scanning dependencies of target osrm-routed
[ 73%] Building CXX object CMakeFiles/osrm-routed.dir/routed.cpp.o
[ 80%] Building CXX object CMakeFiles/osrm-routed.dir/Server/DataStructures/QueryObjectsStorage.cpp.o
[ 86%] Building CXX object CMakeFiles/osrm-routed.dir/Descriptors/DescriptionFactory.cpp.o
[ 93%] Building CXX object CMakeFiles/osrm-routed.dir/DataStructures/SearchEngine.cpp.o
[100%] Building CXX object CMakeFiles/osrm-routed.dir/DataStructures/SearchEngineData.cpp.o
Linking CXX executable osrm-routed
[100%] Built target osrm-routed
osrm@ip-10-36-218-237 ~/osrm/osrm $ ./osrm-extract /home/osrm/data/planet-latest.osm.pbf && ./osrm-prepare /home/osrm/data/planet-latest.osrm /home/osrm/data/planet-latest.osrm.restrictions
[i /home/osrm/osrm/Extractor/ScriptingEnvironment.cpp:25] Using script profile.lua
[i /home/osrm/osrm/extractor.cpp:62] extracting data from input file /home/osrm/data/planet-latest.osm.pbf
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-MSG] 1 disks are allocated, total space: 500000 MiB
[i /home/osrm/osrm/Extractor/BaseParser.cpp:38] Using turn restrictions
[i /home/osrm/osrm/Extractor/BaseParser.cpp:53] Found 3 exceptions to turn restriction
[i /home/osrm/osrm/Extractor/BaseParser.cpp:55]    motorcar
[i /home/osrm/osrm/Extractor/BaseParser.cpp:55]    motor_vehicle
[i /home/osrm/osrm/Extractor/BaseParser.cpp:55]    vehicle
[i /home/osrm/osrm/extractor.cpp:108] Parsing in progress..
[i /home/osrm/osrm/Extractor/PBFParser.cpp:111] Parse Data Thread Finished
[i /home/osrm/osrm/extractor.cpp:111] Parsing finished after 6170.96 seconds
[extractor] Sorting used nodes        ... ok, after 180.521s
[extractor] Erasing duplicate nodes   ... ok, after 88.199s
[extractor] Sorting all nodes         ... ok, after 2430.62s
[extractor] Sorting used ways         ... ok, after 27.9809s
[extractor] Sorting restrctns. by from... ok, after 28.3208s
[extractor] Fixing restriction starts ... ok, after 50.1014s
[extractor] Sorting restrctns. by to  ... ok, after 0.271209s
[extractor] Fixing restriction ends   ... ok, after 22.6104s
[i /home/osrm/osrm/Extractor/ExtractionContainers.cpp:120] usable restrictions: 188197
[extractor] Confirming/Writing used nodes     ... ok, after 755.12s
[extractor] setting number of nodes   ... ok
[extractor] Sorting edges by start    ... ok, after 1016.23s
[extractor] Setting start coords      ... ok, after 1200.72s
[extractor] Sorting edges by target   ... ok, after 983.864s
[extractor] Setting target coords     ... ok, after 1519.19s
[extractor] setting number of edges   ... ok
[extractor] writing street name index ... ok, after 1.02768s
[i /home/osrm/osrm/Extractor/ExtractionContainers.cpp:299] Processed 429574109 nodes and 453459752 edges
[i /home/osrm/osrm/extractor.cpp:118] finished after 14421.6s

Run:
./osrm-prepare /home/osrm/data/planet-latest.osrm /home/osrm/data/planet-latest.osrm.restrictions
[i /home/osrm/osrm/createHierarchy.cpp:75] Using restrictions from file: /home/osrm/data/planet-latest.osrm.restrictions
[i /home/osrm/osrm/createHierarchy.cpp:117] Parsing speedprofile from profile.lua
[i /home/osrm/osrm/Util/GraphLoader.h:194] Graph loaded ok and has 453291687 edges
[i /home/osrm/osrm/createHierarchy.cpp:139] 188197 restrictions, 137165 bollard nodes, 501364 traffic lights
[i /home/osrm/osrm/createHierarchy.cpp:148] Generating edge-expanded graph representation
[i /home/osrm/osrm/Contractor/EdgeBasedGraphFactory.cpp:165] Identifying small components
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[i /home/osrm/osrm/Contractor/EdgeBasedGraphFactory.cpp:219] identified: 625567 many components
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[i /home/osrm/osrm/Contractor/EdgeBasedGraphFactory.cpp:325] Node-based graph contains 872229151 edges
[i /home/osrm/osrm/Contractor/EdgeBasedGraphFactory.cpp:326] Edge-based graph contains 1060962118 edges
[i /home/osrm/osrm/Contractor/EdgeBasedGraphFactory.cpp:328] Edge-based graph skipped 232490 turns, defined by 188197 restrictions.
[i /home/osrm/osrm/Contractor/EdgeBasedGraphFactory.cpp:329] Generated 872229151 edge based nodes
[i /home/osrm/osrm/createHierarchy.cpp:166] writing node map ...
[i /home/osrm/osrm/createHierarchy.cpp:178] building r-tree ...
[i /home/osrm/osrm/DataStructures/StaticRTree.h:276] constructing r-tree of 872229151 elements
[i /home/osrm/osrm/DataStructures/StaticRTree.h:401] finished r-tree construction in 815.198 seconds
using hardware base sse computation
[i /home/osrm/osrm/createHierarchy.cpp:189] CRC32 based checksum is 2933087785
[i /home/osrm/osrm/createHierarchy.cpp:195] initializing contractor
merged 146382 edges out of 2121924236  
contractor finished initalization
Contractor is using 8 threads
initializing elimination PQ ...ok
preprocessing 872229151 nodes .... 10% . 20% . 30% . 40% . 50% . 60% . [flush 595742647 nodes]  70% . 80% . 90% . 100%
[i /home/osrm/osrm/createHierarchy.cpp:199] Contraction took 24065 sec
[i /home/osrm/osrm/Contractor/Contractor.h:445] Getting edges of minimized graph
. 10% . 20% . 30% . 40% . 50% . 60% . 70% . 80% . 90% . 100%
[i /home/osrm/osrm/createHierarchy.cpp:209] Building Node Array
[i /home/osrm/osrm/createHierarchy.cpp:213] Serializing compacted graph of 1246181869 edges
[i /home/osrm/osrm/createHierarchy.cpp:265] Expansion  : 96731.9 nodes/sec and 196409 edges/sec
[i /home/osrm/osrm/createHierarchy.cpp:266] Contraction: 196409 nodes/sec and 35639.7 edges/sec
[i /home/osrm/osrm/createHierarchy.cpp:271] finished preprocessing
osrm@ip-10-36-218-237 ~/osrm $ gdb ./osrm-routed
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/osrm/osrm/osrm-routed...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/osrm/osrm/osrm-routed
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

[server] starting up engines, saved at Mon Jul  1 10:45:08 2013
[server] http 1.1 compression handled by zlib version 1.2.3.4
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:34] loading graph data
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:47] Data checksum is 2933087785
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:53] Loading Timestamp
[? /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:55] /home/osrm/data/planet-latest.osrm.timestamp not found
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:65] Loading auxiliary information
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:75] Loading names index
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:93] 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
[New Thread 0x7fffacb1f700 (LWP 12012)]
[server] running and waiting for requests
[New Thread 0x7fffac31e700 (LWP 12013)]
[New Thread 0x7fffabb1d700 (LWP 12014)]
[New Thread 0x7fffab31c700 (LWP 12015)]
[New Thread 0x7fffaab1b700 (LWP 12016)]
[New Thread 0x7fffaa31a700 (LWP 12017)]
[New Thread 0x7fffa9b19700 (LWP 12018)]
[New Thread 0x7fffa9318700 (LWP 12019)]
[New Thread 0x7fffa8b17700 (LWP 12020)]

(until here there are no problems)

[i /home/osrm/osrm/Server/RequestHandler.h:65] 18-07-2013 08:46:05 85.22.139.24 - Apache-HttpClient/4.2.5 (java 1.5) /viaroute?alt=false&instructions=false&loc=49.00813,8.403760000000034&loc=49.00018000000001,8.476239999999962
[i /home/osrm/osrm/Plugins/../Descriptors/../DataStructures/../RoutingAlgorithms/ShortestPathRouting.h:76] fw1: 509447245´, w: -62
[i /home/osrm/osrm/Plugins/../Descriptors/../DataStructures/../RoutingAlgorithms/ShortestPathRouting.h:78] fw2: 509447245´, w: -62
[i /home/osrm/osrm/Plugins/../Descriptors/../DataStructures/../RoutingAlgorithms/ShortestPathRouting.h:82] fw1: 509447246´, w: -4
[i /home/osrm/osrm/Plugins/../Descriptors/../DataStructures/../RoutingAlgorithms/ShortestPathRouting.h:84] fw2: 509447246´, w: -4
[i /home/osrm/osrm/Plugins/../Descriptors/../DataStructures/../RoutingAlgorithms/ShortestPathRouting.h:89] rv1: 629544086, w;1
[i /home/osrm/osrm/Plugins/../Descriptors/../DataStructures/../RoutingAlgorithms/ShortestPathRouting.h:92] rv2: 629544087, w;3

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffa8b17700 (LWP 12020)]
0x0000000000454d75 in BasicRoutingInterface<SearchEngineData>::UnpackPath(std::vector<unsigned int, std::allocator<unsigned int> > const&, std::vector<_PathData, std::allocator<_PathData> >&) const ()
(gdb) bt
#0  0x0000000000454d75 in BasicRoutingInterface<SearchEngineData>::UnpackPath(std::vector<unsigned int, std::allocator<unsigned int> > const&, std::vector<_PathData, std::allocator<_PathData> >&) const ()
#1  0x0000000000455dc5 in ShortestPathRouting<SearchEngineData>::operator()(std::vector<PhantomNodes, std::allocator<PhantomNodes> >&, RawRouteData&) const ()
#2  0x000000000046293d in ViaRoutePlugin::HandleRequest(RouteParameters const&, http::Reply&) ()
#3  0x000000000044cd71 in http::RequestHandler::handle_request(http::Request const&, http::Reply&) ()
#4  0x0000000000459178 in http::Connection::handleRead(boost::system::error_code const&, unsigned long) ()
#5  0x0000000000464ab3 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::list3<boost::_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::list3<boost::_bi::value<boost::shared_ptr<http::Connection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>) ()
#6  0x00000000004655cb 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::list3<boost::_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::_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::list3<boost::_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::_bi::value<boost::shared_ptr<http::Connection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> > >) ()
#7  0x0000000000465a35 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::list3<boost::_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::list3<boost::_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::list3<boost::_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::list3<boost::_bi::value<boost::shared_ptr<http::Connection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> > >*) ()
#8  0x0000000000465bbe 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::list3<boost::_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) ()
#9  0x0000000000440190 in boost::asio::detail::task_io_service::run(boost::system::error_code&) ()
#10 0x0000000000440415 in boost::asio::io_service::run() ()
#11 0x00007ffff77abce9 in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
#12 0x00007ffff7589e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#13 0x00007ffff667fccd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#14 0x0000000000000000 in ?? ()
(gdb)

Also with debug build:

osrm@ip-10-36-218-237 ~/osrm $ rm -rf CMakeCache.txt CMakeFiles/ Makefile cmake_install.cmake 

osrm@ip-10-36-218-237 ~/osrm $ git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   contractor.ini
#       modified:   extractor.ini
#       modified:   server.ini
#
no changes added to commit (use "git add" and/or "git commit -a")
osrm@ip-10-36-218-237 ~/osrm $ cmake -DCMAKE_BUILD_TYPE=Debug
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring OSRM in debug mode
-- Boost version: 1.46.1
-- Found the following Boost libraries:
--   filesystem
--   regex
--   system
--   thread
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so 
-- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so - found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.3.4")
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found Lua51: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so 
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so 
-- Looking for Luabind...
-- Found Luabind: /usr/lib/libluabind.so 
-- Found Luabind: /usr/lib/libluabind.so
-- Found PROTOBUF: /usr/lib/libprotobuf.so 
-- Looking for STXXL...
-- Found STXXL: /usr/lib/libstxxl.so 
-- Found STXXL: /usr/lib/libstxxl.so
-- Looking for OSMPBF...
-- Found OSMPBF: /usr/lib/libosmpbf.a 
-- Found OSMPBF: /usr/lib/libosmpbf.a
-- Configuring done
-- Generating done
-- Build files have been written to: /home/osrm/osrm
osrm@ip-10-36-218-237 ~/osrm $ make
Scanning dependencies of target osrm-extract
[  6%] Building CXX object CMakeFiles/osrm-extract.dir/extractor.cpp.o
[ 13%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/ExtractorCallbacks.cpp.o
[ 20%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/ScriptingEnvironment.cpp.o
[ 26%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/PBFParser.cpp.o
[ 33%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/XMLParser.cpp.o
/home/osrm/osrm/Extractor/XMLParser.cpp: In member function ‘_RawRestrictionContainer XMLParser::_ReadXMLRestriction()’:
/home/osrm/osrm/Extractor/XMLParser.cpp:112:47: warning: overflow in implicit constant conversion [-Woverflow]
[ 40%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/BaseParser.cpp.o
[ 46%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/ExtractionContainers.cpp.o
Linking CXX executable osrm-extract
[ 46%] Built target osrm-extract
Scanning dependencies of target osrm-prepare
[ 53%] Building CXX object CMakeFiles/osrm-prepare.dir/createHierarchy.cpp.o
[ 60%] Building CXX object CMakeFiles/osrm-prepare.dir/Contractor/TemporaryStorage.cpp.o
[ 66%] Building CXX object CMakeFiles/osrm-prepare.dir/Contractor/EdgeBasedGraphFactory.cpp.o
Linking CXX executable osrm-prepare
[ 66%] Built target osrm-prepare
Scanning dependencies of target osrm-routed
[ 73%] Building CXX object CMakeFiles/osrm-routed.dir/routed.cpp.o
[ 80%] Building CXX object CMakeFiles/osrm-routed.dir/Server/DataStructures/QueryObjectsStorage.cpp.o
[ 86%] Building CXX object CMakeFiles/osrm-routed.dir/Descriptors/DescriptionFactory.cpp.o
[ 93%] Building CXX object CMakeFiles/osrm-routed.dir/DataStructures/SearchEngine.cpp.o
[100%] Building CXX object CMakeFiles/osrm-routed.dir/DataStructures/SearchEngineData.cpp.o
Linking CXX executable osrm-routed
[100%] Built target osrm-routed
osrm@ip-10-36-218-237 ~/osrm $ gdb ./osrm-routed 
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/osrm/osrm/osrm-routed...done.
(gdb) r
Starting program: /home/osrm/osrm/osrm-routed 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

[server] starting up engines, saved at Mon Jul  1 10:45:08 2013
[server] http 1.1 compression handled by zlib version 1.2.3.4
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:34] loading graph data
[i /home/osrm/osrm/Server/DataStructures/QueryObjectsStorage.cpp:47] Data checksum is 2933087785
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:103] cannot find first segment of edge (6,3579757,14)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:108] cannot find second segment of edge (6,3579757,14)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:103] cannot find first segment of edge (9,349930032,25801)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:108] cannot find second segment of edge (9,349930032,25801)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:103] cannot find first segment of edge (15,12,7)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:108] cannot find second segment of edge (15,12,7)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:103] cannot find first segment of edge (19,804681183,804681184)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:108] cannot find second segment of edge (19,804681183,804681184)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:103] cannot find first segment of edge (32,63,58)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:108] cannot find second segment of edge (32,63,58)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:103] cannot find first segment of edge (34,298896,298897)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:108] cannot find second segment of edge (34,298896,298897)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:103] cannot find first segment of edge (38,13187530,120)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:108] cannot find second segment of edge (38,13187530,120)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:103] cannot find first segment of edge (38,37,298902)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:108] cannot find second segment of edge (38,37,298902)
[d /home/osrm/osrm/Server/DataStructures/../../DataStructures/StaticGraph.h:103] cannot find first segment of edge (39,13187532,119)
(...................)

@DennisOSRM
Copy link
Collaborator

The cmake error is about to be fixed in the coming hours

@alex85k
Copy link
Contributor

alex85k commented Jul 18, 2013

Please could you also add include_directories(${BZIP2_INCLUDE_DIR}), include_directories(${ZLIB_INCLUDE_DIRS})
to CMake and target_link_libraries (OSRM ${STXXL_LIBRARY}) (and luabind09 in FindLuabind). This is not Windows-specific, cmake fails for non-standard libraries paths.

@DennisOSRM
Copy link
Collaborator

develop does build on older cmake versions again and also the above things have been added to the CMakeLists.txt with commit c3dab15

@DennisOSRM
Copy link
Collaborator

Closing here in favor of issue #653

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