<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:40:10 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-35542] Configurable service worker thread stack size</title>
                <link>https://jira.mongodb.org/browse/SERVER-35542</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The size of the stack used by service worker threads (aka connection threads) is hardcoded to a maximum of 1MB, regardless of the RLIMIT_STACK ulimit.  Some users might want to increase the stack size for these threads, so it would be nice to have a server parameter instead of the hardcoded 1048576.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r4.1.0/src/mongo/transport/service_entry_point_utils.cpp#L71-L82&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/r4.1.0/src/mongo/transport/service_entry_point_utils.cpp#L71-L82&lt;/a&gt;&lt;/p&gt;</description>
                <environment>POSIX</environment>
        <key id="557776">SERVER-35542</key>
            <summary>Configurable service worker thread stack size</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="billy.donahue@mongodb.com">Billy Donahue</assignee>
                                    <reporter username="kevin.pulo@mongodb.com">Kevin Pulo</reporter>
                        <labels>
                            <label>service_architecture_continuous_delivery</label>
                    </labels>
                <created>Tue, 12 Jun 2018 01:31:09 +0000</created>
                <updated>Tue, 15 Nov 2022 06:54:33 +0000</updated>
                            <resolved>Fri, 4 Nov 2022 16:46:24 +0000</resolved>
                                                                    <component>Internal Code</component>
                    <component>Networking</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="4955730" author="billy.donahue" created="Fri, 4 Nov 2022 17:01:08 +0000"  >&lt;p&gt;SECURITY-178 was about a 1000 element aggregation pipeline. If we need to support a pathological query like that (and maybe we should just reject it!), we have to make aggregation pipelines nonrecursive. Any recursive algorithm can be transformed into an iterative algorithm so that the resources managing that pipeline&apos;s execution use an unlimited heap-allocated stack data structure instead of the limited thread call stack. Furthermore, the iterative algorithm can be cleanly deallocated at the end of the query.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Stack&lt;/em&gt; space in the RSS memory map cannot be reused. The high-water mark of a thread&apos;s stack is permanently &quot;realized&quot; memory. The only way to reclaim it is by exiting the thread. Heap memory can be reused much more readily.&lt;/p&gt;

&lt;p&gt;Changing stack sizes can only change a constant factor here, and has undesirable side effect of overallocating threads that won&apos;t need the deep recursion.&lt;/p&gt;</comment>
                            <comment id="4953788" author="billy.donahue" created="Thu, 3 Nov 2022 22:18:45 +0000"  >&lt;p&gt;Let&apos;s reopen this discussion when there&apos;s a case of a command running out of stack space while following a bug-free code path.&lt;/p&gt;

&lt;p&gt;I don&apos;t believe mongo servers should have a user-configurable server parameter for this. If a user has a workload that can&apos;t be accomplished in 1 MiB of stack, I&apos;d like MongoDB to consider that a bug in the server, and think hard about where that user&apos;s stack space is going, and mitigate the problem through algorithmic refactors or heap allocations, or just reject that command. 1MiB is already an extremely generous amount of space for a stack. macOS only gives 512kiB, I believe.&lt;/p&gt;

&lt;p&gt;There should not be any user queries that consume the full 1MiB at all. The only reason we customize the ingress worker thread stack size is to decrease it further than the default as a canary to find bugs more aggressively.&lt;/p&gt;</comment>
                            <comment id="4952809" author="connie.chen" created="Thu, 3 Nov 2022 17:05:08 +0000"  >&lt;p&gt;Billy to investigate this and potentially close or link as a dupe&lt;/p&gt;</comment>
                            <comment id="4375669" author="JIRAUSER1262719" created="Thu, 24 Feb 2022 21:55:29 +0000"  >&lt;p&gt;We haven&#8217;t heard back from you for at least one calendar year, so this issue is being closed. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="417978">SERVER-30738</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="134706">SERVER-13825</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 12 Jun 2018 12:46:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 13 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>kevin.pulo@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 13 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>connie.chen@mongodb.com</customfieldvalue>
            <customfieldvalue>kevin.pulo@mongodb.com</customfieldvalue>
            <customfieldvalue>lauren.lewis@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu0c9j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8l13:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htzyiv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>