<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:18:56 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>[CDRIVER-3757] mongoc_client_pool_new does not initialize its condition variable</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-3757</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;The condition variable in &lt;tt&gt;mongoc_client_pool_t&lt;/tt&gt; does not get initialized, which results in undefined behavior.  As a consequence, it is possible that a call to &lt;tt&gt;mongoc_client_pool_pop&lt;/tt&gt; when all clients have already been distributed may never return, even when a client becomes available.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1412813">CDRIVER-3757</key>
            <summary>mongoc_client_pool_new does not initialize its condition variable</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="13201">Fixed</resolution>
                                        <assignee username="andrew.witten@mongodb.com">Andrew Witten</assignee>
                                    <reporter username="andrew.witten@mongodb.com">Andrew Witten</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 Jul 2020 20:22:58 +0000</created>
                <updated>Sat, 28 Oct 2023 11:28:40 +0000</updated>
                            <resolved>Thu, 23 Jul 2020 16:21:52 +0000</resolved>
                                                    <fixVersion>1.18.0</fixVersion>
                    <fixVersion>1.17.3</fixVersion>
                    <fixVersion>1.18.0-alpha</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3503060" author="xgen-internal-githook" created="Tue, 24 Nov 2020 01:10:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Witten&apos;, &apos;email&apos;: &apos;andrew.witten@mongodb.com&apos;, &apos;username&apos;: &apos;awitten1&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3757&quot; title=&quot;mongoc_client_pool_new does not initialize its condition variable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3757&quot;&gt;&lt;del&gt;CDRIVER-3757&lt;/del&gt;&lt;/a&gt; inits pool cond, adds test (#666)&lt;/p&gt;

&lt;p&gt;Initializes pool condition variable.  Adds (non-deterministic) test for the case where a thread is waiting in call to `mongoc_client_pool_pop` for a client to become available.&lt;br/&gt;
Branch: r1.17&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/64a395c1c024d3e79f6cf720f0c97b1340fcd376&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/64a395c1c024d3e79f6cf720f0c97b1340fcd376&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3298382" author="xgen-internal-githook" created="Thu, 23 Jul 2020 12:54:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Witten&apos;, &apos;email&apos;: &apos;andrew.witten@mongodb.com&apos;, &apos;username&apos;: &apos;awitten1&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3757&quot; title=&quot;mongoc_client_pool_new does not initialize its condition variable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3757&quot;&gt;&lt;del&gt;CDRIVER-3757&lt;/del&gt;&lt;/a&gt; inits pool cond, adds test (#666)&lt;/p&gt;

&lt;p&gt;Initializes pool condition variable.  Adds (non-deterministic) test for the case where a thread is waiting in call to `mongoc_client_pool_pop` for a client to become available.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/c082789db7ddd7348c447a073bd93328e75a0783&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/c082789db7ddd7348c447a073bd93328e75a0783&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3292927" author="kaitlin.mahar" created="Mon, 20 Jul 2020 17:37:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andrew.witten&quot; class=&quot;user-hover&quot; rel=&quot;andrew.witten&quot;&gt;andrew.witten&lt;/a&gt;&#160;No worries! Thank you for the quick reply and clarification.&lt;/p&gt;</comment>
                            <comment id="3292918" author="JIRAUSER1253381" created="Mon, 20 Jul 2020 17:33:41 +0000"  >&lt;p&gt;Hi Kaitlin. Sorry, my description wasn&apos;t clear.  I will edit that now.  The issue is that  even when a client becomes available, the function still may not return.  &lt;/p&gt;

&lt;p&gt;&lt;tt&gt;mongoc_client_pool_try_pop&lt;/tt&gt; won&apos;t be affected, because it doesn&apos;t block in the event that max_pool_size clients have already been distributed (it just returns NULL).&lt;/p&gt;</comment>
                            <comment id="3292890" author="kaitlin.mahar" created="Mon, 20 Jul 2020 17:22:15 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=andrew.witten&quot; class=&quot;user-hover&quot; rel=&quot;andrew.witten&quot;&gt;andrew.witten&lt;/a&gt;, question - isn&apos;t the expected behavior of this method to not return until a new client is available? Or is the problem that even if a client later becomes available, the method might not return?&lt;/p&gt;

&lt;p&gt;I ask because I work on the Swift driver, which wraps libmongoc, and we use &lt;tt&gt;mongoc_client_pool_t&lt;/tt&gt; s&#160;to back our &lt;tt&gt;MongoClient&lt;/tt&gt;&#160;type. We actually always use &lt;tt&gt;mongoc_client_pool_try_pop&lt;/tt&gt;&#160;though. Would that method be affected at all by this bug?&lt;/p&gt;</comment>
                            <comment id="3289938" author="JIRAUSER1253381" created="Fri, 17 Jul 2020 14:52:03 +0000"  >&lt;p&gt;PR: &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/pull/666&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/pull/666&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hxibhb:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>