-
Notifications
You must be signed in to change notification settings - Fork 166
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
Crashing at exit #251
Comments
crash report: https://gist.github.com/vsivsi/320dcd68175fb9670e4d from mapbox/tilelive-mapnik#80 |
crash report https://gist.github.com/tmcw/11187569 - which was worked around by not using the OGR plugin. So it seems like at least in this case (tilelive-overlay) the OGR plugin was causing a crash at exit. Switching out for the CSV plugin avoided the problem (mapbox/geojson-mapnikify@b65856b). |
Another case which only happens when the GDAL plugin is involved, so this is starting to look like some kind of threading conflict between gdal and libuv. |
looks like we need to be calling
|
6b2b2a9 avoids the crash but is not feasible because node-mapnik, and libmapnik itself do not and cannot link to libgdal directly because libgdal is only linked to the dynamically loaded Mapnik Trying to register and Here is the full crash:
|
…ders from node-mapnik - refs #251
just found that building gdal with |
my punishment for:
|
another data point: only happens with node v0.10.x and not v0.8.x (based on one travis build: https://travis-ci.org/mapnik/node-mapnik/builds/25319869) |
@springmeyer My most recent seg fault crash reports for my ogr datasources: Currently attempting creating Datasources as CSV's. |
noting that |
core dump on ubuntu 14.04 looks like:
|
rebuild in debug, but basically the same backtrace: https://gist.github.com/springmeyer/ca6e2afec1b4d2ce29d7 |
Does dropping GDAL/OGR plugins away and doing a minimal GDAL build help at all? Guess it's hard to know which :) |
Here are workarounds I've tried that do not work / still crash
To recap, the only viable workaround so far is building gdal |
can |
good idea - @artemp had a similar idea today, which is to create a singleton in mapnik to be able to call GDALRegisterALL only once rather than per datasource constructor. This singleton could also be used to call |
Note: [email protected] went out with binaries using gdal build with |
another finding: Building mapnik with |
another workaround: |
working on testcase that removes Node.js and Mapnik at https://github.com/springmeyer/gdal-atexit-crash |
…ders from node-mapnik - refs mapnik#251
solved and should no longer happen in [email protected]. Solution was a combination of http://trac.osgeo.org/gdal/ticket/5509#comment:11 (which requires GDAL >= 2.0 since it is not backported to GDAL 1.11.x) and starting to bundle a libgdal shared library instead of statically linking libgdal.a. |
Woooo! Nice @springmeyer !!! |
re-opening, still seeing problems |
latest crash is when using KML: https://gist.github.com/springmeyer/9aa01910103230209950 |
closing, this turns out to be a tilelive-bridge / mocha forcibly exiting bug: mapbox/tilelive-bridge#19 |
Noting that the resolution to this problem was to move to packaging libgdal as a dynamic library. However the move to mason (#738) moved back to a static library for gdal. |
Also noting that #328 has more info on related issues. |
Been seeing some odd crashes that show that node-mapnik may crash as the Node.js process exits. The condition occurs because node-mapnik is still rendering in a thread while the main event loop closes and the process unloads memory (and mapnik datasource plugins).
A first I thought this was a fluke but users have been reporting it occasionally in the past month. So perhaps something changed in Mapnik 2.3.x or node-mapnik to make this possible.
The text was updated successfully, but these errors were encountered: