<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:10:38 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-788] Hang in large bulk upsert</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-788</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;On Solaris 11 with MongoDB 2.4.14 and C Driver 1.2 unreleased, &quot;test_upsert_large&quot; segfaults:&lt;/p&gt;

&lt;p&gt;1. The test constructs an update document that is intended to exactly meet the 16MB max bson size, like &lt;tt&gt;update({_id: 1}, {$set: {x: &amp;lt;... 16777179-byte string ...&amp;gt;&lt;/tt&gt;}}).&lt;/p&gt;

&lt;p&gt;2. On legacy servers, it is sent as an OP_UPDATE in _mongoc_write_command_update_legacy, eventually via mongoc_cluster_sendv_to_server&lt;/p&gt;

&lt;p&gt;3. mongoc_cluster_sendv_to_server calls mongoc_stream_writev.&lt;/p&gt;

&lt;p&gt;4. mongoc_stream_writev eventually results in a standard sendmsg call which fails with errno 97, EMSGSIZE, &quot;Message too long&quot; . &lt;a href=&quot;http://docs.oracle.com/cd/E19455-01/806-1075/msgs-1643/index.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.oracle.com/cd/E19455-01/806-1075/msgs-1643/index.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5. mongoc_cluster_sendv_to_server incorrectly checks mongoc_stream_writev&apos;s error return: it considers -1 a success. This is part of the &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-756&quot; title=&quot;Unchecked errors on failed network writes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-756&quot;&gt;&lt;del&gt;CDRIVER-756&lt;/del&gt;&lt;/a&gt; class of bugs.&lt;/p&gt;

&lt;p&gt;6. mongoc_cluster_sendv_to_server thinks the call succeeded so it blocks the standard sockettimeoutms of 5 minutes awaiting GLE. When it finally decides the GLE has failed it crashes trying to free the NULL response document &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-787&quot; title=&quot;segfault on network err in legacy update or delete&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-787&quot;&gt;&lt;del&gt;CDRIVER-787&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Questions:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;1. Does &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-756&quot; title=&quot;Unchecked errors on failed network writes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-756&quot;&gt;&lt;del&gt;CDRIVER-756&lt;/del&gt;&lt;/a&gt; already cover the bug in step 3?&lt;/p&gt;

&lt;p&gt;2. What is a reasonable approach to EMSGSIZE? Split the iovec and retry? Are we certain none of the message was sent? Should the driver record that &quot;n bytes was too large&quot; and split all future iovecs up to that size, in an attempt to adapt to its system?&lt;/p&gt;</description>
                <environment>Solaris 11.</environment>
        <key id="224815">CDRIVER-788</key>
            <summary>Hang in large bulk upsert</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="bjori">Hannes Magnusson</assignee>
                                    <reporter username="jesse@mongodb.com">A. Jesse Jiryu Davis</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Aug 2015 03:14:01 +0000</created>
                <updated>Wed, 19 Oct 2016 14:15:12 +0000</updated>
                            <resolved>Mon, 31 Aug 2015 20:23:26 +0000</resolved>
                                                    <fixVersion>1.2-beta1</fixVersion>
                                    <component>Bulk API</component>
                    <component>libmongoc</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1018434" author="xgen-internal-githook" created="Mon, 31 Aug 2015 17:50:26 +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: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-788&quot; title=&quot;Hang in large bulk upsert&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-788&quot;&gt;&lt;del&gt;CDRIVER-788&lt;/del&gt;&lt;/a&gt;: Return how many bytes we wrote.&lt;/p&gt;

&lt;p&gt;If a iovec is to large to send over sendmsg()/WSASend() we get&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;WSA&amp;#93;&lt;/span&gt;EMSGSIZE and hit the _slow version and try to send() it instead.&lt;br/&gt;
Wether or not we finish writing the entire thing (say, hit &lt;span class=&quot;error&quot;&gt;&amp;#91;WSA&amp;#93;&lt;/span&gt;EWOULDBLOCK)&lt;br/&gt;
we must return how much we actually wrote so we can resume from the&lt;br/&gt;
correct location once _mongoc_socket_wait() finishes (e.g. poll(POLLOUT) succeeds)&lt;br/&gt;
and we have enough socketTimeoutMS left to continue writing&lt;br/&gt;
Branch: 1.2.0-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/2ae1e8b80d328a36a31880ed4ffc727d10aa32c6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/2ae1e8b80d328a36a31880ed4ffc727d10aa32c6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1001782" author="jesse" created="Tue, 11 Aug 2015 13:32:39 +0000"  >&lt;p&gt;Assigning to you as part of the &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-756&quot; title=&quot;Unchecked errors on failed network writes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-756&quot;&gt;&lt;del&gt;CDRIVER-756&lt;/del&gt;&lt;/a&gt; / &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-770&quot; title=&quot;Continue writing until all bytes have been written&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-770&quot;&gt;&lt;del&gt;CDRIVER-770&lt;/del&gt;&lt;/a&gt; constellation of network bugs.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="217632">CDRIVER-756</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="224802">CDRIVER-787</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|hree4f:</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="676">C Driver 2015Q2 sprint 6</customfieldvalue>

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