systemed / tilemaker

Make OpenStreetMap vector tiles without the stack
https://tilemaker.org/
Other
1.4k stars 226 forks source link

tilemaker-server terminated by signal SIGKILL (Forced quit) #699

Closed deevroman closed 2 months ago

deevroman commented 3 months ago
tilemaker-server
fish: Job 1, 'tilemaker-server' terminated by signal SIGKILL (Forced quit)

Installed using this guide: https://github.com/systemed/tilemaker/blob/master/docs/INSTALL.md#macos

macOS: 14.4 Apple M1 Pro RAM: 16GB

seventyeight commented 2 months ago

Same problem here. Build is running through without problems. But executing the binary is causing the error above.

systemed commented 2 months ago

I haven't yet been able to reproduce this (macOS 14.1, Mac mini M2). Would welcome any reports that might indicate a possible cause.

deevroman commented 2 months ago

Well, for starters, here are the build logs

logs ``` bash-5.2$ make clean Using luajit - Lua language version 5.1 - LuaJIT version 2.1 - with MacOS LuaJIT linking - include path is -I/opt/homebrew/include/luajit-2.1 -DLUAJIT - library path is -lluajit-5.1 rm -f tilemaker tilemaker-server src/*.o src/external/*.o include/*.o include/*.pb.h server/*.o test/*.o bash-5.2$ bash-5.2$ make Using luajit - Lua language version 5.1 - LuaJIT version 2.1 - with MacOS LuaJIT linking - include path is -I/opt/homebrew/include/luajit-2.1 -DLUAJIT - library path is -lluajit-5.1 c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/attribute_store.o -c src/attribute_store.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/coordinates_geom.o -c src/coordinates_geom.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/coordinates.o -c src/coordinates.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT cc -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c99 -fPIE -DTM_VERSION=v3.0.0 -o src/external/streamvbyte_decode.o -c src/external/streamvbyte_decode.c -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT cc -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c99 -fPIE -DTM_VERSION=v3.0.0 -o src/external/streamvbyte_encode.o -c src/external/streamvbyte_encode.c -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT cc -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c99 -fPIE -DTM_VERSION=v3.0.0 -o src/external/streamvbyte_zigzag.o -c src/external/streamvbyte_zigzag.c -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/geojson_processor.o -c src/geojson_processor.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/geom.o -c src/geom.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT src/geom.cpp:57:29: warning: unused variable 'result' [-Wunused-variable] for(auto const &result: rtree | boost::geometry::index::adaptors::queried(boost::geometry::index::intersects(line))) ^ src/geom.cpp:59:29: warning: unused variable 'result' [-Wunused-variable] for(auto const &result: outer_rtree | boost::geometry::index::adaptors::queried(boost::geometry::index::intersects(line))) ^ 2 warnings generated. c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/helpers.o -c src/helpers.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/mbtiles.o -c src/mbtiles.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/mmap_allocator.o -c src/mmap_allocator.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/node_stores.o -c src/node_stores.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/options_parser.o -c src/options_parser.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/osm_lua_processing.o -c src/osm_lua_processing.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT src/osm_lua_processing.cpp:185:2: warning: field 'config' will be initialized after field 'currentTags' [-Wreorder-ctor] config(configIn), ^~~~~~~~~~~~~~~~ attributeStore(attributeStore) 1 warning generated. c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/osm_mem_tiles.o -c src/osm_mem_tiles.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/osm_store.o -c src/osm_store.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT src/osm_store.cpp:90:19: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call] mp.emplace_back(move(poly)); ^ std:: src/osm_store.cpp:110:20: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call] mls.emplace_back(move(ls)); ^ std:: 2 warnings generated. c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/output_object.o -c src/output_object.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/pbf_processor.o -c src/pbf_processor.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/pbf_reader.o -c src/pbf_reader.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/pmtiles.o -c src/pmtiles.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/pooled_string.o -c src/pooled_string.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/relation_roles.o -c src/relation_roles.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/sharded_node_store.o -c src/sharded_node_store.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/sharded_way_store.o -c src/sharded_way_store.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/shared_data.o -c src/shared_data.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/shp_mem_tiles.o -c src/shp_mem_tiles.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/shp_processor.o -c src/shp_processor.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/significant_tags.o -c src/significant_tags.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/sorted_node_store.o -c src/sorted_node_store.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT src/sorted_node_store.cpp:67:18: warning: loop variable 'entry' creates a copy from type 'std::pair const' [-Wrange-loop-construct] for (const auto entry: allocatedMemory) ^ src/sorted_node_store.cpp:67:7: note: use reference type 'std::pair const &' to prevent copying for (const auto entry: allocatedMemory) ^~~~~~~~~~~~~~~~~ & src/sorted_node_store.cpp:89:18: warning: loop variable 'entry' creates a copy from type 'std::pair const' [-Wrange-loop-construct] for (const auto entry: allocatedMemory) ^ src/sorted_node_store.cpp:89:7: note: use reference type 'std::pair const &' to prevent copying for (const auto entry: allocatedMemory) ^~~~~~~~~~~~~~~~~ & src/sorted_node_store.cpp:123:9: warning: variable 'nodeOffset' set but not used [-Wunused-but-set-variable] size_t nodeOffset = 0; ^ 3 warnings generated. c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/sorted_way_store.o -c src/sorted_way_store.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT src/sorted_way_store.cpp:67:18: warning: loop variable 'entry' creates a copy from type 'std::pair const' [-Wrange-loop-construct] for (const auto entry: allocatedMemory) ^ src/sorted_way_store.cpp:67:7: note: use reference type 'std::pair const &' to prevent copying for (const auto entry: allocatedMemory) ^~~~~~~~~~~~~~~~~ & src/sorted_way_store.cpp:74:18: warning: loop variable 'entry' creates a copy from type 'std::pair const' [-Wrange-loop-construct] for (const auto entry: allocatedMemory) ^ src/sorted_way_store.cpp:74:7: note: use reference type 'std::pair const &' to prevent copying for (const auto entry: allocatedMemory) ^~~~~~~~~~~~~~~~~ & src/sorted_way_store.cpp:122:10: warning: variable 'wayOffset' set but not used [-Wunused-but-set-variable] size_t wayOffset = 0; ^ src/sorted_way_store.cpp:131:9: warning: variable 'wayOffset' set but not used [-Wunused-but-set-variable] size_t wayOffset = 0; ^ 4 warnings generated. c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/tag_map.o -c src/tag_map.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/tile_coordinates_set.o -c src/tile_coordinates_set.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/tile_data.o -c src/tile_data.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/tilemaker.o -c src/tilemaker.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT src/tilemaker.cpp:137:19: warning: loop variable 'inputFile' creates a copy from type 'std::string const' [-Wrange-loop-construct] for (const auto inputFile : options.inputFiles) { ^ src/tilemaker.cpp:137:8: note: use reference type 'std::string const &' to prevent copying for (const auto inputFile : options.inputFiles) { ^~~~~~~~~~~~~~~~~~~~~~ & src/tilemaker.cpp:521:50: warning: lambda capture 'pool' is not used [-Wunused-lambda-capture] boost::asio::post(pool, [=, &tileCoordinates, &pool, &sharedData, &sources, &attributeStore, &io_mutex, &tilesWritten]() { ~~~^~~~ 2 warnings generated. c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/tile_worker.o -c src/tile_worker.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT src/tile_worker.cpp:311:9: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call] g = move(reordered); ^ std:: 1 warning generated. c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o src/way_stores.o -c src/way_stores.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o tilemaker src/attribute_store.o src/coordinates_geom.o src/coordinates.o src/external/streamvbyte_decode.o src/external/streamvbyte_encode.o src/external/streamvbyte_zigzag.o src/geojson_processor.o src/geom.o src/helpers.o src/mbtiles.o src/mmap_allocator.o src/node_stores.o src/options_parser.o src/osm_lua_processing.o src/osm_mem_tiles.o src/osm_store.o src/output_object.o src/pbf_processor.o src/pbf_reader.o src/pmtiles.o src/pooled_string.o src/relation_roles.o src/sharded_node_store.o src/sharded_way_store.o src/shared_data.o src/shp_mem_tiles.o src/shp_processor.o src/significant_tags.o src/sorted_node_store.o src/sorted_way_store.o src/tag_map.o src/tile_coordinates_set.o src/tile_data.o src/tilemaker.o src/tile_worker.o src/way_stores.o -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT -L/opt/homebrew/lib -lz -lluajit-5.1 -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lshp -pthread -pagezero_size 10000 -image_base 100000000 ld: warning: Linking with PIE, -image_base will be ignored c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o server/server.o -c server/server.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0 -o tilemaker-server server/server.o -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT -L/opt/homebrew/lib -lz -lluajit-5.1 -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lshp -pthread -pagezero_size 10000 -image_base 100000000 ld: warning: Linking with PIE, -image_base will be ignored bash-5.2$ make install Using luajit - Lua language version 5.1 - LuaJIT version 2.1 - with MacOS LuaJIT linking - include path is -I/opt/homebrew/include/luajit-2.1 -DLUAJIT - library path is -lluajit-5.1 install -m 0755 -d /usr/local/bin/ install: chmod 755 /usr/local/bin/: Operation not permitted install -m 0755 tilemaker /usr/local/bin/ install: /usr/local/bin//tilemaker: Permission denied make: *** [install] Error 71 bash-5.2$ ./tilemaker-server Killed: 9 bash-5.2$ ```

