-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
-
ALL
Related to SERVER-64584 but totally separate from it is an idea to install, particularly in service executor threads, some instrumentation that can give us some statistics and/or warnings on how much stack is consumed by a callback. Something like
Where we could zero-fill the lower portion of the stack memory, execute the task, and then scan to see where the run of zeros stops, which would traverse all available stack space.
This technique applied naively would in practice cause the kernel to realize all the stack's virtual memory though by incurring page faults. This could be avoided by writing zeros only when the page isn't already full of zeros. We could also get fancy and ask the kernel about which pages of the stack's virtual memory are untouched to save some CPU time and VM stress (maybe via /proc/self/maps and /proc/self/pagemap). For debug builds maybe we don't care about that level of optimization though.
- related to
-
SERVER-64584 Don't hard-code the connection thread stack size
- Backlog
-
SERVER-69905 Improve ServiceExecutorSynchronous worker threads
- Backlog