[mapguide-internals] Raster provider problems...

Robert Bray rbray at robertbray.net
Sat Apr 7 01:49:28 EDT 2007


Frank,

Yes I am suggesting the server should take responsibility. At the same 
time I wonder if GDAL is not per connection thread safe. What that means 
is that the server will never use the same connection to GDAL on more 
than one thread at any give time.

When you say GDALDataSet you mean the C++ object right? Is a single 
instance of that ever shared between FDO Connection objects? If not then 
  the GDAL Provider can be marked as "Per Connection Threaded".

The server as designed today will never assign an FDO Connection object 
to more than one thread at a time.

Bob

Frank Warmerdam wrote:
> Robert Bray wrote:
>> Hmm,
>>
>> Introducing this is a good thing. The resolution is to single thread 
>> the GDAL provider (and any other provider that supports less than per 
>> connection threaded) to prevent the server from crashing under load.
> 
> Robert,
> 
> Are you suggesting that the resolution is for Mapguide to limit use
> of fdogdal to a single thread?  I would agree that is an appropriate
> solution (as long as it returns that it is single threaded).   I have/had
> the impression that MapGuide had just taken on a policy to not ever
> utilize single threaded providers.
> 
>> really have no choice. To be honest, I am surprised that users using 
>> the GDAL provider have not complained of problems or maybe this is the 
>> source of some of the stability issues and we just have not caught it 
>> because we did not protect the server from non thread safe providers.
> 
> Well, in the case of GDAL it can't guarantee correct multithreaded 
> operation.
> For instance, most format drivers have not been vetted for thread safety
> issues, and I'm sure that at least a few have them.
> 
> And at the point that the provider is asked about thread safety the
> provider doesn't know anything about what format drivers it will be using
> (I think).
> 
> I will note that GDAL is threadsafe under certain restricted circumstances:
> 
>  o Using only threadsafe vetted drivers (ie. GeoTIFF, HFA).
>  o Only having a single thread touch any given GDALDataset at any
>    one time.
> 
> Best regards,


More information about the mapguide-internals mailing list