From the curious I see:

c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0  -o tilemaker src/attribute_store.o src/coordinates_geom.o src/coordinates.o src/external/streamvbyte_decode.o src/external/streamvbyte_encode.o src/external/streamvbyte_zigzag.o src/geojson_processor.o src/geom.o src/helpers.o src/mbtiles.o src/mmap_allocator.o src/node_stores.o src/options_parser.o src/osm_lua_processing.o src/osm_mem_tiles.o src/osm_store.o src/output_object.o src/pbf_processor.o src/pbf_reader.o src/pmtiles.o src/pooled_string.o src/relation_roles.o src/sharded_node_store.o src/sharded_way_store.o src/shared_data.o src/shp_mem_tiles.o src/shp_processor.o src/significant_tags.o src/sorted_node_store.o src/sorted_way_store.o src/tag_map.o src/tile_coordinates_set.o src/tile_data.o src/tilemaker.o src/tile_worker.o src/way_stores.o -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT -L/opt/homebrew/lib -lz -lluajit-5.1 -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lshp -pthread -pagezero_size 10000 -image_base 100000000
ld: warning: Linking with PIE, -image_base will be ignored
c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0  -o server/server.o -c server/server.cpp -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT
c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0  -o tilemaker-server server/server.o -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/luajit-2.1 -DLUAJIT -L/opt/homebrew/lib -lz -lluajit-5.1 -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lshp -pthread -pagezero_size 10000 -image_base 100000000
ld: warning: Linking with PIE, -image_base will be ignored
systemed commented 2 months ago

Ah, interesting. It appears to be a LuaJIT thing. If I build with plain Lua it's fine. If I build with LuaJIT then it's killed.

Try uninstalling LuaJIT and installing plain Lua and see if that works for you.

deevroman commented 2 months ago

Yes, deleting it helped brew uninstall --ignore-dependencies luajit Is it possible to pass a build parameter that disables LuaJIT without deleting it?

systemed commented 2 months ago

I think the fix will be altering the LDFLAGS in the Makefile. I'll take a look at that.

systemed commented 2 months ago

716 should fix this - do try it and let me know if it works for you.

deevroman commented 2 months ago

I updated the source code, installed luajit again and the problem is no longer there. Thanks!

systemed commented 2 months ago

That's great!

(For background: LuaJIT used to require a particular linking option on MacOS. With 2.1 it no longer does, so I've added a version check.)