[gdal-dev] JNI error for OpenFileGDB driver in Concurrent environment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] JNI error for OpenFileGDB driver in Concurrent environment

Yang

I am using gdal with java binding in my web application to load .gdb data through the OpenFileGDB driver, however I found that for a single request, it will work as expected, but some JNI related error will occur when multiple requests to be served at the same time, like this:

ERROR 1: Error occurred in e:\sdk\vc15x64\gdal\gdal\ogr\ogrsf_frmts\openfilegdb\filegdbtable.cpp at line 1333
ERROR 1: Error occurred in e:\sdk\vc15x64\gdal\gdal\ogr\ogrsf_frmts\openfilegdb\filegdbtable.cpp at line 1417
ERROR 1: Error occurred in e:\sdk\vc15x64\gdal\gdal\ogr\ogrsf_frmts\openfilegdb\filegdbtable.cpp at line 1333
ERROR 1: Error occurred in e:\sdk\vc15x64\gdal\gdal\ogr\ogrsf_frmts\openfilegdb\filegdbtable.cpp at line 1417
ERROR 1: Error occurred in e:\sdk\vc15x64\gdal\gdal\ogr\ogrsf_frmts\openfilegdb\filegdbtable.cpp at line 1515
ERROR 1: Error occurred in e:\sdk\vc15x64\gdal\gdal\ogr\ogrsf_frmts\openfilegdb\filegdbtable.cpp at line 1515
ERROR 1: Error occurred in e:\sdk\vc15x64\gdal\gdal\ogr\ogrsf_frmts\openfilegdb\filegdbtable.cpp at line 1346
ERROR 1: Error occurred in e:\sdk\vc15x64\gdal\gdal\ogr\ogrsf_frmts\openfilegdb\filegdbtable.cpp at line 1417

Then the whole JVM will crash. And one of the auto-generated crash log file has been uploaded here: https://pastebin.ubuntu.com/p/FBr86Qqnqc/

So I wonder if there are any instructions about the usage of gdal java api, for example which resources have to be released at when, and which resources support multiple threads and etc.

‚Äč


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: JNI error for OpenFileGDB driver in Concurrent environment

Even Rouault-2
On samedi 17 octobre 2020 15:44:15 CEST Yang wrote:
> I am using gdal with java binding in my web application to load .gdb data
> through the OpenFileGDB driver, however I found that for a single request,
> it will work as expected, but some JNI related error will occur when
> multiple requests to be served at the same time, like this:

Do you use the same GDAL dataset object concurrently from several threads ? If
so, that's the reason. No GDAL objects can't be used concurrently. If you want
to read from several threads, you need to open one dataset object per thread.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev