#1606 closed defect (fixed)
"Stack Reserve Size" should increase to 10M
Reported by: | ChristineBao | Owned by: | Christine Bao |
---|---|---|---|
Priority: | high | Milestone: | 2.3 |
Component: | Server | Version: | 2.2.0 |
Severity: | trivial | Keywords: | |
Cc: | Bruce Dechant, Jenny He | External ID: | 1215506.02 |
Description
Report from Autodesk QA:
- Load the attached treepoints.sdf and create Basic web layout.
- View the map in browser, select all the features.
Result:
Repeat with a similar selection set after the first completes and the server memory grows by about 10 or 11MB a request.
Attachments (3)
Change History (12)
by , 13 years ago
Attachment: | treepoints.zip added |
---|
comment:1 by , 13 years ago
by , 13 years ago
Attachment: | Fix#1606.patch added |
---|
comment:3 by , 13 years ago
Attach http://trac.osgeo.org/mapguide/attachment/ticket/1606/Fix%231606.patch for fixing this defect.
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Submit the patch to fix this defect.
comment:5 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This only fixes Windows. Linux needs to be fixed too.
comment:6 by , 13 years ago
To fix Linux you need to update the Makefile.am files and remove this line:
ulimit -s 1024
The above line sets the stack to 1MB. The default stack size on Linux is 10MB.
by , 13 years ago
Attachment: | FixLinux.patch added |
---|
comment:7 by , 13 years ago
Thanks Bruce for picking up Linux. Attach http://trac.osgeo.org/mapguide/attachment/ticket/1606/FixLinux.patch for review.
comment:8 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Commit the patch to fix it.
comment:9 by , 13 years ago
Milestone: | → 2.3 |
---|---|
Version: | 2.1.0 → 2.2.0 |
Tech assement:
The memory leak associated with large selections is caused by a stack overflow when the MgSelectCommand FDO filter is released and destroyed:
When you have a large selection the filters can get very large, e.g.:
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).