[Gdal-dev] Threading and CSV files
Frank Warmerdam
warmerdam at pobox.com
Thu Dec 22 23:47:29 EST 2005
On 12/22/05, Sheykhet, Rostic <rsheykhet at sanz.com> wrote:
> Hi All/Frank,
>
> I am trying to debug a SEGFAULT in gdal 1.3.1 on Linux with multiple
> threads accessing the same tiff file. Each thread creates its own
> DataSource. Looks like what's happening is that multiple threads are
> trying to access the same data structure (CSV file table defined in
> cpl_csv.cpp) concurrently and are corrupting it. The table variable is
> declared as CPL_THREADLOCAL, but CPL_THREADLOCAL is currently a blank
> #define statement. Is there a way to bypass/mitigate this issue?
Rostic,
Good point. I have commited changes to protect the
open csv file list in cpl_csv.c with a mutex. Could
you try again with those changes in place? I have
tried some fairly intensive multiple thread TIFF access
before, but didn't encounter this particular problem.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list