gis-ops / docker-valhalla

This is our flexible Docker repository for the Valhalla routing engine
MIT License
228 stars 69 forks source link

Segfault when running with bigger pbf files. #97

Closed homtec closed 1 year ago

homtec commented 1 year ago

Hey,

running the docker image with Andorra-latest works perfectly. Running with a bigger file like Netherlands gives a segmentation fault. Any idea what's wrong here?

Thanks!

INFO: Running container with user valhalla UID 59999 and GID 59999.

find: '/custom_files/transit_tiles': No such file or directory

WARNING: Hash not found for: /custom_files/netherlands-latest.osm.pbf!

WARNING: No routing tiles found at /custom_files/valhalla_tiles.tar or /custom_files/valhalla_tiles, starting a new build

INFO: Running build tiles with: /custom_files/valhalla.json /custom_files/netherlands-latest.osm.pbf

============================

= Build the initial graph. =

============================

2023/03/26 10:13:13.834919 [INFO] Start stage = initialize End stage = build

2023/03/26 10:13:13.849793 [INFO] Parsing files for ways: /custom_files/netherlands-latest.osm.pbf

2023/03/26 10:13:13.862279 [INFO] Parsing ways...

/valhalla/scripts/configure_valhalla.sh: line 207:    46 Segmentation fault      valhalla_build_tiles -c ${CONFIG_FILE} -e build ${files}`
homtec commented 1 year ago

docker stats is

CONTAINER ID   NAME               CPU %     MEM USAGE / LIMIT   MEM %     NET I/O     BLOCK I/O   PIDS
61c46c1989cc   valhalla_gis-ops   97.12%    59.21MiB / 5.8GiB   1.00%     876B / 0B   0B / 0B     5
nilsnolde commented 1 year ago

Segfaulting is likely not a memory issue. Can't tell what could be wrong.. Only way to tell is to build Valhalla from source and execute valhalla_build_tiles with gdb to see the stack's trace once it fails.

What if you split up Netherlands into 2 or so with osmium? I'd kinda expect some data issue, possibly coming from the Geofabrik extract process, as we're building the full planet daily and no issues there.

vinayakkulkarni commented 1 year ago

Having Same issue, but I've tried with small 2.6 MB .osm.pbf as well.

INFO: Running container with user valhalla UID 59999 and GID 59999.

find: '/custom_files/transit_tiles': No such file or directory
WARNING: Hash not found for: /custom_files/goa.osm.pbf!
WARNING: No routing tiles found at /custom_files/valhalla_tiles.tar or /custom_files/valhalla_tiles, starting a new build

=====================
= Building admin db =
=====================

qemu: uncaught target signal 11 (Segmentation fault) - core dumped
/valhalla/scripts/configure_valhalla.sh: line 146:   121 Segmentation fault      valhalla_build_admins --config "${CONFIG_FILE}" ${files}
nilsnolde commented 1 year ago

I still think this is not an issue with this docker image. So it's the same recommendation:

Only way to tell is to build Valhalla from source and execute valhalla_build_tiles with gdb to see the stack's trace once it fails.

Yours fails on building admins, the other one failed on building tiles. Both are failing on valhalla commands, not anything related to our docker wrapper.

nilsnolde commented 1 year ago

But also happy to be proven wrong.. There's a chance we're not doing some decisions correctly with all the env vars and their code paths.