<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:14:04 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-2073] assert in test_hint_no_warmup_pooled</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-2073</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://evergreen.mongodb.com/task/mongo_c_driver_power8_rhel71_test_3.4_replica_set_noauth_sasl_nossl_2eb4b266f30a9fecbf7b72b98e93377604235ed9_17_02_26_22_15_30&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://evergreen.mongodb.com/task/mongo_c_driver_power8_rhel71_test_3.4_replica_set_noauth_sasl_nossl_2eb4b266f30a9fecbf7b72b98e93377604235ed9_17_02_26_22_15_30&lt;/a&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;   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;src/mongoc/mongoc-topology-scanner.c:671 mongoc_topology_scanner_start(): precondition failed: !node-&amp;gt;cmd&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;In the test configuration that caused the assert, we have a 3-node replica set: primary on port 27017, secondary on 27018, arbiter on 27019.&lt;/p&gt;

&lt;p&gt;The test creates a client pool with this connection string:&lt;/p&gt;

&lt;p&gt;&quot;mongodb://localhost:27017,localhost:27018/?replicaset=replset&amp;amp;serverselectiontryonce=false&quot;&lt;/p&gt;

&lt;p&gt;Note that the arbiter on port 27019 is missing from the seed list.&lt;/p&gt;

&lt;p&gt;The test pops a client from the pool. Popping the client triggers the pool to begin the background scanner thread (&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1333&quot; title=&quot;Update initial isMaster handshake to provide handshake data&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1333&quot;&gt;&lt;del&gt;CDRIVER-1333&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The test creates a cursor and sets the cursor&apos;s id to 1. (In this setup, server 1 is usually primary.) The test calls mongoc_cursor_next, which calls down to mongoc_cluster_fetch_stream_pooled, which creates a stream connected to the primary and calls _mongoc_cluster_add_node, which calls _mongoc_cluster_run_ismaster.&lt;/p&gt;

&lt;p&gt;Once the isMaster completes, the driver calls _mongoc_topology_update_from_handshake to update its topology description (&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-562&quot; title=&quot;cluster should send newly-run ismasters through SDAM machinery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-562&quot;&gt;&lt;del&gt;CDRIVER-562&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;If (rarely, apparently) _mongoc_topology_update_from_handshake beats the background scanner thread to the first ismaster, then it&apos;s the first function to discover the arbiter and add it to the topology scanner. It does so, and calls mongoc_topology_scanner_add_and_scan, which creates a scanner node for the arbiter and initializes node-&amp;gt;cmd, the scanner node&apos;s async_cmd_t representing the isMaster command it wants to execute.&lt;/p&gt;

&lt;p&gt;Then (again, this is a rare race outcome) the background thread begins and sets up scanner nodes for all known servers. By now the arbiter is in the topology description so the thread attempts to call isMaster on it. But first, it asserts that the arbiter&apos;s scanner node doesn&apos;t already have an async_cmd_t. In this sequence, the scanner&apos;s assert fails.&lt;/p&gt;

&lt;p&gt;Solution: when discovering a node from _mongoc_topology_update_from_handshake, don&apos;t set its async_cmd_t. That&apos;s the job of the topology scanner.&lt;/p&gt;</description>
                <environment></environment>
        <key id="357918">CDRIVER-2073</key>
            <summary>assert in test_hint_no_warmup_pooled</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="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Feb 2017 03:39:18 +0000</created>
                <updated>Wed, 3 May 2017 22:15:06 +0000</updated>
                            <resolved>Wed, 1 Mar 2017 02:18:57 +0000</resolved>
                                    <version>1.5.0</version>
                                    <fixVersion>1.7.0</fixVersion>
                                    <component>libmongoc</component>
                    <component>replset</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                        <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|hsvlqf:</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="1602">C Driver 2017 2 - Feb 10, 2019</customfieldvalue>

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