[SERVER-7735] Incorrect stack size on Mac OS Created: 21/Nov/12  Updated: 20/May/16  Resolved: 20/May/16

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 2.3.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X


Backwards Compatibility: Fully Compatible
Operating System: OS X
Participants:

 Description   

For the debug build of the test program (at least), it looks like we are getting the default thread stack size of 512 KB instead of the 1 MB that we get on all other platforms.

On Linux and Windows, I can set the StackChecker limit to 800 KB to see how much stack space is used in a test, then set it back down to a value calculated to pass the StackChecker limit. When I try this on the Mac, I get

Bus error: 10

Same error with 510 KB. Dropping the limit to 490 KB gets me past the bus error.



 Comments   
Comment by Mira Carey [ 20/May/16 ]

We're fairly all in on std::thread's at this point and just don't have the ability to pervasively change stack size on threads.

Comment by Tad Marshall [ 01/Feb/13 ]

This is easy to fix for the general case of threads serving client connections, a bit harder (more code to change) to fix it for internal threads.

Generated at Thu Feb 08 03:15:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.