<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:47:40 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-37998] Upgrade Intel Decimal FP Library to at least 2.0 Update 2</title>
                <link>https://jira.mongodb.org/browse/SERVER-37998</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description></description>
                <environment></environment>
        <key id="630364">SERVER-37998</key>
            <summary>Upgrade Intel Decimal FP Library to at least 2.0 Update 2</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-server-servicearch">Backlog - Service Architecture</assignee>
                                    <reporter username="mathew.robinson@mongodb.com">Mathew Robinson</reporter>
                        <labels>
                            <label>third-party-libraries</label>
                    </labels>
                <created>Wed, 7 Nov 2018 20:08:58 +0000</created>
                <updated>Mon, 28 Aug 2023 15:40:58 +0000</updated>
                                                                            <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="3228222" author="april.schoffer" created="Mon, 29 Jun 2020 15:13:35 +0000"  >&lt;p&gt;We attempted to upgrade, but this will involve additional collaboration with Intel. Sending to backlog for now.&lt;/p&gt;</comment>
                            <comment id="3225213" author="ryan.egesdahl" created="Fri, 26 Jun 2020 07:17:42 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=geert.bosch&quot; class=&quot;user-hover&quot; rel=&quot;geert.bosch&quot;&gt;geert.bosch&lt;/a&gt; This issue is just being set aside for now. We intend to communicate with upstream on this further when we can focus more effort on it.&lt;/p&gt;

&lt;p&gt;Regarding the compiler options, unfortunately I don&apos;t think we&apos;re able to specifically select a C compiler for anything in particular. However, the compiler option should still have had an effect because gcc applies it to the source file type rather than whether you have run &lt;tt&gt;gcc&lt;/tt&gt; versus &lt;tt&gt;g++&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="3225162" author="geert.bosch" created="Fri, 26 Jun 2020 04:26:42 +0000"  >&lt;p&gt;Note that this option is does not have an effect for C++ compilations, so make sure to compile using the C compiler. I agree with putting this in the backlog, but I do think it&apos;s important to provide as much feedback as possible to the maintainers about the issues that prevent our upgrade. For example, their exponentiation fixes were counter productive and caused my carefully considered test to fail. While it&apos;s not a big deal, as we don&apos;t promise specific performance guarantees for numerical operations on decimal, it&apos;s still something to worry about.&lt;/p&gt;

&lt;p&gt;The most important thing is to let the library maintainers know that we deeply care about these issues, and that we care about accuracy and correctness foremost. I hope that the move to GitHub will make our interactions more productive, as we&apos;d be able to present patches to fix current issues.&lt;/p&gt;</comment>
                            <comment id="3225117" author="ryan.egesdahl" created="Fri, 26 Jun 2020 02:41:47 +0000"  >&lt;p&gt;For what it&apos;s worth, I tried compiling with &lt;tt&gt;-fexcess-precision=standard&lt;/tt&gt; (among many other options previously), and the test still hangs in the same way as before. The problem only affects GCC - other compilers seem fine. I&apos;m going to re-backlog this item for now.&lt;/p&gt;</comment>
                            <comment id="3219743" author="acm" created="Tue, 23 Jun 2020 15:28:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=geert.bosch&quot; class=&quot;user-hover&quot; rel=&quot;geert.bosch&quot;&gt;geert.bosch&lt;/a&gt; - I&apos;m inclined to agree that we should stop progress on this. We attempted the upgrade as we had planned to do once v3 was in play, and we have found that it isn&apos;t what we need. I&apos;m unaware of any specific bugs that motivate an update right now. I do agree that we should reach out to the maintainers. They are generally responsive.&lt;/p&gt;</comment>
                            <comment id="3217699" author="geert.bosch" created="Mon, 22 Jun 2020 16:22:38 +0000"  >&lt;p&gt;I&apos;m quite familiar with GCC bug 323, but it should no longer be an issue on x86-64, as the ABI uses SSE2 now for argument passing and return, and implicit promotion to long double should not happen. It&apos;s been a while since I looked, but can you verify that this is indeed related to excess precision? Does the Intel code in question use long double?&lt;/p&gt;

&lt;p&gt;If so, there are compilation options for C code to work around those excess precision issues, so we could consider compiling the Intel library that way. Still, overall, my recommendation is to &lt;em&gt;not&lt;/em&gt; upgrade the Intel library, but report the issues we&apos;re finding as bugs against that library. &lt;/p&gt;</comment>
                            <comment id="3216274" author="ryan.egesdahl" created="Sat, 20 Jun 2020 05:01:20 +0000"  >&lt;p&gt;I&apos;ve managed to update the source, but it looks like the problem &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=geert.bosch&quot; class=&quot;user-hover&quot; rel=&quot;geert.bosch&quot;&gt;geert.bosch&lt;/a&gt; noted a year and a half ago still exists in the v3 toolchain. I did a bit more digging, and I came up with some GCC bug reports that explain what&apos;s going on:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85957&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85957&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The low number of the first bug report should concern you. It&apos;s been around for 20 years.&lt;/p&gt;

