[mapguide-internals] RE: GDAL stability in MGOS 2.1

Trevor Wekel trevor_wekel at otxsystems.com
Tue Dec 29 11:46:35 EST 2009


Hi everyone,

I am forwarding this email chain to the -internals list for further discussion.  It seems as though we still have stability problems with some raster file formats under MapGuide/GDAL.  Haris has indicated that he feels that is more probably an MG problem than a GDAL problem.  I agree with him in that any analysis we perform must include both the server and the provider.  As far as I know, other Fdo providers do not exhibit instability so the combination of the server and GDAL is problematic.

So where do we go from here?  Based on my experience with MapGuide and raster in general, this could be a lengthy and multi-faceted problem to solve.  I expect that will find more than one issue to resolve when a deeper analysis is undertaken.

I also believe we should fix the core problems instead of simply band-aiding them.  In other words, putting a big fat mutex over all raster processing would likely fix the issues our user base is seeing but it will also throw any kind of scalability out the window.  Getting MapGuide/GDAL thread safe with appropriately scalable mutexing will be more difficult and take longer.

Once we come to agreement on what we are trying to achieve, we should then figure out who should do the work and how we go about funding it.  Based on past experience, this project could take a while.

I believe Haris and I are both qualified to do this work.

For myself, I do have enough hardware, software, and data "in-house" to accomplish this task - at least for TIFF, ECW and SID.  I also have some unallocated time available to work on this.  If the code changes become very involved, collaboration with people at Autodesk may be easier for me.  I can commute to the Calgary office and maybe someone will be nice enough to let me in.

If I am given the nod to perform this work, I would start with an initial 1 week time block.  One week should be enough to set up an appropriate test environment, reproduce the problem(s), and begin the analysis.  For longer term projects like this, my weekly rate is $3800 CAD including GST.

Thanks,
Trevor


From: Trevor Wekel
Sent: December 28, 2009 11:00 PM
To: 'MapGuide Users Mail List'
Subject: RE: [mapguide-users] [MGOS 2.1]few map with Ecw, need restart mapguide service

Hi Haris,

Yes.  A significant portion of the Server connection management logic was rewritten for MGOS 2.1.  However, since Autodesk has no vested interest in the GDAL Provider (they didn't write it) it might make more sense to have someone from the community look at it.  I have dug around in that code before and I assume you have as well.

I would be concerned about making significant changes to the Server connection management logic.  Any significant change could impact stability with all other Fdo Providers.  Hopefully we are just looking at simple bug fixes or low impact changes.  It would be very time consuming to set up a test environment for all of the open source providers.  And personally I would not check in major code changes to a key area like this without some fairly serious testing, especially if we want to do it on the released 2.1 branch.

I also believe there are three areas where instability can creep in:  GDAL Provider code, Server code, and Server use cases against the GDAL Provider.  It might be wise to qualify the statement "basically completely thread safe" with "for specific use cases".  I am not sure that complete thread safety is a guarantee without 100% code coverage.  One liners can be a killer for multi-threaded apps.

In any case, the MapGuide Server code base and the GDAL code base have to be analysed together to see what the interaction behaviour is.  I guess we should move this discussion to the -internals list so the PSC and the developers can decide who should take a crack at the initial investigation, and whether any funding is available to support the investigation.

Thanks,
Trevor


From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Haris Kurtagic
Sent: December 28, 2009 10:55 AM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] [MGOS 2.1]few map with Ecw, need restart mapguide service

In 2.0 release I fixed MG connection problems which caused MG to crash mostly on GDAL provider.
We had discussion in PSC and somebody (ADSK ?) took different approach to implement changes in 2.1. It would be fine that the one who implemented that changes perhaps look again.

>From what I read here it seems it is very similar problem as before and it was not GDAL provider problem but MG connection manager. It is just that under GDAL provider those problems came out most obviously.
GDAL provider is basically compeletly thread safe (many locks there).

So, my first feeling is that it is more probably MG problem then GDAL provider problem, again.

Haris

On Mon, Dec 28, 2009 at 6:28 AM, Andy Morsell <amorsell at spatialgis.com<mailto:amorsell at spatialgis.com>> wrote:
Trevor,
What would it require, in terms of funding, to have you spend enough time
examining the provider and problems to come up with an approach and labor
estimate to improve it?  Maybe we can collectively raise enough money from
contributors to fund the functional specifications determination and then
see if we can fund the full project after.

Thanks,

