[mapserver-dev] Mapserver thread safety

Umberto Nicoletti umberto.nicoletti at gmail.com
Wed Aug 14 00:06:57 PDT 2013


I have added OCI_THREADED to the flags passed to OciEnvCreate as per
Andreas suggestion (and fixed a few compile warnings while at it).

You can checkout the changes:

https://github.com/mapserver/mapserver/pull/4729

I'd like to merge this into master today, so I'd really appreciate it if
someone could test it right away.
I'll be on #mapserver if you need assistance.

Ciao,
Umberto



On Tue, Aug 13, 2013 at 7:08 PM, <Michel.Dastous at bentley.com> wrote:

> Andreas,
>
> Is it simple as adding a new flag? If so a compile switch could be added
> to enable it.
>
> Thanks
>
> -----Original Message-----
> From: Andreas Albarello [mailto:andreas.albarello at tol.bz.it]
> Sent: Tuesday, August 13, 2013 12:19 PM
> To: Michel Dastous; mapserver-dev at lists.osgeo.org
> Subject: RE: Mapserver thread safety
>
> On 12.08.2013 21:44, Michel.Dastous at bentley.com wrote
> > I've been testing mapserver and its c# mapscript API for a while now,
> > and I have noticed that making simultaneous Draw request on multiple
> > maps containing Oracle layer > will end up in memory corruption.  No
> > surprise here since maporaclespatial.c uses static variables
> (ordinates_tdo and ordinates).
>
> Michel,
>
> aside from the static variables in maporaclespatial.c there might be
> another issue at play here. Especially when using an Oracle 11g client,
> I've found it necessary to pass both OCI_OBJECT and OCI_THREADED to
> OCIEnvCreate (in msOCISetHandlers). I think right now there's still only
> OCI_OBJECT being passed to the mode parameter of OCIEnvCreate in
> maporaclespatial.c.
>
> See also
> http://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci16rel001.htm#i556149and
> https://forums.oracle.com/thread/575746 with the latter suggesting that
> one might need to use OCI_THREADED even if the application doesn't use the
> same environment handles across different threads which I think MapServer's
> connection pooling is already taking care of.
>
> Regards,
> --
> --------------------------------------------------------------------
> Andreas Albarello
> Analysis & SW Development
>
> Territorium Online srl/GmbH
> Via Buozzi Str. 12
> I 39100 Bolzano/Bozen
>
> Phone:  +39 0471 068611
> Fax:    +39 0471 068619
>
> email: andreas.albarello at tol.bz.it
> web:   http://www.tol.bz.it
> --------------------------------------------------------------------
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20130814/fa13459c/attachment.html>


More information about the mapserver-dev mailing list