[Mapguide-trac] [mapguide-trac] #2596: Constant crashes under high load/many concurrent requests

MapGuide Open Source trac_mapguide at osgeo.org
Tue Jun 21 23:47:32 PDT 2016


#2596: Constant crashes under high load/many concurrent requests
------------------------------+---------------------
 Reporter:  andymorf          |        Owner:
     Type:  defect            |       Status:  new
 Priority:  high              |    Milestone:  3.1
Component:  Server            |      Version:  3.0.0
 Severity:  blocker           |   Resolution:
 Keywords:  crash, high load  |  External ID:
------------------------------+---------------------

Comment (by jng):

 My current findings thus far.

 I was able to finally reproduce this problem and am strongly suspecting
 that it is some kind thread-safety issue around strings.

 This error from the provider

 {{{
 c_KgOraSelectCommand.Execute : ERROR: FindClassDefinition() return NULL
 }}}

 is most likely because it was fed a corrupted string as a result of
 intense multi-threaded usage.

 I found an old mapguide-internals thread which highlighted some pitfalls
 around STL string usage in a multi-threaded environment (http://osgeo-
 org.1560.x6.nabble.com/std-string-not-thread-safe-on-Linux-
 td4210940i20.html)

 Which leads me to suspect it is some thread-safety issue around `MgUtil`
 and its static `sm_classNameQualifier` STL string member
 (https://trac.osgeo.org/mapguide/browser/trunk/MgDev/Common/Foundation/System/Util.cpp#L1232).
 I think corruption is being introduced by multiple threads concatting from
 that same static STL string.

 Why do I think this? Because this is the file where VS generally starts
 breaking on when it starts access violating in my load tests. Other places
 where it breaks on access violation also happen to be places that involve
 an FDO class name that would've went through MgUtil one way or another.

--
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/2596#comment:2>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list