Andy Morsell, P.E.
Spatial Integrators, Inc.
47° 46' N 116° 49' W
www.SpatialGIS.com<http://www.SpatialGIS.com>

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org<mailto:mapguide-users-bounces at lists.osgeo.org>
[mailto:mapguide-users-bounces at lists.osgeo.org<mailto:mapguide-users-bounces at lists.osgeo.org>] On Behalf Of Trevor Wekel
Sent: Sunday, December 27, 2009 9:15 PM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] [MGOS 2.1]few map with Ecw, need restart
mapguide service


Just as a point of reference, I have been involved with MapGuide and raster
since the MapGuide 6.x days.  Stable multi-threaded performance is difficult
to achieve due to the sheer number of third party libraries involved.  From
what I recall, Autodesk spent at least two developer months in the last
release getting the Autodesk Raster Provider to the stable and relatively
scalable state it is in currently.

This is not an easy task.  Each file format has to tested, analysed, and
fixed separately because the underlying "codec" libraries are all different
and come from different vendors.  In other words, stability with TIFF data
does not guarantee stability with ECW or MrSID.  In some cases, the vendor
libraries may not be 100% thread safe.  MapGuide is a heavily multi-threaded
application.  If there is a thread safety problem, it is almost guaranteed
that MapGuide will trip over it at some point.

This makes testing and validation especially painful.  I would consider a 24
hour load test on a 4 core machine to be a bare minimum test run for
stability.  8+ cores would be preferable.

I personally like working on raster integration in MapGuide.  However, I
also have enough background to know that it can be a bit of a black hole as
far as development resources go.  Hopefully we as a community can raise
enough funds through Project Sponsorship to pay a developer to bury his head
in the raster provider for a couple of months.

Thanks,
Trevor

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org<mailto:mapguide-users-bounces at lists.osgeo.org>
[mailto:mapguide-users-bounces at lists.osgeo.org<mailto:mapguide-users-bounces at lists.osgeo.org>] On Behalf Of Jason Birch
Sent: December 27, 2009 6:47 PM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] [MGOS 2.1]few map with Ecw, need restart
mapguide service

It has been pretty decent for me with tiled, overviewed GeoTiffs and
connection cache disabled...

Folks, this is a known problem, but unless someone steps up to fix it,
it is unlikely to get resolved.  ADSK has a proprietary raster
provider, so don't have a vested interest in diagnosing and fixing
this problem.

As I see it, there are two options: wait and hope someone steps in and
fixes it, or pay someone with the experience and ability (Trevor,
Haris, maybe Frank, Kenneth, UV, maybe others) to do it.

Raster in MGOS has been a pain point for at least two releases, so I
wouldn't hold my breath on the first option...

Jason

On 2009-12-27, isca <mapguide2007 at gmail.com<mailto:mapguide2007 at gmail.com>> wrote:
>
> It seems the GDAL provider still acts very unstable under MGOS 2.1. There
> has
> been logged a ticket for this. Refer to #1196 MapGuide unresponsive using
> GDAL provider.
>
>
> lunab54 wrote:
>>
>> I make another experience
>>
>> i get an old unused windows 2003 server and i installed MapGuide 2.1 with
>> ecw support
>>
>> miracle ! mapguide with gdal ecw layer run well like service (not debug
>> mode)
>>
>> so i copied the c:\program Files\osgeo\mapguide on the new 2003 server
>> that not run with ecw layer
>>
>> and it's always the same thing : Gdal turn around and the mapguide log
>> said :
>>
>> <2009-12-21T17:46:58>        4160    Ajax Viewer     127.0.0.1
Administrator
>>  Error: Failed to stylize layer: LAYER_ECW_DEBUG
>>         Cannot create any more connections to the OSGeo.Gdal FDO
provider.
>>  StackTrace:
>>   - MgMappingUtil.StylizeLayers() line 776 file
>> c:\osgeo\mapguide_21\mgdev\server\src\services\mapping\MappingUtil.cpp

>>
>> so now i think there is missing something on this system but what ?
>>
>> help...
>>
>>
>
> --
> View this message in context:
>
http://n2.nabble.com/MGOS-2-1-few-map-with-Ecw-need-restart-mapguide-service
-tp4177077p4221048.html<http://n2.nabble.com/MGOS-2-1-few-map-with-Ecw-need-restart-mapguide-service%0d%0a-tp4177077p4221048.html>
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org<mailto:mapguide-users at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org<mailto:mapguide-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapguide-users



_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org<mailto:mapguide-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapguide-users



More information about the mapguide-internals mailing list