[mapguide-trac] #1606: "Stack Reserve Size" should increase to 10M

MapGuide Open Source trac_mapguide at osgeo.org
Mon Feb 21 00:15:32 EST 2011


#1606: "Stack Reserve Size" should increase to 10M
----------------------------+-----------------------------------------------
   Reporter:  ChristineBao  |       Owner:  Christine Bao
       Type:  defect        |      Status:  new          
   Priority:  high          |   Milestone:               
  Component:  Server        |     Version:  2.1.0        
   Severity:  trivial       |    Keywords:               
External_id:  1215506.02    |  
----------------------------+-----------------------------------------------

Comment(by ChristineBao):

 == Tech assement: ==

 The memory leak associated with large selections is caused by a stack
 overflow when the MgSelectCommand FDO filter is released and destroyed:

 {{{
 [stack overflow]
         FDO.dll!FdoBinaryLogicalOperator::~FdoBinaryLogicalOperator()
 Line 55  C++
         FDO.dll!FdoBinaryLogicalOperator::`scalar deleting destructor'()
 + 0x8 bytes   C++
         FDO.dll!FdoDistanceCondition::Dispose()  Line 77        C++
         FDOCommon.dll!FdoIDisposable::Release()  Line 98        C++
         FDO.dll!FdoBinaryLogicalOperator::~FdoBinaryLogicalOperator()
 Line 55  C++
         FDO.dll!FdoBinaryLogicalOperator::`scalar deleting destructor'()
 + 0x8 bytes   C++
         FDO.dll!FdoDistanceCondition::Dispose()  Line 77        C++
         FDOCommon.dll!FdoIDisposable::Release()  Line 98        C++
         FDO.dll!FdoBinaryLogicalOperator::~FdoBinaryLogicalOperator()
 Line 55  C++
         FDO.dll!FdoBinaryLogicalOperator::`scalar deleting destructor'()
 + 0x8 bytes   C++
         FDO.dll!FdoDistanceCondition::Dispose()  Line 77        C++
         FDOCommon.dll!FdoIDisposable::Release()  Line 98        C++
         FDO.dll!FdoBinaryLogicalOperator::~FdoBinaryLogicalOperator()
 Line 55  C++
         ...
         MgServerFeatureServiced.dll!MgSelectCommand::~MgSelectCommand()
 Line 57        C++
         MgServerFeatureServiced.dll!MgSelectCommand::`scalar deleting
 destructor'()  + 0x16 bytes       C++

 }}}



 When you have a large selection the filters can get very large,
 e.g.:[[BR]]

 {{{
 (FeatId=17282) OR (FeatId=17283) OR (FeatId=17284) OR (FeatId=17285) OR
 (FeatId=17286) OR
 (FeatId=17287) OR (FeatId=17288) OR (FeatId=17289) OR (FeatId=17290) OR
 (FeatId=17291) OR
 (FeatId=17292) OR (FeatId=17293) OR (FeatId=17294) OR (FeatId=17295) OR
 (FeatId=17296) OR
 (FeatId=17297) OR (FeatId=17298) OR (FeatId=17299) OR (FeatId=17300) OR
 (FeatId=17301) OR
 ...

 }}}



 and so the hierarchy of objects in the FDO filter is also large.  For the
 default stack size (1Mb) this hierarchy can eventually get too large, and
 you'll get the stack overflow.  And once that happens then the memory
 associated with the filter objects is not released (plus the stack for
 that thread becomes corrupted).

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


More information about the mapguide-trac mailing list