<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:56: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>[SERVER-41029] mongocryptd should not delete existing domain socket if it fails to start TCP socket</title>
                <link>https://jira.mongodb.org/browse/SERVER-41029</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mark.benvenuto&quot; class=&quot;user-hover&quot; rel=&quot;mark.benvenuto&quot;&gt;mark.benvenuto&lt;/a&gt; + &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt;&lt;br/&gt;
See repro steps.&lt;/p&gt;</description>
                <environment></environment>
        <key id="759008">SERVER-41029</key>
            <summary>mongocryptd should not delete existing domain socket if it fails to start TCP socket</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="mira.carey@mongodb.com">Mira Carey</assignee>
                                    <reporter username="kevin.albertson@mongodb.com">Kevin Albertson</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 May 2019 19:39:35 +0000</created>
                <updated>Wed, 4 Mar 2020 22:11:35 +0000</updated>
                            <resolved>Thu, 27 Jun 2019 18:01:15 +0000</resolved>
                                                                    <component>Security</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2366650" author="xgen-internal-githook" created="Mon, 12 Aug 2019 13:47:23 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Dan Aprahamian&apos;, &apos;username&apos;: &apos;daprahamian&apos;, &apos;email&apos;: &apos;dan.aprahamian@gmail.com&apos;}
&lt;p&gt;Message: NODE: remove connecting on linux socket&lt;/p&gt;

&lt;p&gt;Remove connecting to mongocryptd on /tmp/mongocryptd.sock until&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41029&quot; title=&quot;mongocryptd should not delete existing domain socket if it fails to start TCP socket&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41029&quot;&gt;&lt;del&gt;SERVER-41029&lt;/del&gt;&lt;/a&gt; is resolved&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libmongocrypt/commit/7e604382b43d2aabcd69512b140016690b1443d8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/commit/7e604382b43d2aabcd69512b140016690b1443d8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2301077" author="jason.carey" created="Thu, 27 Jun 2019 18:01:15 +0000"  >&lt;p&gt;I&apos;m going to close this out as wontfix, in preference for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41826&quot; title=&quot;avoid unlinking the unix domain socket if another process is listening&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41826&quot;&gt;SERVER-41826&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2290370" author="jason.carey" created="Wed, 19 Jun 2019 20:08:39 +0000"  >&lt;p&gt;I&apos;ve filed &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-41826&quot; title=&quot;avoid unlinking the unix domain socket if another process is listening&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-41826&quot;&gt;SERVER-41826&lt;/a&gt; with a strategy I believe we can use to avoid stealing the domain socket.&lt;/p&gt;

&lt;p&gt;Couple of other thoughts:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;I&apos;m not sure how we&apos;re exposing the unix domain socket work in mongocryptd, but have you considered passing --nounixsocket and --bind_ip &quot;./mysock&quot;?  That&apos;ll let you put the domain socket wherever you&apos;d like.  It&apos;s still a little error prone, but much less so (and let&apos;s opening servers in different directories more easily avoid collisions&lt;/li&gt;
	&lt;li&gt;I think we don&apos;t currently support it, but linux has support for abstract domain sockets (a domain socket with a leading &apos;\0&apos; byte).  Those aren&apos;t on the file system and go away with process death.  I&apos;d have to think a bit about introducing the syntax for those, but I think they&apos;re a strictly better solution to your problem.  If that sounds interesting to you (and if linux only support would still be useful) I can file a ticket to go that route as well&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="2290136" author="kevin.albertson" created="Wed, 19 Jun 2019 17:41:45 +0000"  >&lt;p&gt;I want to avoid stealing the UNIX domain socket to avoid the user experience described in the repro.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Would it also be a problem if the second mongod managed to bind all ports, but then failed for some other reason?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Hmm, I think so. I guess it&apos;s just a matter that the first mongod to terminates deletes the UNIX domain socket. Perhaps there&apos;s no reasonable way to enforce that the socket file is only deleted if no mongod is bound to it. If that is the case, then perhaps we should close this as &quot;Won&apos;t Fix&quot;, and that would be more reason for us to choose a sensible user-wide pidfile path. By creating it in the current working directory like we currently do, it&apos;s easy to hit issue by running your application in two different directories.&lt;/p&gt;</comment>
                            <comment id="2289094" author="jason.carey" created="Tue, 18 Jun 2019 21:39:42 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kevin.albertson&quot; class=&quot;user-hover&quot; rel=&quot;kevin.albertson&quot;&gt;kevin.albertson&lt;/a&gt;, do you actually want what&apos;s in this ticket?  Or do you want to avoid stealing the unix domain socket from a running process?&lt;/p&gt;

&lt;p&gt;A few thoughts:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;This problem shows up even if a subsequent mongod does start up (i.e. if you have different hosts bound to different ip addresses) because the socket name only includes binary+port.&lt;/li&gt;
	&lt;li&gt;Would it also be a problem if the second mongod managed to bind all ports, but then failed for some other reason?  (because it would still override the unix domain socket)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I&apos;m trying to figure out if the narrow problem this ticket describes is actually worth solving.  Or if you want something more complicated in the &quot;don&apos;t overwrite other&apos;s unix domain sockets&quot; kind of vein&lt;/p&gt;</comment>
                            <comment id="2266707" author="mark.benvenuto" created="Fri, 31 May 2019 15:11:50 +0000"  >&lt;p&gt;The unix domain socket is simply being bound before the TCP/IP sockets. This is not a problem specific to mongocryptd. Assigning to service arch.&lt;/p&gt;

&lt;p&gt;The code in question is here: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/933c6ad19c3f19a964c74a5174cbcf11cde0a66e/src/mongo/transport/transport_layer_asio.cpp#L678-L686&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/933c6ad19c3f19a964c74a5174cbcf11cde0a66e/src/mongo/transport/transport_layer_asio.cpp#L678-L686&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1123031">SERVER-45895</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="808363">SERVER-41826</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 31 May 2019 15:11:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 26 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>oleg.pudeyev@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 26 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kevin.albertson@mongodb.com</customfieldvalue>
            <customfieldvalue>mark.benvenuto@mongodb.com</customfieldvalue>
            <customfieldvalue>mira.carey@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huy06v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hune67:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="2913">Security 2019-05-20</customfieldvalue>
    <customfieldvalue id="3023">Service Arch 2019-06-17</customfieldvalue>
    <customfieldvalue id="3024">Service Arch 2019-07-01</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;start mongocryptd&lt;/li&gt;
	&lt;li&gt;verify you can connect with &lt;tt&gt;mongo mongodb://%2Ftmp%2Fmongocryptd.sock/&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;cd to another directory (so pid file differs)&lt;/li&gt;
	&lt;li&gt;start mongocryptd again, which will fail with &quot;SocketException: Address already in use&quot;&lt;/li&gt;
	&lt;li&gt;although other mongocryptd is still running, &lt;tt&gt;mongo mongodb://%2Ftmp%2Fmongocryptd.sock/&lt;/tt&gt; fails with &lt;tt&gt;Connection refused&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huxmg7:</customfieldvalue>

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