<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:35 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-1276] Static destructor ordering problem between DBConnectionPool and Ports</title>
                <link>https://jira.mongodb.org/browse/SERVER-1276</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>
&lt;p&gt;mongo::DBConnectionPool has a static instance, as does the mongo::Ports class. The destructor of a mongo::DBClientConnection requires the existence of the Port static object, and the DBConnectionPool static object destroys DBClientConnections. However, the static instance of the Ports class and the static instance of the DBConnectionPool are defined in separate translation units, and therefore there is no guaranteed ordering among the static destructors. This shows up in valgrind like this:&lt;/p&gt;


&lt;p&gt;	==26777== Invalid read of size 4&lt;br/&gt;
	==26777==    at 0x6D5A3C4: pthread_mutex_lock (pthread_mutex_lock.c:50)&lt;br/&gt;
	==26777==    by 0x984CA82: boost::unique_lock&amp;lt;boost::mutex&amp;gt;::unique_lock(boost::mutex&amp;amp;) (mutex.hpp:50)&lt;br/&gt;
	==26777==    by 0x9EF3394: mongo::mutex::scoped_lock::scoped_lock(mongo::mutex&amp;amp;) (mutex.h:154)&lt;br/&gt;
	==26777==    by 0x9F5E03F: mongo::Ports::erase(mongo::MessagingPort*) (message.cpp:262)&lt;br/&gt;
	==26777==    by 0x9F5AFC8: mongo::MessagingPort::~MessagingPort() (message.cpp:297)&lt;br/&gt;
	==26777==    by 0x9F72DB1: void boost::checked_delete&amp;lt;mongo::MessagingPort&amp;gt;(mongo::MessagingPort*) (checked_delete.hpp:34)&lt;br/&gt;
	==26777==    by 0x9F72500: boost::scoped_ptr&amp;lt;mongo::MessagingPort&amp;gt;::~scoped_ptr() (scoped_ptr.hpp:80)&lt;br/&gt;
	==26777==    by 0x9F824EE: mongo::DBClientConnection::~DBClientConnection() (dbclient.h:650)&lt;br/&gt;
	==26777==    by 0x9F70CC1: mongo::DBConnectionPool::~DBConnectionPool() (connpool.cpp:83)&lt;br/&gt;
	==26777==    by 0x90BB62F: __cxa_finalize (cxa_finalize.c:56)&lt;br/&gt;
	==26777==    by 0x9EE3645: ??? (in ~/mongo.temp.install/lib64/libmongoclient.so)&lt;br/&gt;
	==26777==    by 0x9F9F350: ??? (in ~/mongo.temp.install/lib64/libmongoclient.so)&lt;br/&gt;
	==26777==    by 0x90BB261: exit (exit.c:78)&lt;br/&gt;
	==26777==    by 0x90A0C53: (below main) (libc-start.c:258)&lt;br/&gt;
	==26777==  Address 0xdaa6a90 is 16 bytes inside a block of size 40 free&apos;d&lt;br/&gt;
	==26777==    at 0x4C288AE: operator delete(void*) (vg_replace_malloc.c:405)&lt;br/&gt;
	==26777==    by 0x9F31B2D: mongo::mutex::~mutex() (mutex.h:146)&lt;br/&gt;
	==26777==    by 0x9F614B9: mongo::Ports::~Ports() (message.cpp:245)&lt;br/&gt;
	==26777==    by 0x90BB62F: __cxa_finalize (cxa_finalize.c:56)&lt;br/&gt;
	==26777==    by 0x9EE3645: ??? (in ~/mongo.temp.install/lib64/libmongoclient.so)&lt;br/&gt;
	==26777==    by 0x9F9F350: ??? (in ~/mongo.temp.install/lib64/libmongoclient.so)&lt;br/&gt;
	==26777==    by 0x90BB261: exit (exit.c:78)&lt;br/&gt;
	==26777==    by 0x90A0C53: (below main) (libc-start.c:258)&lt;/p&gt;</description>
                <environment>ALL</environment>
        <key id="12218">SERVER-1276</key>
            <summary>Static destructor ordering problem between DBConnectionPool and Ports</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="9">Done</resolution>
                                        <assignee username="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="andrew.morrow@mongodb.com">Andrew Morrow</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Jun 2010 18:06:43 +0000</created>
                <updated>Tue, 12 Jul 2016 00:29:29 +0000</updated>
                            <resolved>Thu, 1 Jul 2010 17:48:37 +0000</resolved>
                                    <version>1.5.3</version>
                                    <fixVersion>1.5.4</fixVersion>
                                    <component>Internal Client</component>
                                        <votes>1</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="15290" author="auto" created="Thu, 1 Jul 2010 17:46:30 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;RedBeard0531&apos;, &apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;email&apos;: &apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: Static destruction order fix &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1276&quot; title=&quot;Static destructor ordering problem between DBConnectionPool and Ports&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1276&quot;&gt;&lt;del&gt;SERVER-1276&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/ae2aa8a24552ab035ead84eb49fcc17270beb522&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/ae2aa8a24552ab035ead84eb49fcc17270beb522&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="15264" author="shtylman" created="Thu, 1 Jul 2010 11:18:11 +0000"  >&lt;p&gt;In 1.5.3 this issue has become more serious and appears to cause an assertion failure when libmongoclient is built as a shared object. The crash happens on shutdown.&lt;/p&gt;

&lt;p&gt;backtrace:&lt;br/&gt;
#0  0x00007ffff3389a75 in *__GI_raise (sig=&amp;lt;value optimized out&amp;gt;) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64&lt;br/&gt;
#1  0x00007ffff338d5c0 in *__GI_abort () at abort.c:92&lt;br/&gt;
#2  0x00007ffff3382941 in *_&lt;em&gt;GI&lt;/em&gt;__assert_fail (assertion=0x7ffff27cd895 &quot;!pthread_mutex_lock(&amp;amp;m)&quot;, file=&amp;lt;value optimized out&amp;gt;, line=50, function=0x7ffff27e1c20 &quot;void boost::mutex::lock()&quot;) at assert.c:81&lt;br/&gt;
#3  0x00007ffff2783b87 in mongo::MessagingPort::~MessagingPort() () from /usr/lib/libmongoclient.so.1.5.3&lt;br/&gt;
#4  0x00007ffff27ad905 in mongo::DBClientConnection::~DBClientConnection() () from /usr/lib/libmongoclient.so.1.5.3&lt;br/&gt;
#5  0x00007ffff2799bef in mongo::DBConnectionPool::~DBConnectionPool() () from /usr/lib/libmongoclient.so.1.5.3&lt;br/&gt;
#6  0x00007ffff338f630 in __cxa_finalize (d=0x7ffff2a09850) at cxa_finalize.c:56&lt;br/&gt;
#7  0x00007ffff2732856 in ?? () from /usr/lib/libmongoclient.so.1.5.3&lt;br/&gt;
#8  0x0000000000000030 in ?? ()&lt;br/&gt;
#9  0x0000000000000000 in ?? ()&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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 1 Jul 2010 11:18:11 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 33 weeks, 6 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 33 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>shtylman</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpkzz:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21985</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_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|ht0tc7:</customfieldvalue>

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