[Tile-serving] [openstreetmap/osm2pgsql] Fix a crash when an exception is thrown in postprocessing (PR #2018)

Jochen Topf notifications at github.com
Fri Jul 28 12:16:28 UTC 2023


Postprocessing (like building indexes) on output tables happens in parallel. If there is a problem an exception is thrown which is forwarded to the main thread. Here the normal exception handling will clean up everything including the table datastructures still used by the postprocessing of the other tables which might still be in flight.

We fix this by storing the exception, waiting for all threads to finish and only then passing on the exception.

It is rather unlikely that we'll see this problem in the pgsql output because tables are more or less hardcoded there. It is more likely in the flex output, where users have many options of creating some havoc with unusual table definitions or so. In the flex output we store the table name so that there is at least a chance of narrowing down the problem somewhat.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/2018

-- Commit Summary --

  * Fix a crash when an exception is thrown in postprocessing

-- File Changes --

    M src/output-flex.cpp (16)
    M src/output-pgsql.cpp (10)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/2018.patch
https://github.com/openstreetmap/osm2pgsql/pull/2018.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/2018
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/pull/2018 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230728/1deec826/attachment.htm>


More information about the Tile-serving mailing list