<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:49:19 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-18942] Mongodb enter dead-loop when client process be killed</title>
                <link>https://jira.mongodb.org/browse/SERVER-18942</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I wrote a go-language mongodb client to use mongodb data, if I kill my client process, I found that mongodb entered dead-loop state. I used htop to see what happens:&lt;/p&gt;

&lt;p&gt;  PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command&lt;br/&gt;
 1211 root       20   0 1395M  138M 97656 S 100.  1.8  1h16:10 /root/mongodb/bin/mongod -f /home/hunter/hunterServer/rundir/conf/mongodb.conf -fork&lt;br/&gt;
  347 root	 20   0 1395M  138M 97656 R 100.  1.8  1h10:24 /root/mongodb/bin/mongod -f /home/hunter/hunterServer/rundir/conf/mongodb.conf -fork &lt;/p&gt;

&lt;p&gt;It looked that the thread(PID:347) of mongod process(PID:1211) occupy 100% CPU, I tried use mongostat, mongotop to figure out which operation there, but no any operation in mongodb. &lt;/p&gt;

&lt;p&gt;I used pstack 347, it looked that mongod enter a dead-loop because the following unhandled exception.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@hkDEV6 ~&amp;#93;&lt;/span&gt;# pstack 347&lt;br/&gt;
Thread 1 (process 347):&lt;br/&gt;
#0  0x00007f2fb3ab5547 in ?? () from /lib64/libgcc_s.so.1&lt;br/&gt;
#1  0x00007f2fb38263d6 in dl_iterate_phdr () from /lib64/libc.so.6&lt;br/&gt;
#2  0x00007f2fb3ab6207 in _Unwind_Find_FDE () from /lib64/libgcc_s.so.1&lt;br/&gt;
#3  0x00007f2fb3ab3603 in ?? () from /lib64/libgcc_s.so.1&lt;br/&gt;
#4  0x00007f2fb3ab46a6 in _Unwind_RaiseException () from /lib64/libgcc_s.so.1&lt;br/&gt;
#5  0x00007f2fb3ffad15 in __cxa_throw () from /usr/lib64/libstdc++.so.6&lt;br/&gt;
#6  0x00000000011ba4cd in mongo::Socket::handleRecvError(int, int) ()&lt;br/&gt;
#7  0x00000000011bae44 in mongo::Socket::_recv(char*, int) ()&lt;br/&gt;
#8  0x00000000011bae59 in mongo::Socket::unsafe_recv(char*, int) ()&lt;br/&gt;
#9  0x00000000011baea5 in mongo::Socket::recv(char*, int) ()&lt;br/&gt;
#10 0x00000000011af94c in mongo::MessagingPort::recv(mongo::Message&amp;amp;) ()&lt;br/&gt;
#11 0x00000000011b28a8 in mongo::PortMessageServer::handleIncomingMsg(void*) ()&lt;br/&gt;
#12 0x00007f2fb44539d1 in start_thread () from /lib64/libpthread.so.0&lt;br/&gt;
#13 0x00007f2fb37effbd in clone () from /lib64/libc.so.6&lt;/p&gt;</description>
                <environment></environment>
        <key id="210198">SERVER-18942</key>
            <summary>Mongodb enter dead-loop when client process be killed</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="mark.benvenuto@mongodb.com">Mark Benvenuto</assignee>
                                    <reporter username="ZhangKun">ZhangKun [X]</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Jun 2015 11:06:59 +0000</created>
                <updated>Mon, 3 Aug 2015 21:59:20 +0000</updated>
                            <resolved>Mon, 3 Aug 2015 21:59:20 +0000</resolved>
                                    <version>2.6.6</version>
                                                    <component>Internal Code</component>
                    <component>Networking</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="995537" author="ramon.fernandez" created="Mon, 3 Aug 2015 21:59:05 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ZhangKun&quot; class=&quot;user-hover&quot; rel=&quot;ZhangKun&quot;&gt;ZhangKun&lt;/a&gt;, have you seen this behavior again? Is this still an issue for you? Given Mark&apos;s answer I&apos;m going to close this ticket for now; if you observe this behavior again please let us know so we can re-open this ticket.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                            <comment id="988712" author="mark.benvenuto" created="Fri, 24 Jul 2015 21:29:54 +0000"  >&lt;p&gt;&lt;tt&gt;_Unwind_Find_FDE&lt;/tt&gt; calls &lt;tt&gt;dl_iterate_phdr&lt;/tt&gt; using &lt;tt&gt;_Unwind_IteratePhdrCallback&lt;/tt&gt; as a callback. See &lt;a href=&quot;http://osxr.org/glibc/source/sysdeps/generic/unwind-dw2-fde-glibc.c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://osxr.org/glibc/source/sysdeps/generic/unwind-dw2-fde-glibc.c&lt;/a&gt; as an example of the source code. I suspect that either the binary was corrupt or some other data structure was corrupt in the binary image. This is the only explanation I can think of why the code got stuck in a infinite loop.&lt;/p&gt;</comment>
                            <comment id="938732" author="zhangkun" created="Fri, 12 Jun 2015 11:12:34 +0000"  >&lt;p&gt;Here something I missed in the submit:&lt;br/&gt;
The environment is :&lt;br/&gt;
OS: CentOS release 6.6 (Final)&lt;br/&gt;
Disk:NUMA, Network disk&lt;/p&gt;
</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 12 Jun 2015 12:39:18 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 28 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 28 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>mark.benvenuto@mongodb.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>ZhangKun</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrl3e7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsb8lz:</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="632">Platform 7 08/10/15</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|hsfxxr:</customfieldvalue>

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