-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Segfault when applying NodeLocationsForWays handler #23
Comments
The program works for me. What machine are you using? SparseTable doesn't work on 32bit machines, but it should fail when compiling on 32bit. |
I'm using 64-bit Ubuntu. Interestingly, using the attached code the segfault happens only in a VM (on VMware Player 6.0.1) running a quite out-of-the-box installation of Ubuntu 13.10 Desktop 64-bit. When I copy the binary to the host system (Ubuntu 64-bit as well), the segfault doesn't happen. (I encountered a segfault on the host system though using another, more complex program and the Germany extract.) The Andorra file ( http://download.geofabrik.de/europe/andorra-latest.osm.pbf ) seems to be affected as well. It is much smaller than the Switzerland file and may therefore be more convenient to use. What can I do to shed more light on this issue? |
This is probably just an out-of-memory condition. See joto/osmium#70 for the same issue with the old Osmium. Unfortunately the Sparsetable implementation doesn't tell us when it is running out of memory, so I can't detect that. Looking at the Sparsetable code there are a few checks and asserts, but not everywhere where it might do some memory allocation. The Sparsetable development seems to have stopped, the code abandonned. Maybe we have to switch to a different default index for our examples. You can try using osmium::index::map::VectorBasedSparseMap instead of osmium::index::map::SparseTable. It is also quite space efficient for small datasets. |
It seems, it was indeed a problem of having not enough memory. I didn't recognize it, because the System Monitor still showed a lot of free memory. Adding swap space fixed the issue. |
The following program creates a Segfault when applied to Geofabrik's Switzerland PBF file ( http://download.geofabrik.de/europe/switzerland-latest.osm.pbf ).
Makefile:
gdb Output:
The text was updated successfully, but these errors were encountered: