<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:15:26 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-2507] MongoC 1.81 Crashed in mongoc_cluster_init()</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-2507</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt; 	ucrtbase.dll!abort()	Unknown	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!mongoc_topology_description_handle_ismaster()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!mongoc_topology_description_invalidate_server()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!mongoc_topology_invalidate_server()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!mongoc_cluster_disconnect_node()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!mongoc_cluster_init()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!mongoc_client_pool_try_pop()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!mongoc_client_pool_try_pop()	C	Non-user code. Symbols loaded.&lt;br/&gt;
&amp;gt;	libmongoc-1.0.dll!mongoc_client_pool_try_pop()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!_mongoc_cluster_stream_for_server()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!_mongoc_cluster_buffer_iovec()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!_mongoc_cursor_fetch_stream()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!_mongoc_cursor_get_opt_bool()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!_mongoc_cursor_next()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	libmongoc-1.0.dll!mongoc_cursor_next()	C	Non-user code. Symbols loaded.&lt;br/&gt;
 	MongoDBWrapper.dll!00007ffcd7f5f8c7()	Unknown	No symbols loaded.&lt;/p&gt;</description>
                <environment>Windows, VS2017</environment>
        <key id="497987">CDRIVER-2507</key>
            <summary>MongoC 1.81 Crashed in mongoc_cluster_init()</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="5">Cannot Reproduce</resolution>
                                        <assignee username="jesse@mongodb.com">A. Jesse Jiryu Davis</assignee>
                                    <reporter username="yuanzhongxi@gmail.com">zhongxi yuan</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Feb 2018 19:20:30 +0000</created>
                <updated>Wed, 8 Feb 2023 14:25:46 +0000</updated>
                            <resolved>Thu, 8 Mar 2018 19:37:35 +0000</resolved>
                                    <version>1.8.1</version>
                                                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1847244" author="jesse" created="Tue, 27 Mar 2018 22:36:32 +0000"  >&lt;p&gt;Hi! Thanks for the additional information. However, I will only be able to diagnose this problem if you are able to provide a small C program that reproduces this crash, that I can compile and execute on my computer. Thanks.&lt;/p&gt;</comment>
                            <comment id="1847183" author="zhongxi.yuan" created="Tue, 27 Mar 2018 21:36:50 +0000"  >&lt;p&gt;Follow is the crash dump and the PDB file of mongoc1.81  i built,  my environment is  visual studio 2017 &lt;br/&gt;
 &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/182875/182875_case2507.7z&quot; title=&quot;case2507.7z attached to CDRIVER-2507&quot;&gt;case2507.7z&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;</comment>
                            <comment id="1847172" author="zhongxi.yuan" created="Tue, 27 Mar 2018 21:28:06 +0000"  >&lt;p&gt; &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;182874_thumb&quot; href=&quot;https://jira.mongodb.org/secure/attachment/182874/182874_screenshot-3.png&quot; title=&quot;screenshot-3.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;182874&quot; file-preview-title=&quot;screenshot-3.png&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/thumbnail/182874/_thumb_182874.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;</comment>
                            <comment id="1847168" author="zhongxi.yuan" created="Tue, 27 Mar 2018 21:26:28 +0000"  >&lt;p&gt;Hi There,&lt;br/&gt;
I use the release version with debug info,  today, it crashed again, and the position was same with last time.&lt;br/&gt;
Can you take a look?&lt;/p&gt;</comment>
                            <comment id="1827782" author="jesse" created="Thu, 8 Mar 2018 19:37:23 +0000"  >&lt;p&gt;Hi, I&apos;m closing this bug for now. Please reopen it if you are able to provide a small C program that I can compile and execute on my computer that reproduces this crash. Thanks.&lt;/p&gt;</comment>
                            <comment id="1820267" author="jesse" created="Thu, 1 Mar 2018 19:35:35 +0000"  >&lt;p&gt;Let me know if you have any additional information to help us debug this. Thanks!&lt;/p&gt;</comment>
                            <comment id="1813104" author="jesse" created="Thu, 22 Feb 2018 17:47:44 +0000"  >&lt;p&gt;Yes, please build with debug symbols. I hope that will fix the stack trace so we can be more certain about what happened. &lt;/p&gt;</comment>
                            <comment id="1813045" author="zhongxi.yuan" created="Thu, 22 Feb 2018 17:12:30 +0000"  >&lt;p&gt;Thanks for explaining it in details. &lt;br/&gt;
I understand there is not much you can do at the moment. On my side, one thing that I can do is to build mongoc with debugging symbols enabled. So next time when the crash happens, I can provide more details of input arguments. Feel free to suggest if there is anything else I can to help troubleshooting this issue.&lt;/p&gt;
</comment>
                            <comment id="1812283" author="jesse" created="Wed, 21 Feb 2018 22:58:01 +0000"  >&lt;p&gt;The initial call to mongoc_collection_find does not actually send a message to the MongoDB server at all, it only creates the cursor struct. Therefore, if you call mongoc_cursor_error right after mongoc_collection_find, the failover won&apos;t cause mongoc_cursor_error to return an error. The cursor doesn&apos;t know the server has failed, because it hasn&apos;t tried to send a message yet.&lt;/p&gt;

&lt;p&gt;When you make the first call to mongoc_cursor_next, the cursor sends its &quot;find&quot; message to the server. Since the server has failed over, the cursor receives a network error and mongoc_cursor_next returns false. &lt;b&gt;Then&lt;/b&gt;, mongoc_cursor_error returns true and reports an error message &quot;socket error or timeout.&quot; I&apos;ve verified this behavior in my own testing of the 1.8.1 driver. The driver returns an error and it does not crash.&lt;/p&gt;</comment>
                            <comment id="1811990" author="zhongxi.yuan" created="Wed, 21 Feb 2018 19:40:39 +0000"  >&lt;p&gt;Thanks for your investigating and inputs. It&apos;s valuable information that a failover would not cause a crash of cursor accessing.&lt;/p&gt;

&lt;p&gt;I have excluded the possibility of using the same mongoc_client_t in multiple threads. The application uses mongoc_client_pool_t to manage a pool of connections. When a thread has to access MongoDB, it requests for a dedicated connection from the pool.  &lt;/p&gt;

&lt;p&gt;As you mentioned&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br/&gt;
The driver returns an error as expected: Cursor Failure: Failed to send &quot;getMore&quot; command with database &quot;test&quot;: socket error or timeout. The driver does not crash.&lt;/p&gt;

&lt;p&gt;Is this error returned by mongoc_cursor_error(cursor.get(), &amp;amp;error)? In this case, the error can be detected and the program will quit. &lt;br/&gt;
But is it possible that failover happens after mongoc_cursor_error() but right before mongoc_cursor_next()? Will it cause an un-handled situation and a crash?&lt;/p&gt;</comment>
                            <comment id="1811488" author="jesse" created="Wed, 21 Feb 2018 14:35:42 +0000"  >&lt;p&gt;I don&apos;t have much insight to provide for you. The stack appears to be corrupt: it shows an impossible series of function calls. For example, _mongoc_cursor_get_opt_bool appears to call _mongoc_cursor_fetch_stream in your stack trace, but &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/1.8.1/src/mongoc/mongoc-cursor.c#L111&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;_mongoc_cursor_get_opt_bool does not actually call that function&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;You asked if I believe this is related to failover, and the answer is &quot;yes.&quot; At the moment your program crashes, the driver is trying to send a &quot;find&quot; message to the primary server in order to get the first result for the cursor. (You have set the cursor&apos;s limit to 1.) The primary has failed over, so the driver gets a network error. The driver updates its internal data structures to remember that the server is unavailable, in mongoc_cluster_disconnect_node. I have tested this sequence of events and the driver behaves correctly. It returns an error from the cursor, and it does not crash for me.&lt;/p&gt;

&lt;p&gt;If you want to verify whether one of the two BSON_ASSERT statements in mongoc_topology_description_handle_ismaster is responsible for the crash, try adding these lines to the beginning of mongoc_topology_description_handle_ismaster:&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;   if (!topology || server_id == 0) {&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;      MONGOC_ERROR (&quot;topology = %p, server+id = %&quot; PRIu32, topology, server_id);&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;   }&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;&amp;nbsp;&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;   BSON_ASSERT (topology);&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;   BSON_ASSERT (server_id != 0);&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;I have to advise you, since I cannot reproduce this crash on my own system, and since no one else has reported a crash similar to this one, I suspect the problem is in your application. You may have a bug that causes memory corruption. If you provide me a code example that I can compile that reproduces this crash then I will certainly investigate further.&lt;/p&gt;

&lt;p&gt;One more question: are you using a single mongoc_client_t, or a single mongoc_cursor_t, from multiple threads? If you are, then this might be the cause. Only mongoc_client_pool_t is thread-safe, all other functions and structs in the C Driver are not thread-safe and must not be used from multiple threads.&lt;/p&gt;</comment>
                            <comment id="1811412" author="zhongxi.yuan" created="Wed, 21 Feb 2018 13:21:42 +0000"  >&lt;p&gt;Hi, Jesse&lt;/p&gt;

&lt;p&gt;Thanks for replying. The MongoDB version number is 3.2.18-5-g8a10308.&lt;/p&gt;

&lt;p&gt;I don&apos;t have a short sample code example that can reproduce the crash. The crash is found in production system and happens once in a few days. I will keep an eye on the system and try to collect more information. In the mean time, it will be helpful if you can provide some insight based on the call stack and crashing code. If you believe this is related to faillover, then I shall arrange some time to test MongoDB failover.&lt;/p&gt;</comment>
                            <comment id="1810851" author="jesse" created="Tue, 20 Feb 2018 20:44:06 +0000"  >&lt;p&gt;Thanks, I&apos;ve tried to reproduce this crash using a large collection of documents in a replica set and querying it with &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/master/examples/example-client.c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongoc-client&lt;/a&gt;. I can test what happens with C Driver 1.8.1 when the cursor begins on the primary and then the primary shuts down. The driver returns an error as expected: &lt;tt&gt;Cursor Failure: Failed to send &quot;getMore&quot; command with database &quot;test&quot;: socket error or timeout&lt;/tt&gt;. The driver does not crash.&lt;/p&gt;

&lt;p&gt;In order to try to reproduce this, please tell me &lt;b&gt;what MongoDB version you use&lt;/b&gt; and please provide a &lt;b&gt;&lt;a href=&quot;http://sscce.org/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;short code example that I can compile and run on my computer&lt;/a&gt;&lt;/b&gt; which will reproduce this crash. Thanks very much.&lt;/p&gt;</comment>
                            <comment id="1810473" author="zhongxi.yuan" created="Tue, 20 Feb 2018 17:08:56 +0000"  >&lt;p&gt;froderik described a mongodb cursor issue that may be related.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/36766956/what-is-a-cursor-in-mongodb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://stackoverflow.com/questions/36766956/what-is-a-cursor-in-mongodb&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;I am by no mean a mongodb expert but I just want to add some observations from working in a medium sized mongo system for the last year. Also thanks to @xameeramir for the excellent walkthough about how cursors work in general.&lt;/p&gt;

&lt;p&gt;The causes of a &quot;cursor lost&quot; exception may be several. One that I have noticed is explained in this answer.&lt;/p&gt;

&lt;p&gt;The cursor lives server side. It is not distributed over a replica set but exists on the instance that is primary at the time of creation. This means that if another instance takes over as primary the cursor will be lost to the client. If the old primary is still up and around it may still be there but for no use. I guess it is garbaged collected away after a while. So if your mongo replica set is unstable or you have a shaky network in front of it you are out of luck when doing any long running queries.&lt;/p&gt;

&lt;p&gt;If the full content of what the cursor wants to return does not fit in memory on the server the query may be very slow. RAM on your servers needs to be larger than the largest query you run.&lt;/p&gt;

&lt;p&gt;All this can partly be avoided by designing better. For a use case with large long running queries you may be better of with several smaller database collections instead of a big one.&lt;/p&gt;</comment>
                            <comment id="1810302" author="zhongxi.yuan" created="Tue, 20 Feb 2018 16:32:19 +0000"  >&lt;p&gt;I attached a screenshot of the callstack. The same code snippet  validates the cursor before access its content. But it still crashes inside mongoc_cursor_next(). &lt;/p&gt;

&lt;p&gt;It looks like a failover happens when proceeding with mongoc_cursor_next(). It will be helpful if you can share your opinions on potential root cause of the crash.&lt;/p&gt;

