FOLLOWUP: [mapguide-internals] DBXML upgrade for MapGuide 2.3

Andreas Morf a.morf at fkl.ch
Fri Jul 9 10:27:18 EDT 2010


Hi all
I'm quite stuck with this dbxml-2.5.16:
mgserver is up and running having created empty repositories! But after one
or two MgRepositoryManager::SetResource() execution it's going to hang...
I found that it is due to a dbxml-deadlock which I can see with db_stat.
db_stat also shows some read-locks held immediately after starting mgserver:
is that correct behaviour?

Besides I did a db_stat of the repository of mgserver2.1 after running into
the problem described in ticket 1376 -- bingo - also a deadlock state.

IMHO we are having some operation sequences on dbxml which are not isolated
correctly or ops which are outside of any transaction

Any further ideas?
Andreas

> -----Original Message-----
> From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-
> internals-bounces at lists.osgeo.org] On Behalf Of Andreas Morf
> Sent: Saturday, June 12, 2010 4:04 PM
> To: 'MapGuide Internals Mail List'
> Subject: FOLLOWUP: [mapguide-internals] DBXML upgrade for MapGuide 2.3
> 
> Hi all,
> I have a running mgserver (from trunk) using dbxml-2.5.16, geos-3.2.2
> which
> I set up because of the strange  behaviour described in ticket 1376
> (trac.osgeo.org/mapguide/ticket/1376).
> 
> Besides several small fixes which are caused by xerces update to v3 a
> strange malfunction interrupted my work for quite a few time:
> 
> When running mgserver on emtpy/new repositories the new dbxml-files are
> created, but all the documents in the site repository were available
> but
> empty (preconfigured users, roles...)
> After some investigations i found a place to correct this behaviour:
> 
> In MgDev\Server\src\Services\Resource\ResourceContentManager.cpp at
> line 175
> the content is added to the xmlDoc to store:
> 
>     xmlDoc.setContent(document);
> 
>     // Add the resource content.
> 
>     XmlUpdateContext updateContext = xmlMan.createUpdateContext();
> 
>     PutDocument(resource, xmlDoc, updateContext);
> 
> If adding the following statement before that:
> 
>     std::string cont = std::string(document);
> 
> and using 'setContent(cont);' instead, everything works ok (so the
> copy-constructor created a suitable string).
> 
> So it seems that the 'const string& document' which is created with
> 'content->ToStringUtf8(contentDoc);' from a MgByteReadre is not in a
> correct
> state...
> Also it is strange that 'cout << document' is resulting with reasonable
> output to the screen...
> 
> Any idea about how and where to find the source of the problem?
> 
> Andreas
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: mapguide-internals-bounces at lists.osgeo.org
> [mailto:mapguide-internals-bounces at lists.osgeo.org] Im Auftrag von
> Rohit
> Razdan
> Gesendet: Freitag, 11. Juni 2010 21:25
> An: MapGuide Internals Mail List
> Betreff: [mapguide-internals] DBXML upgrade for MapGuide 2.3
> 
> Hi all,
> As part of my GSOC project I have been attempting to make the
> build/installation experience of MapGuide better on Linux. As part of
> this
> attempt, I have been trying to use 'native' 3rd party OEMs where
> possible
> and this mail is with regards to DBXML.
> 
> The version we are using right now is DBXML 2.3.10 with xerces 2.7. The
> latest version is 2.5.16 compiled with Xerces 3.0.1 but requires Xerces
> above 2.7.[1] MapGuide also uses Xerces sources and the code breaks if
> Xerces is upgraded to anything above 2.7 (a summary of changes is at
> [2]).
> Xerces is already an installable package on Ubuntu and there has been
> talk
> of including DBXML as well. On CentOS, Xerces 2.7 is available. But
> DBXML is
> not an installable package on Ubuntu or CentOS.
> 
> Now ideally we would want our user to install Xerces from the standard
> repos, build/install DBXML ( I plan on creating rpm/debs for it ) and
> build/install MapGuide independently from its dependencies.  But this
> would
> involve updating the code base to the new standards. I am working on
> the
> changes now and right now the changes *appear* to be not so major. The
> issues I have faced till now [3] are only from the changes in Xerces
> but it
> is entirely possible that upgrading from DBXML 2.3 to DBXML 2.5 would
> bring
> its own changes.
> 
> So the options that we have right now are:-
> 
>    - Upgrade to DBXML 2.5 along with the latest Xerces. This would be a
> step
>    in our aim of making MapGuide installation easy and standard.
>    - Upgrade to DBXML 2.5 but retain Xerces 2.7 . This would be counter
>    intuitive to our stated goals of independent 3rd part dependencies
>    installation. In fact given that Xerces is available as a package,
> it
> makes
>    more sense to upgrade Xerces first.
>    - Upgrade to DBXML 2.4 which uses Xerces 2.8. This also breaks the
> code,
>    but the fix appears to be pretty easy. Just including a header file
> that
> was
>    previously automatically included. [3]
>    - Package current DBXML 2.3 as an rpm/deb and continue to use Xerces
> 2.7.
> 
> Rohit
> 
> LINKS
> [1]
> http://www.oracle.com/technology/software/products/berkeley-
> db/xml/index.htm
> l.DBXML
> download and changelog info.
> [2] http://xerces.apache.org/xerces-c/migrate-archive-3.html . (Xerces
> migration issue list)
> [3] As part of a very preliminary look, the errors I have seen till now
> are
> related to
> 
>    - "When using SAX2, including XMLReaderFactory to use
> createXMLReader
>    doesn't include xercesc/parsers/SAX2XMLReaderImpl.hpp anymore."
>    - "A number of DOM interfaces (DOMBuilder, DOMWriter,
> DOMInputSource,
>    etc.) were replaced as part of the the final DOM Level 3
> specification
>    conformance work."
> 
> Of course more are to be expected. I am not familiar enough with the
> source
> as of now.
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
> 
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals



More information about the mapguide-internals mailing list