<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:58:19 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-41654] Better behavior for large backtraces printed from signal handler</title>
                <link>https://jira.mongodb.org/browse/SERVER-41654</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;It looks like we have a special stream class which we use to avoid calling malloc in signal handlers &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4304ce376401b5213b63611d94f9fb1d938d9e39/src/mongo/util/signal_handlers_synchronous.cpp#L95&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It uses a pre-allocated buffer of 100k bytes. Unfortunately, the JSON blob for a very deep stack trace (on my machine, at least) can be more than 100,000 characters, and get truncated when logged from the signal handler. I&apos;m not sure if stack traces can be so large on &quot;release&quot; builds, but it would be a shame if a customer&apos;s node crashed and the printed stacktrace were cut off. I think we should consider doing:&lt;/p&gt;

&lt;p&gt;1) Show the human readable stacktrace first (see &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4304ce376401b5213b63611d94f9fb1d938d9e39/src/mongo/util/stacktrace_posix.cpp#L222-L244&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;). This way, if the output is truncated, something useful is printed. A partial JSON blob is basically useless for day-to-day debugging purposes.&lt;br/&gt;
 2) Increase the size of the buffer used in the signal handler&apos;s output stream (see &lt;a href=&quot;https://github.com/mongodb/mongo/blob/4304ce376401b5213b63611d94f9fb1d938d9e39/src/mongo/util/signal_handlers_synchronous.cpp#L112&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;</description>
                <environment></environment>
        <key id="798931">SERVER-41654</key>
            <summary>Better behavior for large backtraces printed from signal handler</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="13201">Fixed</resolution>
                                        <assignee username="billy.donahue@mongodb.com">Billy Donahue</assignee>
                                    <reporter username="ian.boros@mongodb.com">Ian Boros</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Jun 2019 16:36:35 +0000</created>
                <updated>Sun, 29 Oct 2023 22:20:05 +0000</updated>
                            <resolved>Wed, 9 Oct 2019 17:49:48 +0000</resolved>
                                                    <fixVersion>4.3.1</fixVersion>
                                    <component>Diagnostics</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2478954" author="xgen-internal-githook" created="Sat, 12 Oct 2019 05:25:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Billy Donahue&apos;, &apos;username&apos;: &apos;BillyDonahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41654&quot; title=&quot;Better behavior for large backtraces printed from signal handler&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41654&quot;&gt;&lt;del&gt;SERVER-41654&lt;/del&gt;&lt;/a&gt; fix libunwind build&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/8d5fc650b1c3a38a9d4630a48fe856eba56d6171&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/8d5fc650b1c3a38a9d4630a48fe856eba56d6171&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2478924" author="billy.donahue" created="Sat, 12 Oct 2019 02:00:16 +0000"  >&lt;p&gt;&lt;a href=&quot;http://mongodbcr.appspot.com/499780030&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongodbcr.appspot.com/499780030&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2474322" author="xgen-internal-githook" created="Wed, 9 Oct 2019 17:47:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;BillyDonahue&apos;, &apos;email&apos;: &apos;billy.donahue@mongodb.com&apos;, &apos;name&apos;: &apos;Billy Donahue&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41654&quot; title=&quot;Better behavior for large backtraces printed from signal handler&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41654&quot;&gt;&lt;del&gt;SERVER-41654&lt;/del&gt;&lt;/a&gt; trim somap to relevant libs on stacktrace&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/00ad16093a6e6468d4d2ff1f46d8e5c08fcca21b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/00ad16093a6e6468d4d2ff1f46d8e5c08fcca21b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2467516" author="billy.donahue" created="Fri, 4 Oct 2019 21:57:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://mongodbcr.appspot.com/511390018/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mongodbcr.appspot.com/511390018/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2427244" author="billy.donahue" created="Sat, 21 Sep 2019 02:24:54 +0000"  >&lt;p&gt;After spending a lot of time with the stack trace code, I think we&apos;re wasting most of that 100k on stuff we don&apos;t need.&lt;br/&gt;
We are dumping the processInfo.somap object into the JSON line, and for a dynamic link, it&apos;s huge.&lt;br/&gt;
It&apos;s like high-hundreds of entries, and each is a filename., so that&apos;s something like 80k&lt;/p&gt;

&lt;p&gt;I think we can save by selecting just those somap entries that represent addrs in the stacktrace.&lt;br/&gt;
The stacktrace might be maybe 20-100 addrs deep, with lots of addrs coming from the same few libs.&lt;br/&gt;
So that&apos;s probably only a partial somap of maybe 20 entries instead of 800 if we&apos;re selective. 2k, not 80k.&lt;br/&gt;
We could try that.&lt;/p&gt;</comment>
                            <comment id="2361990" author="billy.donahue" created="Wed, 7 Aug 2019 20:47:06 +0000"  >&lt;p&gt;There might be a way that we don&apos;t have to try to estimate an upper bound for the backtrace text size.&lt;/p&gt;

&lt;p&gt;The filesystem operations open,close,write,lseek,unlink are all signal-safe (&lt;tt&gt;man 7 signal-safety&lt;/tt&gt;). We could write a big ol&apos; (possibly anonymous) (possibly ramfs) file with the trace results. When the tracer is done writing that file, the signal handler&apos;s final lines of code can decide how to consume or intelligently truncate it.&lt;/p&gt;</comment>
                            <comment id="2346466" author="ian.boros" created="Fri, 26 Jul 2019 21:28:17 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Ian Boros - Regarding the buffer size, I think we can probably just expand that to 1 MB without anyone caring, and I propose that we do just that.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Sounds good to me. I think this is the important part.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Regarding reversing the order, that is going to be a little harder per A. Jesse Jiryu Davis&apos;s comment. Max Hirschhorn, could you provide some guidance on how disruptive that might be? If making the buffer a lot bigger addresses 99% of these instances, is it still worth changing the order?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Seems reasonable to defer this given what you said. I think it&apos;d still be a worthwhile change to make, though. If we ever get a HELP ticket about an occasional crash in some deep code path, we might really wish we had this.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=acm&quot; class=&quot;user-hover&quot; rel=&quot;acm&quot;&gt;acm&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2346411" author="david.bradford" created="Fri, 26 Jul 2019 20:57:58 +0000"  >&lt;p&gt;I think we would need to update the build baron tools to be able to recognize and consume the change as well as continue to support stack traces without this change. That seems doable. But it would be nice to have a heads up for when this would land and some samples of the new output we could use to base our updates the tooling.&lt;/p&gt;</comment>
                            <comment id="2346241" author="max.hirschhorn@10gen.com" created="Fri, 26 Jul 2019 19:42:27 +0000"  >&lt;p&gt;Logkeeper has a restriction of a single long line containing only 4MB worth of text. As for the impact on the Build Baron tooling, I would want to defer to &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.bradford&quot; class=&quot;user-hover&quot; rel=&quot;david.bradford&quot;&gt;david.bradford&lt;/a&gt; on that.&lt;/p&gt;</comment>
                            <comment id="2342518" author="acm" created="Wed, 24 Jul 2019 22:18:31 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ian.boros&quot; class=&quot;user-hover&quot; rel=&quot;ian.boros&quot;&gt;ian.boros&lt;/a&gt; - Regarding the buffer size, I think we can probably just expand that to 1 MB without anyone caring, and I propose that we do just that.&lt;/p&gt;

&lt;p&gt;Regarding reversing the order, that is going to be a little harder per &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jesse&quot; class=&quot;user-hover&quot; rel=&quot;jesse&quot;&gt;jesse&lt;/a&gt;&apos;s comment. &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt;, could you provide some guidance on how disruptive that might be? If making the buffer a lot bigger addresses 99% of these instances, is it still worth changing the order?&lt;/p&gt;</comment>
                            <comment id="2293759" author="jesse" created="Fri, 21 Jun 2019 22:12:14 +0000"  >&lt;p&gt;Note for &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=max.hirschhorn&quot; class=&quot;user-hover&quot; rel=&quot;max.hirschhorn&quot;&gt;max.hirschhorn&lt;/a&gt;: if we do this it will change the stacktrace order, the Build Baron scripts will need to be adapted for it.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 21 Jun 2019 22:12:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 17 weeks, 4 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1323</customfieldvalue>
                        </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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 17 weeks, 4 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>jesse@mongodb.com</customfieldvalue>
            <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>billy.donahue@mongodb.com</customfieldvalue>
            <customfieldvalue>david.bradford@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>ian.boros@mongodb.com</customfieldvalue>
            <customfieldvalue>max.hirschhorn@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hv4kk7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvlhn3:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3111">Dev Tools 2019-07-29</customfieldvalue>
    <customfieldvalue id="3112">Dev Tools 2019-08-12</customfieldvalue>
    <customfieldvalue id="3246">Dev Tools 2019-09-09</customfieldvalue>
    <customfieldvalue id="3280">Dev Tools 2019-09-23</customfieldvalue>
    <customfieldvalue id="3281">Dev Tools 2019-10-07</customfieldvalue>
    <customfieldvalue id="3282">Dev Tools 2019-10-21</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|hv46tj:</customfieldvalue>

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