&lt;p&gt;The bug report is fascinating both from a technical and a psychosocial standpoint if you are truly interested, but for those who are not, the TL;DR version is this: GCC doesn&apos;t implement IEEE semantics for excess floating-point precision for C++, it never has, and nobody seems interested in making it happen. In other words, this is not a problem with any particular version of our toolchain but a compatibility problem between this library and GCC, and neither the GCC developers nor Intel see it as one worth solving right now. There are ways we could address it ourselves (assuming we would rather not wait on what is likely to never happen), but they are almost certainly going to involve custom patches to GCC or changing over to Clang as our primary compiler. Or we can use a different decimal floating point library, of course.&lt;/p&gt;

&lt;p&gt;The core of the problem is that Intel develops this library for the Intel compilers. All other compilers, including GCC, are of secondary importance. Unfortunately, that leaves us with no small choices to make here except to not upgrade the library at this point. It needs to wait until we&apos;ve made some much larger decisions about either our toolchain or our choice of library.&lt;/p&gt;</comment>
                            <comment id="2300467" author="acm" created="Thu, 27 Jun 2019 12:43:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=geert.bosch&quot; class=&quot;user-hover&quot; rel=&quot;geert.bosch&quot;&gt;geert.bosch&lt;/a&gt; - Should we try this again now that we have the v3 toolchain in place? Should be easy to rebase and patch queue it.&lt;/p&gt;</comment>
                            <comment id="2127945" author="acm" created="Fri, 25 Jan 2019 18:49:19 +0000"  >&lt;p&gt;Per discussion with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=geert.bosch&quot; class=&quot;user-hover&quot; rel=&quot;geert.bosch&quot;&gt;geert.bosch&lt;/a&gt;, we are going to probably hold off on this until upstream makes changes. Marking as features-we-are-not-sure-of.&lt;/p&gt;</comment>
                            <comment id="2091082" author="geert.bosch" created="Fri, 14 Dec 2018 16:40:50 +0000"  >&lt;p&gt;The new version of this library has changes to the &lt;tt&gt;bid128_pow&lt;/tt&gt; function in addition to the {[bid128_acos}} fix we need. However, compiling the math library with optimization on and the GCC from the MongoDB toolchain results in a hang when evaluating &lt;tt&gt;bid128_pow(Decimal128(&quot;0.9999999999999999999999999999999999&quot;),  Decimal128(&quot;0.9999999999999999999999999999999999&quot;))&lt;/tt&gt;.&lt;br/&gt;
Additionally the upgrade causes a test failure in &lt;tt&gt;jstests/aggregation/bugs/server18427.js:118:1&lt;/tt&gt;:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; // Exact decimal result&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    testOp({$pow: [NumberInt(&quot;5&quot;), NumberDecimal(&quot;-112&quot;)]},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;           NumberDecimal(&quot;5192296858534827628530496329220096E-112&quot;));&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The new library produces a result  that has a 1 unit in the last place (ulp) difference and yields &lt;tt&gt;NumberDecimal(&quot;5192296858534827628530496329220097E-112&quot;&lt;/tt&gt;. As the power function does not pertain to be correctly rounded (neither does the double precision floating point version), that is not necessarily a disqualifying issue for the update. The reason for the error is that there is new code that uses repeated squaring and multiplication for integer exponents. For negative exponents, a final division is used, but as 5^112 has 79 decimal digits, this divisor is rounded causing double rounding for the final result. The repeated squaring and multiplication method results in an error of up to 0.5 ulp per iteration. As the new code path is used for arguments up to 2^32, the final error can be up to about 16 ulp, though cancellation would result in typical error much less than that.&lt;/p&gt;

&lt;p&gt;It probably would make sense to check if the mis-compilation goes away with the GCC from toolchain v3. I verified it does not affect the MS VS2017 optimized build. We should also visually check warnings, especially in the new code, to see if those indicate issues in the new code. One positive takeaway of the new library is that the code is still maintained, and that there are no changes to any of the conversion code, so we can have confidence that conversions behave exactly as before.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="651742">SERVER-38568</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="654490">SERVER-38638</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>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25132"><![CDATA[Service Arch]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 14 Dec 2018 16:40:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 32 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/PM-1110'>PM-1110</a></s>]]></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>dbeng-pm-bot</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 32 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>april.schoffer@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-servicearch</customfieldvalue>
            <customfieldvalue>geert.bosch@mongodb.com</customfieldvalue>
            <customfieldvalue>mathew.robinson@mongodb.com</customfieldvalue>
            <customfieldvalue>ryan.egesdahl@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hucadz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9jqv:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="2723">Dev Tools 2019-01-14</customfieldvalue>

                        </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|hubwnb:</customfieldvalue>

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