Closed mmd-osm closed 4 years ago
The C++ code catches all exceptions and calls luaL_error()
, so there is no exception crossing the C++/Lua boundary. I am not sure exectly what's going on here, but removing the noexcept
from the function called by Lua fixes the problem for me. @mmd-osm Please test whether the PR works for you.
Retest looks good here!
./osm2pgsql -d osm2 --create --slim -P 5434 -O flex -S ../flex-config/default-config.lua saarland-latest.osm.pbf
osm2pgsql version 1.2.0 (1.2.0-246-g8b3c3cb-changed) (64 bit id space)
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=800MB, maxblocks=12800*65536, allocation method=11
Mid: pgsql, cache=800
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels
Using projection SRS 3857 (Spherical Mercator)
Reading in file: saarland-latest.osm.pbf
Using PBF parser.
Processing: Node(3652k 521.7k/s) Way(598k 85.43k/s) Relation(0 0.00/s)node cache: stored: 3652013(100.00%), storage efficiency: 50.08% (dense blocks: 15, sparse nodes: 3584640), hit rate: 100.00%
Osm2pgsql failed due to ERROR: Failed to execute lua processing function: ../flex-config/default-config.lua:245: Error in 'add_row': Missing geometry transformation for column 'geom'
./osm2pgsql -V
osm2pgsql version 1.2.0 (1.2.0-246-g8b3c3cb-changed) (64 bit id space)
Compiled using the following library versions:
Libosmium 2.15.4
Lua 5.1.4 (LuaJIT 2.1.0-beta3)
Errors during processing trigger a dump when using LuaJIT. I'm suspecting that LuaJIT somehow chokes during stack unwinding a C++ -> Lua -> C++ stack. The issue is LuaJIT specific, and doesn't occur on Lua 5.2.
Platform: Ubuntu 18.04, x64
Lua 5.2 would report: _Osm2pgsql failed due to ERROR: Failed to execute lua processing function: ../flex-config/default-config.lua:245: Error in 'addrow': Missing geometry transformation for column 'geom'