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

osrm-datastore --springclean: .hsgr file must be specified #1360

Closed
SystemParadox opened this issue Jan 27, 2015 · 9 comments
Closed

osrm-datastore --springclean: .hsgr file must be specified #1360

SystemParadox opened this issue Jan 27, 2015 · 9 comments

Comments

@SystemParadox
Copy link

Hi. I'm just starting out with osrm, trying to understand how shared memory works.

The springclean option (#947) does not appear to work:

$ osrm-datastore --springclean
[warn] caught exception: .hsgr file must be specified

According to ipcs, the shared memory does not get released.

  1. Shouldn't this be an error rather than a warning?
  2. Is the .hsgr file really necessary?

If I specify the file as well as springclean, it seems that the springclean option has no effect. It does exactly the same as without the springclean option - the data remains in the shared memory. The key reported by ipcs changes, so I would assume that this reloads/replaces new data as described in the docs.

Is this a bug with springclean or am I misunderstanding something?

Thanks.

@DennisOSRM
Copy link
Collaborator

Probably a minor regression in the command line parsing code. Will look into it later today.

@DennisOSRM
Copy link
Collaborator

Cant' reproduce. The springclean code in master (and develop) branch doesn't do any command line parameter checks, nor does it check for an hsgr file: https://github.com/Project-OSRM/osrm-backend/blob/master/tools/springclean.cpp#L75-L102.

@DennisOSRM
Copy link
Collaborator

Also, make sure to use ./osrm-springclean.

@SystemParadox
Copy link
Author

The error appears to be produced here:
https://github.com/Project-OSRM/osrm-backend/blob/master/Util/DataStoreOptions.h#L224

Are you saying that osrm-datastore --springclean is deprecated?

osrm-springclean does not appear to be documented, nor does cmake build it unless WITH_TOOLS is specified.

It doesn't feel right to me that the code to cleanup the shared memory is hidden away in an optional tool. Surely it makes more sense as an option to osrm-datastore? The first place I looked for this functionality was osrm-datastore --help. Even this is in a separate osrm-springclean command, it should be included by default and osrm-datatore --help should mention it.

Thanks.

@faheemmughal
Copy link

I can reproduce the above with latest master.

./osrm-datastore --springclean
[warn] caught exception: valid .hsgr file must be specified

@TheMarex
Copy link
Member

@faheemmughal you need to use osrm-springclean. Run cmake -DBUILD_TOOLS=1 ..; make.

@faheemmughal
Copy link

I will try that. Thanks @TheMarex

@faheemmughal
Copy link

BUILD_TOOLS did give me access to springclean utility, however it added a lot of other dependencies (read sub dependencies of gdal-devel).

I will agree with @SystemParadox on this that it shouldn't be an optional tool when shared_memory is something we ought to be using in production to ensure cleaning after service is shutdown.

@daniel-j-h
Copy link
Member

The GDAL dependency comes from the components tool only. There is already an issue about how to transition away from GDAL to GDAL 2 or something like GeoJSON that would eliminate the dependency completely: #1738

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

5 participants