Overpass-API icon indicating copy to clipboard operation
Overpass-API copied to clipboard

Dispatcher reports wrong file location for shared memory file

Open lonvia opened this issue 3 years ago • 2 comments

After killing the dispatcher the hard way, it reports on startup:

vagrant@ubuntu2004:~$ sudo -u overpass /srv/overpass.openstreetmap.org/bin/dispatcher --osm-base --db-dir=/srv/overpass.openstreetmap.org/db --rate-limit=2 --space=10737418240
File_Error File exists 17 /osm3s_v0.7.57_osm_base Dispatcher_Server::1

The file in question is in fact /dev/shm/osm3s_v0.7.57_osm_base. The dispatcher should report the correct location here.

lonvia avatar Oct 23 '21 09:10 lonvia

Thank you for reporting, but this is a tricky one. The POSIX shared memory objects have by specification their own filesystem hierarchy, see e.g. man shm_open. It is only Linux that by convention mounts them on /dev/shm. It would be overengineering here to add a mechanism to figure out whether we are on Linux or on another POSIX conforming OS.

drolbr avatar Oct 25 '21 04:10 drolbr

A more informative message that clearly points out that this is a shared memory file would do as well in that case. The error message certainly shouldn't pretend to point to an absolute path when it doesn't know that path.

This message is the second of a File exists error. The first being for a file /srv/overpass/db/osm3s_v0.7.57_osm_base which I found and deleted. When afterwards the message above popped up, I falsely assumed it was still talking about the same file just looking for it in the wrong directory.

lonvia avatar Oct 25 '21 07:10 lonvia