[SERVER-22007] List all commands via HTTP console crashes server Created: 23/Dec/15  Updated: 25/Jan/17  Resolved: 06/Jan/16

Status: Closed
Project: Core Server
Component/s: HTTP Console, Stability
Affects Version/s: 3.2.0
Fix Version/s: 3.2.3, 3.3.0

Type: Bug Priority: Major - P3
Reporter: Phil Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: code-and-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File mongod.yml    
Backwards Compatibility: Fully Compatible
Operating System: Linux
Backport Completed:
Steps To Reproduce:

Click on the "List all commands" link on the mongod webui

Sprint: Sharding E (01/08/16)
Participants:

 Description   

A rest enabled mongod will crash whenever you click on the "List all commands" link on the mongod webui

2015-12-23T16:19:33.445Z I -        [websvr] Invariant failure !_disabled src/mongo/db/lasterror.cpp 105
2015-12-23T16:19:33.445Z I -        [websvr] 
 
***aborting after invariant() failure
 
 
2015-12-23T16:19:33.462Z F -        [websvr] Got signal: 6 (Aborted).
 
 0x12cc662 0x12cb599 0x12cbda2 0x7f04a13ff340 0x7f04a1060cc9 0x7f04a10640d8 0x1262edb 0xc7aebb 0xae5bb8 0xab7406 0xb71041 0xb738b2 0x1289e6e 0x1280913 0x93f89a 0x1a906d0 0x7f04a13f7182 0x7f04a112447d
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"400000","o":"ECC662"},{"b":"400000","o":"ECB599"},{"b":"400000","o":"ECBDA2"},{"b":"7F04A13EF000","o":"10340"},{"b":"7F04A102A000","o":"36CC9"},{"b":"7F04A102A000","o":"3A0D8"},{"b":"400000","o":"E62EDB"},{"b":"400000","o":"87AEBB"},{"b":"400000","o":"6E5BB8"},{"b":"400000","o":"6B7406"},{"b":"400000","o":"771041"},{"b":"400000","o":"7738B2"},{"b":"400000","o":"E89E6E"},{"b":"400000","o":"E80913"},{"b":"400000","o":"53F89A"},{"b":"400000","o":"16906D0"},{"b":"7F04A13EF000","o":"8182"},{"b":"7F04A102A000","o":"FA47D"}],"processInfo":{ "mongodbVersion" : "3.2.0", "gitVersion" : "45d947729a0315accb6d4f15a6b06be6d9c19fe7", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "3.13.0-74-generic", "version" : "#118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000" }, { "b" : "7FFF601F7000", "elfType" : 3 }, { "b" : "7F04A2031000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3 }, { "b" : "7F04A1E2D000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3 }, { "b" : "7F04A1B29000", "path" : "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType" : 3 }, { "b" : "7F04A1823000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3 }, { "b" : "7F04A160D000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3 }, { "b" : "7F04A13EF000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3 }, { "b" : "7F04A102A000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3 }, { "b" : "7F04A2239000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3 } ] }}
 mongod(_ZN5mongo15printStackTraceERSo+0x32) [0x12cc662]
 mongod(+0xECB599) [0x12cb599]
 mongod(+0xECBDA2) [0x12cbda2]
 libpthread.so.0(+0x10340) [0x7f04a13ff340]
 libc.so.6(gsignal+0x39) [0x7f04a1060cc9]
 libc.so.6(abort+0x148) [0x7f04a10640d8]
 mongod(_ZN5mongo15invariantFailedEPKcS1_j+0xCB) [0x1262edb]
 mongod(+0x87AEBB) [0xc7aebb]
 mongod(_ZNK5mongo15CmdGetLastError4helpERSt18basic_stringstreamIcSt11char_traitsIcESaIcEE+0x28) [0xae5bb8]
 mongod(_ZNK5mongo7Command8htmlHelpERSt18basic_stringstreamIcSt11char_traitsIcESaIcEE+0x56) [0xab7406]
 mongod(+0x771041) [0xb71041]
 mongod(_ZN5mongo11DbWebServer9doRequestEPKcSsRSsRiRSt6vectorISsSaISsEERKNS_8SockAddrE+0xBA2) [0xb738b2]
 mongod(_ZN5mongo13MiniWebServer8acceptedESt10shared_ptrINS_6SocketEEx+0x12E) [0x1289e6e]
 mongod(_ZN5mongo8Listener13initAndListenEv+0x693) [0x1280913]
 mongod(_ZNSt6thread5_ImplISt12_Bind_simpleIFSt5_BindIFPFvSt10shared_ptrIN5mongo11DbWebServerEEES6_EEvEEE6_M_runEv+0x3A) [0x93f89a]
 mongod(+0x16906D0) [0x1a906d0]
 libpthread.so.0(+0x8182) [0x7f04a13f7182]
 libc.so.6(clone+0x6D) [0x7f04a112447d]
-----  END BACKTRACE  -----



 Comments   
Comment by Githook User [ 29/Jan/16 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-22007 Disable last-error tracking for help commands.

(cherry picked from commit 8ae053a4d9c5bd2672140964e7f09bd6b734dbdc)
Branch: v3.2
https://github.com/mongodb/mongo/commit/9287affdb7e7c80061450fed87671311672b55d8

Comment by Githook User [ 05/Jan/16 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-22007 Disable last-error tracking for help commands.
Branch: master
https://github.com/mongodb/mongo/commit/8ae053a4d9c5bd2672140964e7f09bd6b734dbdc

Comment by Andy Schwerin [ 23/Dec/15 ]

Also, the problem should always manifest the second time that the "List all commands" is clicked.

Comment by Andy Schwerin [ 23/Dec/15 ]

The problem is that the "dbwebserver" isn't calling LastError::startRequest() on its client's LastError object when processing new requests. This probably should happen as part of building a new OperationContext, rather than every place where a request begins, but if that fix proves complicated, it would suffice to add the startRequest call to the top of DBWebServer::doRequest (just after the OperationContext is created).

Comment by Phil [ 23/Dec/15 ]

Sometimes it requires you to click the link twice or just refresh the page

Generated at Thu Feb 08 03:59:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.