&lt;p&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;sample code&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;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; 		ScopeCollection collection(&amp;amp;connection, ns);&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;		auto cursor = std::unique_ptr&amp;lt;mongoc_cursor_t, void(*)(mongoc_cursor_t*)&amp;gt;(mongoc_collection_find(collection.coll(), MONGOC_QUERY_NONE, 0, 1, 0, query.get(), rtnFields.empty() ? NULL : fieldsToReturn.get(), NULL), mongoc_cursor_destroy);&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;		bson_error_t error;&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;		if (mongoc_cursor_error(cursor.get(), &amp;amp;error)) {&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;			return false;&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;		}&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;		const bson_t *doc;&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;		if (mongoc_cursor_next(cursor.get(), &amp;amp;doc))&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;		{ ...&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;&amp;nbsp;&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;&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;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;179553_thumb&quot; href=&quot;https://jira.mongodb.org/secure/attachment/179553/179553_WorkerShell.exe.25044.dmp.png&quot; title=&quot;WorkerShell.exe.25044.dmp.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;179553&quot; file-preview-title=&quot;WorkerShell.exe.25044.dmp.png&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/thumbnail/179553/_thumb_179553.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;</comment>
                            <comment id="1809055" author="zhongxi.yuan" created="Sun, 18 Feb 2018 20:39:33 +0000"  >&lt;p&gt;I am not sure it was in 1768 or 1769, from disassembly  I guss it was.&lt;br/&gt;
my project is in virsual studio 2017 &lt;/p&gt;

&lt;p&gt;I will share the code later and will try to reproduce&lt;br/&gt;
Thanks for response so quickly&lt;/p&gt;</comment>
                            <comment id="1806081" author="jesse" created="Wed, 14 Feb 2018 20:29:13 +0000"  >&lt;p&gt;Thanks for the report. Do you have any evidence that libmongoc is aborting at mongoc-topology-description.c on line 1768 or 1769? Or is that just a guess?&lt;/p&gt;

&lt;p&gt;Could you please share a &lt;a href=&quot;http://sscce.org/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;short code example that I can compile&lt;/a&gt; which will reproduce this crash?&lt;/p&gt;

&lt;p&gt;And finally, could you please reproduce this crash in your own system with a build of libmongoc that has debug symbols enabled? That will give us a more detailed stack trace.&lt;/p&gt;</comment>
                            <comment id="1806005" author="zhongxi.yuan" created="Wed, 14 Feb 2018 19:22:09 +0000"  >&lt;p&gt; &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;179208_thumb&quot; href=&quot;https://jira.mongodb.org/secure/attachment/179208/179208_screenshot-2.png&quot; title=&quot;screenshot-2.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;179208&quot; file-preview-title=&quot;screenshot-2.png&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/thumbnail/179208/_thumb_179208.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;</comment>
                            <comment id="1806004" author="zhongxi.yuan" created="Wed, 14 Feb 2018 19:21:36 +0000"  >&lt;p&gt; &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;a id=&quot;179207_thumb&quot; href=&quot;https://jira.mongodb.org/secure/attachment/179207/179207_screenshot-1.png&quot; title=&quot;screenshot-1.png&quot; file-preview-type=&quot;image&quot; file-preview-id=&quot;179207&quot; file-preview-title=&quot;screenshot-1.png&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/thumbnail/179207/_thumb_179207.png&quot; style=&quot;border: 0px solid black&quot; role=&quot;presentation&quot;/&gt;&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="179553" name="WorkerShell.exe.25044.dmp.png" size="251002" author="yuanzhongxi" created="Tue, 20 Feb 2018 16:16:58 +0000"/>
                            <attachment id="182875" name="case2507.7z" size="54938911" author="yuanzhongxi" created="Tue, 27 Mar 2018 21:34:29 +0000"/>
                            <attachment id="179207" name="screenshot-1.png" size="111713" author="yuanzhongxi" created="Wed, 14 Feb 2018 19:21:33 +0000"/>
                            <attachment id="179208" name="screenshot-2.png" size="88153" author="yuanzhongxi" created="Wed, 14 Feb 2018 19:22:06 +0000"/>
                            <attachment id="182874" name="screenshot-3.png" size="167058" author="yuanzhongxi" created="Tue, 27 Mar 2018 21:28:04 +0000"/>
                    </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|hthuw7:</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>