[Tile-serving] [osm2pgsql] Crash when updating with more than one thread (#229)

Sarah Hoffmann notifications at github.com
Sat Dec 20 16:45:05 UTC 2014


Some further investigation: in the C version, there was one `node_persistent_cache` per (forked) thread in the parallelized part while in the C++ version, there is now exactly one cache for all threads. I think these thread-local caches need to be reintroduced because adding locking to the persistent cache would produce too much overhead. It might also be a good idea to have another look into simply mmaping the flatnode file and let the kernel handle the memory issues. It wouldn't work on 32-bit machines, though, so it might not be general enough as a solution.

A further note: binary_search_array is basically a sorted std::vector combined with std:binary_search and could be replaced with them. This is orthogonal to the threading issue.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/229#issuecomment-67741491
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20141220/c1627e20/attachment.html>


More information about the Tile-serving mailing list