On 05/11/2015 16:57, Even Rouault wrote: > Le jeudi 05 novembre 2015 16:27:40, Pierre Soille a écrit : >> Hello! >> >> when reading 1000's of jp2 images with the JP2OpenJPEG/JPEG-2000 driver, >> I get from time to time the following error: > How do you read them ? Within the same process one after the others ? With > (many) threads ?
I read one file by process. Since the process are not limited by the RAM, there are as many processes on the compute node as its number of cores. I therefore set OMP_NUM_THREADS to 1. However, it seems that the code that creates the error uses pthreads (rather than OpenMP). I suspect that there are too many (p)threads running simultaneously. I am not familiar with pthreads but setting POSIX_NUM_THREADS to 1 did not help (in fact I do not see any reading of an environment variable in the cpl_multiproc.cpp code). Thanks a lot, Pierre > >> FATAL: CPLGetTLSList() failed to allocate TLS list! >> >> It seems that this error occurs in cpl_multiproc.cpp in case not a call >> to VSICalloc() returns a NULL pointer, >> see >> https://github.com/mapbox/node-srs/blob/master/deps/osr/src/cpl_multiproc.c >> pp#L665 > I'm not sure why you mention this repository (although it is code that comes > originally from GDAL) > >> Any idea/hint, why this type of error could occur? > The immediate answer is out of memory condition. That said, the root cause > might be something else. Hard to diagnose without stack trace, etc... > > Are you sure there's not a memory leak in your code... ? > >> Thanks, >> >> Pierre >> _______________________________________________ >> gdal-dev mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
