<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:10:32 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-755] Leaks in _mongoc_cluster_ismaster</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-755</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;As originally reported, a memory leak in this call stack:&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;                 libbson-1.0.so.0.0.0`bson_malloc+0xa&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;                 libbson-1.0.so.0.0.0`bson_copy_to+0xaf&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;                 libmongoc-1.0.so.0.0.0`_mongoc_cluster_ismaster+0x4cf&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;                 libmongoc-1.0.so.0.0.0`_mongoc_cluster_reconnect_replica_set+0x496&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;                 libmongoc-1.0.so.0.0.0`_mongoc_cluster_reconnect+0x2d3&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;                 libmongoc-1.0.so.0.0.0`_mongoc_cluster_sendv+0xe6&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;                 libmongoc-1.0.so.0.0.0`_mongoc_cursor_next+0x29c&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;                 libmongoc-1.0.so.0.0.0`mongoc_cursor_next+0x65&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;                 libmongoc-1.0.so.0.0.0`mongoc_client_command_simple+0x51&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;Looking on the code &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/a0997439c86276f0dcdb49550636b11f3e407384/src/mongoc/mongoc-cluster.c#L1167&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/blob/a0997439c86276f0dcdb49550636b11f3e407384/src/mongoc/mongoc-cluster.c#L1167&lt;/a&gt;&lt;br/&gt;
it seems like that before copying bson to tags - you need to free it first. &lt;/p&gt;</description>
                <environment></environment>
        <key id="217510">CDRIVER-755</key>
            <summary>Leaks in _mongoc_cluster_ismaster</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>Mon, 20 Jul 2015 02:20:49 +0000</created>
                <updated>Wed, 5 Aug 2015 17:22:31 +0000</updated>
                            <resolved>Wed, 22 Jul 2015 01:10:22 +0000</resolved>
                                    <version>1.1.9</version>
                                    <fixVersion>1.1.10</fixVersion>
                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="997344" author="xgen-internal-githook" created="Wed, 5 Aug 2015 17:22:31 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;bjori&apos;, u&apos;name&apos;: u&apos;Hannes Magnusson&apos;, u&apos;email&apos;: u&apos;bjori@php.net&apos;}
&lt;p&gt;Message: Merge branch &apos;master&apos; into 1.2.0-dev&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;master: (38 commits)&lt;br/&gt;
  various fixups for memory leaks and races in tests&lt;br/&gt;
  Fix memory leak in mongoc_uri_parse_option&lt;br/&gt;
  post-release bump&lt;br/&gt;
  1.1.10 Release&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-755&quot; title=&quot;Leaks in _mongoc_cluster_ismaster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-755&quot;&gt;&lt;del&gt;CDRIVER-755&lt;/del&gt;&lt;/a&gt; leaks in _mongoc_cluster_ismaster&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-745&quot; title=&quot;Crash in bson_destroy, called from _mongoc_cluster_disconnect_node&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-745&quot;&gt;&lt;del&gt;CDRIVER-745&lt;/del&gt;&lt;/a&gt; test cluster node destroy, then disconnect&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-750&quot; title=&quot;Queries sent to recovering members&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-750&quot;&gt;&lt;del&gt;CDRIVER-750&lt;/del&gt;&lt;/a&gt; don&apos;t query recovering RS members&lt;br/&gt;
  spell &quot;cyrus&quot; correctly in install guide&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-745&quot; title=&quot;Crash in bson_destroy, called from _mongoc_cluster_disconnect_node&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-745&quot;&gt;&lt;del&gt;CDRIVER-745&lt;/del&gt;&lt;/a&gt; crash in _mongoc_cluster_disconnect_node&lt;br/&gt;
  post-release bump&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-731&quot; title=&quot;Custom log handler cannot capture tracing on sasl_set_mutex callbacks&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-731&quot;&gt;&lt;del&gt;CDRIVER-731&lt;/del&gt;&lt;/a&gt;: Do not trace SASL mutex callbacks&lt;br/&gt;
  debian changelog fixes for deb pkg&lt;br/&gt;
  1.1.9 Release&lt;br/&gt;
  redundant include&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-721&quot; title=&quot;Crash destroying replset client after connection fails&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-721&quot;&gt;&lt;del&gt;CDRIVER-721&lt;/del&gt;&lt;/a&gt; test reconnection&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-727&quot; title=&quot;Actually enable code coverage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-727&quot;&gt;&lt;del&gt;CDRIVER-727&lt;/del&gt;&lt;/a&gt; actually enable coverage in libmongoc&lt;br/&gt;
  update libbson to 1.1.9-dev&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-721&quot; title=&quot;Crash destroying replset client after connection fails&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-721&quot;&gt;&lt;del&gt;CDRIVER-721&lt;/del&gt;&lt;/a&gt; test rs and mongos, connected and not&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-721&quot; title=&quot;Crash destroying replset client after connection fails&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-721&quot;&gt;&lt;del&gt;CDRIVER-721&lt;/del&gt;&lt;/a&gt; additional tests&lt;br/&gt;
  &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-721&quot; title=&quot;Crash destroying replset client after connection fails&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-721&quot;&gt;&lt;del&gt;CDRIVER-721&lt;/del&gt;&lt;/a&gt; mongoc_client_destroy crash after connection fails&lt;br/&gt;
  ...&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Conflicts:&lt;br/&gt;
	CMakeLists.txt&lt;br/&gt;
	NEWS&lt;br/&gt;
	README.rst&lt;br/&gt;
	build/autotools/Versions.m4&lt;br/&gt;
	build/rpm/mongo-c-driver.spec&lt;br/&gt;
	debian/changelog&lt;br/&gt;
	doc/installing.page&lt;br/&gt;
	doc/mongoc_version.page&lt;br/&gt;
	src/libbson&lt;br/&gt;
	src/mongoc/mongoc-cluster-private.h&lt;br/&gt;
	src/mongoc/mongoc-cluster.c&lt;br/&gt;
	src/mongoc/mongoc-read-prefs.c&lt;br/&gt;
	src/mongoc/mongoc-uri.c&lt;br/&gt;
	src/mongoc/mongoc-write-command.c&lt;br/&gt;
	tests/mock-server.c&lt;br/&gt;
	tests/mock-server.h&lt;br/&gt;
	tests/test-libmongoc.c&lt;br/&gt;
	tests/test-mongoc-client.c&lt;br/&gt;
	tests/test-mongoc-cluster.c&lt;br/&gt;
	tests/test-mongoc-database.c&lt;br/&gt;
	tests/test-mongoc-read-prefs.c&lt;br/&gt;
	tests/test-mongoc-uri.c&lt;br/&gt;
	tests/test-sasl.c&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/e62117d12a600f6cf61eb409933af6f92a3d7c22&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/e62117d12a600f6cf61eb409933af6f92a3d7c22&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="997342" author="xgen-internal-githook" created="Wed, 5 Aug 2015 17:22:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-755&quot; title=&quot;Leaks in _mongoc_cluster_ismaster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-755&quot;&gt;&lt;del&gt;CDRIVER-755&lt;/del&gt;&lt;/a&gt; leaks in _mongoc_cluster_ismaster&lt;/p&gt;

&lt;p&gt;mongoc_cluster_node_t.tags and replSet are overwritten with the new&lt;br/&gt;
ismaster response, without being destroyed first. If the node represents&lt;br/&gt;
a replica set member then its replica set name will be leaked. Same for&lt;br/&gt;
&quot;tags&quot; if the tags document is large enough to spill to heap.&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/9bcabe263587e9ef2e76eaddd3b40e48c439a274&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/9bcabe263587e9ef2e76eaddd3b40e48c439a274&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="971705" author="xgen-internal-githook" created="Wed, 22 Jul 2015 01:31:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-755&quot; title=&quot;Leaks in _mongoc_cluster_ismaster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-755&quot;&gt;&lt;del&gt;CDRIVER-755&lt;/del&gt;&lt;/a&gt; leaks in _mongoc_cluster_ismaster&lt;/p&gt;

&lt;p&gt;mongoc_cluster_node_t.tags and replSet are overwritten with the new&lt;br/&gt;
ismaster response, without being destroyed first. If the node represents&lt;br/&gt;
a replica set member then its replica set name will be leaked. Same for&lt;br/&gt;
&quot;tags&quot; if the tags document is large enough to spill to heap.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/9bcabe263587e9ef2e76eaddd3b40e48c439a274&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/9bcabe263587e9ef2e76eaddd3b40e48c439a274&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="970120" author="jesse" created="Mon, 20 Jul 2015 17:16:47 +0000"  >&lt;p&gt;Failing to destroy the &quot;tags&quot; bson only causes a leak if there are enough tags to cause the bson_t to spill its storage to heap. The replica set &lt;b&gt;name&lt;/b&gt; is also overwritten without being freed, which is a leak under all circumstances.&lt;/p&gt;</comment>
                            <comment id="969631" author="jesse" created="Mon, 20 Jul 2015 02:22:04 +0000"  >&lt;p&gt;Related to &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-745&quot; title=&quot;Crash in bson_destroy, called from _mongoc_cluster_disconnect_node&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-745&quot;&gt;&lt;del&gt;CDRIVER-745&lt;/del&gt;&lt;/a&gt;: both bugs are mismanagement of the &quot;tags&quot; document on the mongoc_cluster_node_t.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="216940">CDRIVER-745</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|hsbabb:</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="610">C Driver 2015Q2 sprint 4</customfieldvalue>

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